瑞芯微Rockchip开发者社区
直播中

vinww特烦恼

9年用户 1220经验值
擅长:存储技术
私信 关注
[问答]

内核增加了802.1Q VLAN Support编译错误怎么办

我买的是S5P6818-C2,因为需要用到VLAN,所以我在内核中增加了“802.1Q  VLAN Support”
但编译的时候,出现一下错误,麻烦大侠帮忙分析一下  CC      drivers/net/ethernet/nexell/nxpmac/nxpmac_main.o
drivers/net/ethernet/nexell/nxpmac/nxpmac_main.c: In function ‘stmmac_dvr_probe’:
drivers/net/ethernet/nexell/nxpmac/nxpmac_main.c:3315:20: error: ‘NETIF_F_HW_VLAN_CTAG_RX’ undeclared (first use in this function)
drivers/net/ethernet/nexell/nxpmac/nxpmac_main.c:3315:20: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/nexell/nxpmac/nxpmac_main.c: At top level:
drivers/net/ethernet/nexell/nxpmac/nxpmac_main.c:1019:13: warning: ‘stmmac_display_descriptors’ defined but not used [-Wunused-function]
make[5]: *** [drivers/net/ethernet/nexell/nxpmac/nxpmac_main.o] Error 1
make[4]: *** [drivers/net/ethernet/nexell/nxpmac] Error 2
make[3]: *** [drivers/net/ethernet/nexell] Error 2
make[2]: *** [drivers/net/ethernet] Error 2
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

无标题.png (70.11 KB, 下载次数: 1)
下载附件





回帖(2)

刘涛

2022-1-6 11:29:03

  • 修改方法如下:
    找到目录/forlinx/kernel-3.4.39/include/linux下的netdev_features.h
    然后加上两行
    #define NETIF_F_HW_VLAN_CTAG_RX        NETIF_F_HW_VLAN_RX
    #define NETIF_F_HW_VLAN_CTAG_TX        NETIF_F_HW_VLAN_TX
    原因是:
    内核版本小于3.10则用
    NETIF_F_HW_VLAN_CTAG_RX      
    NETIF_F_HW_VLAN_CTAG_TX      
    高于这个版本,则用
    NETIF_F_HW_VLAN_RX
    NETIF_F_HW_VLAN_TX
举报

陈红

2022-1-6 11:29:12

  • 看报错是这个文件nxpmac_main.c。文件里有修改东西吗
举报

更多回帖

发帖
×
20
完善资料,
赚取积分