使用ubuntu16.04配置linux内核和busybox出现错误的解决方法总结

2020-09-30 11:00:22 浏览数 (1)

1.

编译busybox-1.23.2: 

出现错误:

scripts/kconfig/Makefile:14: recipe for target 'menuconfig' failed

解决方法:安装2个库

sudo apt-get install libncurses5-dev libncursesw5-dev

2.

编译busybox-1.7.0出现如下错误:

busybox-1.7.0$make menuconfig Makefile:405:*** mixed implicit and normal rules: deprecated syntax Makefile:1242:*** mixed implicit and normal rules: deprecated syntax make:*** No rule to make target 'menuconfig'. Stop.

分析原因:

新版Makefile不支持这样的组合目标:config %config(一个有通配符,另一个没有通配符)

解决方法:

要么把config %config拆成2个规则,要么把其中一个目标去掉。

所以,

a.修改busybox-1.7.0 顶层Makefile 405行:

config%config: scripts_basic outputmakefile FORCE 改为: %config:scripts_basic outputmakefile FORCE

b.修改busybox-1.7.0 顶层Makefile 1242行:

/%/: prepare scripts FORCE 改为: %/:prepare scripts FORCE

3.

配置linux-2.6.22.6内核出现如下错误:

linux-2.6.22.6$make menuconfig Makefile:416:*** mixed implicit and normal rules: deprecated syntax Makefile:1449:*** mixed implicit and normal rules: deprecated syntax make:*** No rule to make target 'menuconfig'. Stop.

解决方法:

修改linux-2.6.22.6 顶层Makefile 416行:

config%config: scripts_basic outputmakefile FORCE 改为: %config:scripts_basic outputmakefile FORCE

修改linux-2.6.22.6 顶层 Makefile 1449行:

/%/: prepare scripts FORCE 改为: %/:prepare scripts FORCE

0 人点赞