Hi Murali,

> Hi All,
> As a initial step to learn about the kernel i am planning to compile
> my own kernel and boot the system.
> Can any one please share useful links on net. i found some but they
> are very abstract.

It is different on different distributions. Please find the below mentioned 
steps for Fedora distribution.

1. Download the required kernel source file from the link  
http://www.kernel.org/pub/linux/kernel/v2.6/

Example: linux-2.6.31.5.tar.gz

2. Copy the downloaded tar file into /usr/src/kernels directory.

3. Extract the tar file with the following command.
   # tar –zxvf  linux-2.6.31.5.tar.gz

It creates the linux-2.6.31.5 directory under /usr/src/kernels.

4. This is an optional. 
   Create a link to the linux-2.6.31.5 directory.
   # ln –s  linux-2.6.31.5 linux        

5. Change into the newly created directory
   # cd  linux (or cd linux-2.6.31.5)

6. Then, just run the following commands sequentially.
   # make clean
   # make menuconfig

   Here, you can change the configuration of the kernel. That is, you can 
enable some of the required options here like debug messages, changing to 
modules etc. Then, save and exit.

7. Then run the following commands sequentially. 
  # make bzImage                (CAPITAL I letter in bzImage)
  This will take some time.
        
  # make modules
  This will also takes some more time.

  # make modules_install

  # make install
  This copies the images and other files and changes the grub. So, no need to 
do any more from your side.

8. Then, reboot the system and select the new kernel image from the GRUB 
options and ENJOY.

> To boot my system do i really need to built the initrd file? shall i
> use the existing initrd file which is there in my running PC?

As for as I know, the initrd is a initial root file system which helps the 
booting process and some of the modules are loaded from this initrd only. 
Suppose, in case of USB modules the USB CORE ( USB STACK) modules are loaded 
from this initrd only and this is applied for only the latest fedora 
distributions like Fedora 8 onwards. Suppose, if we need to change anything in 
the USB core modules, then we need to change the files and build the KO files, 
then copy them to the /lib/modules directory (respective directory) and build 
the initrd file. Then, boot from this newly build initrd file. Now, you can see 
your modifications.

Please feel free to ask any kernel compilation questions. I know about Ubuntu 
also.

Regards,
Srinivas G

N�����r��y����b�X��ǧu�ޙ���+a�{.n�+���z�ޖw�n'����j�b�ye�{������z��v�^�m���z�ޖw�n'���?

Reply via email to