嵌入式爱好者

查看: 18610|回复: 3

[Linux] 编译内核报错

[复制链接]

6

主题

13

帖子

28

积分

扫一扫,手机访问本帖
发表于 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[4]: *** [drivers/phy/ti/phy-omap-usb2.o] Error 1
scripts/Makefile.build:587: recipe for target 'drivers/phy/ti' failed
make[3]: *** [drivers/phy/ti] Error 2
scripts/Makefile.build:587: recipe for target 'drivers/phy' failed


回复

使用道具 举报

0

主题

471

帖子

919

积分

发表于 2021-8-6 16:36:22 | 显示全部楼层
您这是做了直接编译源码报错的?还是修改之后编译报错的啊?
点评回复 支持 反对

使用道具 举报

6

主题

13

帖子

28

积分

 楼主| 发表于 2021-8-9 09:25:07 | 显示全部楼层
修改了,但没有修改与USB相关的,但错误是USB_MODE_HOST与USB_MODE_DEVICE定义问题

点评

djh
我根据您的报错查看了omap_comtrol_phy.h相应的部分,如下所示 [attachimg]11786[/attachimg] phy.h [attachimg]11787[/attachimg]  详情 回复 发表于 2021-8-9 14:15
点评回复 支持 反对

使用道具 举报

0

主题

471

帖子

919

积分

发表于 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相应的部分,如下所示
omap control phy.gif

include/linux/usb/phy.h
phy.gif
点评回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-4-20 08:50

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表