1.下载[switchtec-kernel]: https://github.com/Microsemi/switchtec-kernel
注意版本,有些内核函数会有改变
我的内核版本:
pcie switch kernel版本:switchtec-kernel-1.5-rc1
make
make install
depmod
modprobe switchtec
ls /dev/switch*
注:如果没有/dev/switchtec0的驱动
则执行 lspci -tv
如果没有红圈中的EP,则需要通过chiplink软件配置Enable Management EP,如下图:
成功之后。
加载user驱动:
https://github.com/Microsemi/switchtec-user
./configure
make
sudo make install
执行example中的./temp 查看