-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
65 lines (43 loc) · 1.39 KB
/
README
File metadata and controls
65 lines (43 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
Supported distro/kernel
=======================
- Debian 10
- Linux 5.15.x
Install deps
============
sudo apt install libnl-3-dev libnl-genl-3-dev
Build steps
===========
./bootstrap.sh
./configure \
LIBSAI_CFLAGS="-I<SAI_REPO_DIR>/inc -I<SAI_REPO_DIR>/sai/experimental" \
LIBSAI_LDFLAGS="-L<SAI_LIB_DIR>"
make
make check
where,
SAI_REPO_DIR - SAI headers location
SAI_LIB_DIR - SAI library location
Build Prestera driver
=====================
Clone DENT Linux kernel sources (or just download to save some time)
git clone https://github.com/PLVision/dent-linux.git -b dent-linux-5.15.y-netlink
or
wget https://github.com/PLVision/dent-linux/archive/refs/heads/dent-linux-5.15.y-netlink.zip
unzip dent-linux-5.15.y-netlink.zip
Install deps
sudo apt-get install build-essential bc kmod cpio flex libncurses5-dev libelf-dev libssl-dev dwarves bison
Install 5.15x kernel headers (refer to distro documentation)
Build
cd dent-linux/drivers/net/ethernet/marvell/prestera/
export CONFIG_PRESTERA=m
export CONFIG_SWDEVSAI_NL=m
make -C /lib/modules/`uname -r`/build M=$PWD modules
Execute SAI agent
=================
Load Prestera driver
cd dent-linux/drivers/net/ethernet/marvell/prestera
sudo insmod prestera.ko
sudo insmod swdevsai_nl.ko
Run SAI Agent
<SAIAGENT_DIR>/src/saiagent -p <SAI_PROFILE>
where,
SAI_PROFILE - is SAI profile, usually 'sai.profile' file.