Linux内核编译时scripts/kconfig/conf --oldconfig Kconfig报错

错误提示:

scripts/kconfig/conf  --oldconfig Kconfig
bcmdrivers/Kconfig.autogen:2: syntax error
Kconfig.bcm:1868: missing end statement for this entry
Kconfig.bcm:2: missing end statement for this entry
Kconfig:15: missing end statement for this entry
bcmdrivers/Kconfig.autogen:1: invalid statement
Kconfig.bcm:1870: unexpected end statement
Kconfig.bcm:1872: unexpected end statement
Kconfig:20: unexpected end statement
scripts/kconfig/Makefile:84: recipe for target 'oldconfig' failed
make[2]: *** [oldconfig] Error 1
Makefile:613: recipe for target 'oldconfig' failed
make[1]: *** [oldconfig] Error 2
make[1]: Leaving directory '/media××××××××××××××××××××××××××××××××××××××××××××××××××××××××'
Makefile:110: recipe for target 'linux_only' failed
make: *** [linux_only] Error 2

出现这种错误可能的原因时sh被链接为dash而不是bash

解决办法:

# ls -al /bin/sh (查看sh链接)
lrwxrwxrwx 1 root root 4 三月 17  2018 /bin/sh -> dash
# ln -sf /bin/bash /bin/sh (修改sh为bash)
# dpkg-reconfigure dash (弹出窗口时选择NO)

重新编译即可。

猜你喜欢

转载自www.cnblogs.com/lxp0826/p/13377049.html