bigfoot 发表于 2021-8-6 15:04:23

编译内核报错

报错信息:
./include/linux/phy/omap_control_phy.h:46:2: error: redeclaration of enumerator 'USB_MODE_HOST'
USB_MODE_HOST,
^
In file included from ./include/linux/usb/otg.h:14:0,
               from ./include/linux/phy/omap_usb.h:23,
               from drivers/phy/ti/phy-omap-usb2.c:24:
./include/linux/usb/phy.h:69:2: note: previous definition of 'USB_MODE_HOST' was here
USB_MODE_HOST,
^
In file included from drivers/phy/ti/phy-omap-usb2.c:30:0:
./include/linux/phy/omap_control_phy.h:47:2: error: redeclaration of enumerator 'USB_MODE_DEVICE'
USB_MODE_DEVICE,
^
In file included from ./include/linux/usb/otg.h:14:0,
               from ./include/linux/phy/omap_usb.h:23,
               from drivers/phy/ti/phy-omap-usb2.c:24:
./include/linux/usb/phy.h:70:2: note: previous definition of 'USB_MODE_DEVICE' was here
USB_MODE_DEVICE,
^
scripts/Makefile.build:328: recipe for target 'drivers/phy/ti/phy-omap-usb2.o' failed
make: *** Error 1
scripts/Makefile.build:587: recipe for target 'drivers/phy/ti' failed
make: *** Error 2
scripts/Makefile.build:587: recipe for target 'drivers/phy' failed


djh 发表于 2021-8-6 16:36:22

您这是做了直接编译源码报错的?还是修改之后编译报错的啊?

bigfoot 发表于 2021-8-9 09:25:07

修改了,但没有修改与USB相关的,但错误是USB_MODE_HOST与USB_MODE_DEVICE定义问题

djh 发表于 2021-8-9 14:15:12

本帖最后由 djh 于 2021-8-9 14:16 编辑

bigfoot 发表于 2021-8-9 09:25
修改了,但没有修改与USB相关的,但错误是USB_MODE_HOST与USB_MODE_DEVICE定义问题
我根据您的报错查看了omap_comtrol_phy.h相应的部分,如下所示


include/linux/usb/phy.h

页: [1]
查看完整版本: 编译内核报错