编译错误-----Kconfig之'endmenu' in different file than 'menu'

来源:互联网 发布:数据采集卡是板卡吗 编辑:程序博客网 时间:2024/06/05 16:12

今天在内核中添加自己的驱动程序,奇怪的是老出现如下问题:


[root@localhost kernel]# make menuconfig
scripts/kconfig/mconf Kconfig
drivers/xxxx/Kconfig:10: 'endmenu' in different file than 'menu'
drivers/xxxx/Kconfig:2: location of the 'menu'
drivers/Kconfig:117: 'endmenu' in different file than 'menu'
drivers/advantech/Kconfig:2: location of the 'menu'
make[1]: *** [menuconfig] Error 1
make: *** [menuconfig] Error 2


找了老半天,没有发现问题阿,没办法又把其他的Kconfig问价复制粘贴,删除试试,最发现是因为我的Kconfig文件:

menu "XXXXX Device Drivers"

config UNO_DIO_LED
        tristate "XXX dio and led"
       help
      Generic dio led driver.
      Used for XXX and OMAP3 SDP.
      
endmenu


在“endmenu”后面必须要有一个空行,应该是(关键字简析的时候除了匹配问题)