在Slackware上编译2.6.0内核 [英] compiling the 2.6.0 kernel on slackware

查看:133
本文介绍了在Slackware上编译2.6.0内核的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于好奇,我尝试在slackware计算机上编译2.6.0内核.

out of sheer curiosity I tried compiling a 2.6.0 kernel on my slackware machine.

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

当我尝试编译时,我得到:-

When I try compiling I get :-

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

关于我在做什么错的一些提示?谢谢!

Some hints on what im doing wrong? Thanks!

推荐答案

您是如何开始的?

通常,您从kernel.org下载最新的内核,将压缩包复制到/usr/src,然后:

Typically, you download the latest kernel from kernel.org, copy the tarball to /usr/src, then:

 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 6shutdown -r now),并尝试新的内核.

At this point, DO NOT run make install. Most guides say to do this, but this is WRONG! Instead, copy the newly created bzImage file to /boot (ie: find -name bzImage /usr/src/linux, then cp to /boot), then edit your LILO configuration file (edit /etc/lilo.conf, and when done, run lilo), then reboot your system (ie: init 6 or shutdown -r now), and try out the new kernel.

跳过make install步骤的全部要点是因为它会覆盖/替换您现有的内核.我上面描述的步骤使您可以并行安装和运行新内核和现有内核.如果新内核被破坏或您遗漏了一个重要的选择,您仍然可以使用现有的稳定/工作内核,而无需引导/恢复CD/DVD.

The whole point of skipping the make install step is because it overwrites/replaces your existing kernel. The steps I described above allow you to have the new kernel and your existing kernel both installed and runnable in parallel. If the new kernel is broken or your left out an important option, you can still fall back to your existing stable/working kernel without the need for a boot/recovery CD/DVD.

这篇关于在Slackware上编译2.6.0内核的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆