出于纯粹的好奇心,我尝试在我的松散软件机器上编译一个2.6.0内核。
root@darkstar:/home/linux-2.6.0# uname -a
Linux darkstar 2.6.37.6-smp #2 SMP Sat Apr 9 23:39:07 CDT 2011 i686 Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz GenuineIntel GNU/Linux当我尝试编译时,我得到:
root@darkstar:/home/linux-2.6.0# make menuconfig
HOSTCC scripts/fixdep
scripts/fixdep.c: In function 'traps':
scripts/fixdep.c:359:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
scripts/fixdep.c:361:4: warning: dereferencing type-punned pointer will break strict-aliasing rules
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/mconf.o
scripts/kconfig/mconf.c:91:21: error: static declaration of 'current_menu' follows non-static declaration
scripts/kconfig/lkc.h:63:21: note: previous declaration of 'current_menu' was here
make[1]: *** [scripts/kconfig/mconf.o] Error 1
make: *** [menuconfig] Error 2一些关于我做错了什么的提示?谢谢!
发布于 2012-05-23 12:27:29
你是怎么开始做这个的呢?
通常,从kernel.org下载最新内核,将tarball复制到/usr/src,然后:
1. tar -zxvvf linux-2.6.xxxx.tar.gz
2. ln -nsf linux-2.6.xxxx linux # ie: Update the "/usr/src/linux" symbolic link to
# point to the new kernel source directory
3. make menuconfig # or make xconfig
4. make modules # Build the kernel modules
5. make modules_install # Install the previously built modules for the
# new kernel
6. make bzImage # Create the boot image在这一点上,不要运行make install。大多数指南都说要这样做,但这是错误的!相反,将新创建的bzImage文件复制到/boot (即:find -name bzImage /usr/src/linux,然后将cp复制到/boot),然后编辑您的LILO配置文件(编辑/etc/lilo.conf,完成后运行lilo),然后重启系统(即:init 6或shutdown -r now),并尝试新内核。
跳过make install步骤的全部意义在于它会覆盖/替换您现有的内核。通过上面描述的步骤,您可以同时安装新内核和现有内核,并使其可并行运行。如果新内核坏了,或者您遗漏了一个重要的选项,您仍然可以退回到现有的稳定/正常工作的内核,而不需要引导/恢复CD/DVD。
发布于 2013-12-07 19:17:19
如果我没记错的话,我想你错过了ncurses库。这些是使用menuconfig创建接口所必需的。
尝试从X会话中执行make xconfig,看看它是否工作。
如果是这样的话,ncurses库肯定是缺失的。
与以下人员核对:
ls /var/log/packages/ncurses* 查看是否已安装
https://stackoverflow.com/questions/8869931
复制相似问题