对于目前正在更新的igh ethercat master https://sourceforge.net/projects/etherlabmaster/, 其stable1.5版本已经把其它相关驱动升级到内核4.4的支持了,这样就可以基于ubuntu16.04LTS的系统进行改造。
ubuntu16.04LTS的内核版本为4.4, 根据改造以后,其内核版本为4.4.113-rt128。
此时对Ethercat master 编译时,若配置e1000e驱动
./configure --enable-8139too=no --enable-e1000e=yes
编译会出错
include/net/sch_generic.h:414:9: error: implicit declaration of function ‘G_TC_AT’ [-Werror=implicit-function-declaration]
return G_TC_AT(skb->tc_verd) & AT_INGRESS;
^
include/net/sch_generic.h:414:33: error: ‘AT_INGRESS’ undeclared (first use in this function)
return G_TC_AT(skb->tc_verd) & AT_INGRESS;
需要对应修改内核源码,
在include/net/sch_generic.h里的 #include <linux/pkt_cls.h>之前插入
#include <uapi/linux/pkt_cls.h>
然后编译可通过。
查询网卡驱动
sudo lspci -v | grep "Ethernet\|driver" |grep -A1 Ethernet