当前位置: 技术问答>linux和unix
修改Kconfig文件后编译出错,请大侠指教!
来源: 互联网 发布时间:2017-04-05
本文导语: 1 目的 随便找一个Kconfig文件改改,添加一个配置宏.然后编译一下,跟踪一下Kconfig运行机制. 2 实验步骤 修改drivers/usb/net/Kconfig,添加了一项config USB_NET_HHHHHH,如下所示 config USB_NET_HHHHHH tristate "USB_NET_HHHHHH kconf...
1 目的
随便找一个Kconfig文件改改,添加一个配置宏.然后编译一下,跟踪一下Kconfig运行机制.
2 实验步骤
修改drivers/usb/net/Kconfig,添加了一项config USB_NET_HHHHHH,如下所示
config USB_NET_HHHHHH
tristate "USB_NET_HHHHHH kconfig test"
depends on USB_USBNET
select CRC32
select USB_USBNET_MII
default y
help
This option adds support for ASIX AX88xxx based USB 2.0
10/100 Ethernet adapters.
This driver should work with at least the following devices:
* Aten UC210T
* ASIX AX88172
* Billionton Systems, USB2AR
* Buffalo LUA-U2-KTX
* Corega FEther USB2-TX
* D-Link DUB-E100
* Hawking UF200
* Linksys USB200M
* Netgear FA120
* Sitecom LN-029
* Intellinet USB 2.0 Ethernet
* ST Lab USB 2.0 Ethernet
* TrendNet TU2-ET100
This driver creates an interface named "ethX", where X depends on
what other networking devices you have in use.
然后再编译工程,结果打印一堆错误,如下:
scripts/kconfig/conf -s arch/mips/Kconfig
drivers/usb/net/Kconfig:23: unknown option "This"
drivers/usb/net/Kconfig:24: unknown option "typically"
drivers/usb/net/Kconfig:25: unknown option "eth1"
drivers/usb/net/Kconfig:27: unknown option "To"
drivers/usb/net/Kconfig:28: unknown option "module"
drivers/usb/net/Kconfig:55: unknown option "This"
drivers/usb/net/Kconfig:56: unknown option "adapters"
drivers/usb/net/Kconfig:57: unknown option "SmartBridges"
drivers/usb/net/Kconfig:58: unknown option "the"
drivers/usb/net/Kconfig:59: unknown option "you"
drivers/usb/net/Kconfig:60: unknown option "you"
drivers/usb/net/Kconfig:62: unknown option "This"
drivers/usb/net/Kconfig:63: unknown option "typically"
drivers/usb/net/Kconfig:64: unknown option "eth1"
drivers/usb/net/Kconfig:66: unknown option "To"
drivers/usb/net/Kconfig:67: unknown option "module"
drivers/usb/net/Kconfig:77: unknown option "If"
drivers/usb/net/Kconfig:78: unknown option "is"
这些字符都是第一个配置项的help说明而已.
3 为什么会这样呢?是不是格式有什么特殊要求(我已经是拷贝已有的配置项,然后改了一下名字而已)?
随便找一个Kconfig文件改改,添加一个配置宏.然后编译一下,跟踪一下Kconfig运行机制.
2 实验步骤
修改drivers/usb/net/Kconfig,添加了一项config USB_NET_HHHHHH,如下所示
config USB_NET_HHHHHH
tristate "USB_NET_HHHHHH kconfig test"
depends on USB_USBNET
select CRC32
select USB_USBNET_MII
default y
help
This option adds support for ASIX AX88xxx based USB 2.0
10/100 Ethernet adapters.
This driver should work with at least the following devices:
* Aten UC210T
* ASIX AX88172
* Billionton Systems, USB2AR
* Buffalo LUA-U2-KTX
* Corega FEther USB2-TX
* D-Link DUB-E100
* Hawking UF200
* Linksys USB200M
* Netgear FA120
* Sitecom LN-029
* Intellinet USB 2.0 Ethernet
* ST Lab USB 2.0 Ethernet
* TrendNet TU2-ET100
This driver creates an interface named "ethX", where X depends on
what other networking devices you have in use.
然后再编译工程,结果打印一堆错误,如下:
scripts/kconfig/conf -s arch/mips/Kconfig
drivers/usb/net/Kconfig:23: unknown option "This"
drivers/usb/net/Kconfig:24: unknown option "typically"
drivers/usb/net/Kconfig:25: unknown option "eth1"
drivers/usb/net/Kconfig:27: unknown option "To"
drivers/usb/net/Kconfig:28: unknown option "module"
drivers/usb/net/Kconfig:55: unknown option "This"
drivers/usb/net/Kconfig:56: unknown option "adapters"
drivers/usb/net/Kconfig:57: unknown option "SmartBridges"
drivers/usb/net/Kconfig:58: unknown option "the"
drivers/usb/net/Kconfig:59: unknown option "you"
drivers/usb/net/Kconfig:60: unknown option "you"
drivers/usb/net/Kconfig:62: unknown option "This"
drivers/usb/net/Kconfig:63: unknown option "typically"
drivers/usb/net/Kconfig:64: unknown option "eth1"
drivers/usb/net/Kconfig:66: unknown option "To"
drivers/usb/net/Kconfig:67: unknown option "module"
drivers/usb/net/Kconfig:77: unknown option "If"
drivers/usb/net/Kconfig:78: unknown option "is"
这些字符都是第一个配置项的help说明而已.
3 为什么会这样呢?是不是格式有什么特殊要求(我已经是拷贝已有的配置项,然后改了一下名字而已)?
|
可能是在不同操作系统,或不同文件系统间的操作对文件的内容格式造成了影响。
可参考http://lists.denx.de/pipermail/eldk/2009-August/000923.html 中Wolfgang的回答。
可参考http://lists.denx.de/pipermail/eldk/2009-August/000923.html 中Wolfgang的回答。