今天看到师兄工位上有本Linux Kernel In a Nutshell,还是全英的影印版,所以就借过来看看,发现现在看英文的书渐渐适应了,还是比较容易的,书中开始介绍如何编译Linux内核,Linux内核大三的时候也学过编译过,但是当时编译比较简单,这次决定再重头到尾好好编译一下,首先下载linux kernel,再用secureCRT上传到Ubuntu 8.04中,接着开始编译。
1,tar -xzvf linux-2.6.***
2,cd linux-2.6.***
3,make menuconfig
执行这条命令时,出现了问题,后来上网查,查到了问题,答案如下:
hi.
It's your distribution. Ubuntu doesn't come with the gcc headers installed. You can't even compile the simplest c application.
All you have to do is to download the headers from the internet. The easisest way would be to use synaptic and to download
the build-essential package.
bye
http://forum.kernelnewbies.org/read.php?10,18,528
原来必须安装build-essential,安装好后,问题解决。
4,执行 make 命令,源代码进行编译
5,make modules_install install
6,