Step 5: Build your new kernel.
Actually
building the kernel is one step easier than in 2.4, as you no longer
have to type 'make dep'. To build a new kernel, type 'make bzImage'. If
you've chosen to compile any modules, you'll also need to 'make
modules' and 'make modules_install'. Or, you can string it all together
like 'make bzImage && make modules && make
modules_install'. When the build starts, you'll notice that the default build process is much quieter than it was in 2.4, providing simple summaries as opposed to all the compiler output.
Step 6: Install your new kernel.
Now
that you've built your kernel, you need to copy it into place. For
example, on x86 you'll find it in 'arch/i386/boot'. You'll want to copy
this file and your new System.map into /boot. For example:
# pwd
/usr/src/linux-2.6.0-test4
# mv arch/i386/boot/bzImage /boot/bzImage-2.6.0-test4
# mv System.map /boot/System.map-2.6.0-test4
# cd /boot
# rm System.map
# ln -s System.map-2.6.0-test4 System.map
I noticed that my new 2.6 kernel is bigger than the last 2.4 kernel I compiled with the same version of gcc, however it's possible that I have more options enabled:
-rw-r--r-- 1 root root 1094390 Aug 12 20:30 bzImage-2.4.21-ck3
-rw-r--r-- 1 root root 1639129 Aug 27 22:06 bzImage-2.6.0-test4
Having copied your new kernel into place, now you need to configure your boot loader. You're probably using grub [manual] or lilo [howto], refer to the appropriate documentation if you're unsure how your boot loader works.
Step 7: It's still not too late...
I'm
not trying to scare you, but up to this point you've not done anything
that could damage data on your hard drive. However, the next step
involves booting the new kernel, so just to be safe one last time I'm
going to recommend that you be sure you have a current backup of any
important data that lives on your hard drive.
Step 8: Try your new kernel.
And
now, the moment you've been waiting for.. It's time to reboot your
computer, and test your newly compiled 2.6 kernel. If you've done
everything correctly, you'll watch some friendly boot messages, and
then be prompted to login. (If your booting to initstate=3, you'll
notice the new kernel immediately...)
If you installed ALSA for the first time, you can verify that your sound driver has properly loaded by typing 'cat /proc/asound/cards'. For example:
$ cat /proc/asound/cardsIf you see something like that, but sound still isn't working, launch 'alsamixer' and be sure your device is turned up. I was confused at first in that turning up the 'Master' control wasn't enough, I also had to turn up 'PCM' (/dev/dsp) for sound to start working.
0 [Live ]: EMU10K1 - Sound Blaster Live!
Sound Blaster Live! (rev.5) at 0x18e0, irq 11
Once you've tried out your new 2.6 kernel, I'd love if you'd post a comment here with your reflections. I'm also open to suggestions on how to make the above directions more useful.
If you run into problems with your new kernel, once again refer to the top-level 'README' that came with your kernel source which has a useful section titled "IF SOMETHING GOES WRONG". Additionally, refer to the top-level 'REPORTING-BUGS' file if the need arises. Prior to posting problems to the high-traffic Linux kernel mailing list, be sure to search one or more of the many online lkml archives to see if someone else has already reported the problem, and better yet if someone else has already posted a fix. Last but not least, you may also try asking for help in the KernelTrap 2.6 kernel forum.
Additional tips/FAQs:
Thanks to a significant amount
of reader feedback in the form of comments below and personal emails,
I'm going to add a few random but hopeful useful tips to the end of
this document. If you have additional tips, please feel free to send me an email. (If you've already sent a comment and I've note yet replied, please be patient...)
I'm already running 2.6.x, how can I easily upgrade to the next release?
The process is described here.Does GCC 3.x work for compiling the Linux kernel?
Personally, I compiled the 2.6.0-test4 kernel that I'm currently using with gcc 3.2, and I'm not having any problems. The general consensus appears to be that this will work in most cases, but if you run into any compilation problems then try again with the preferred gcc 2.95.3.文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!




