Ubuntu:16.04.2-x64-100ask
linux-2.6.22.6
2018-10-15
1期~2期衔接课程,linux-2.6.22.6内核菜单配置make menuconfig错误及解决:
第一步:内核配置及编译
[email protected]:~/workbook/jz2440/system/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.
File: Makefile
416 config %config: scripts_basic outputmakefile FORCE
417 $(Q)mkdir -p include/linux include/config
418 $(Q)$(MAKE) $(build)=scripts/kconfig [email protected]
...
1448 # Modules
1449 / %/: prepare scripts FORCE
1450 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
1451 $(build)=$(build-dir)
1452 %.ko: prepare scripts FORCE
1453 $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
1454 $(build)=$(build-dir) $(@:.ko=.o)
1455 $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
...
问题:是因为make工具的版本原因吗?怎么修改?
答:参考韦东山老师的博客,如下:
===================================================================
配置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
===================================================================
------------------------------------------------
第二步:
用第一步的方法修改Makefile之后,执行命令:make menuconfig;重新出现的问题:
/home/book/workbook/jz2440/system/linux-2.6.22.6/scripts/kconfig/Makefile:14: recipe for target ‘menuconfig‘ failed
make[1]: *** [menuconfig] Segmentation fault (core dumped)
Makefile:421: recipe for target ‘menuconfig‘ failed
make: *** [menuconfig] Error 2
[email protected]:~/workbook/jz2440/system/linux-2.6.22.6$
解决方法:
sudo apt-get install libncurses*
至此,问题完全解决。
注:
1)makefile:2: *** missing separator. Stop. make 之后出现的错误,解决方法:
在gcc -o hello helloword.c前面用TAB键,而不是空格空格空格….
原文地址:https://www.cnblogs.com/xiaohujian/p/9792088.html