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
关于我做错什么的一些暗示?谢谢!
答案 0 :(得分:5)
你是如何开始这样做的?
通常,您从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。
答案 1 :(得分:1)
如果我记得很清楚,我认为你错过了ncurses库。这些是使用menuconfig创建界面所必需的。
尝试从X会话中执行make xconfig,看看它是否有效。
如果是这种情况,那么ncurses libs肯定是缺失的。
检查:
ls /var/log/packages/ncurses*
查看是否已安装