0% found this document useful (0 votes)
78 views2 pages

Kernel Compilation

The document outlines 11 steps to compile a modified Linux kernel source code: 1) Obtain the latest Linux kernel source code, 2) Extract the tarball, 3) Modify the Makefile, 4) Clean existing files, 5) Configure the kernel, 6) Compile the kernel, 7) Install the kernel files, 8) Create an initrd image, 9) Update the GRUB configuration, 10) Reboot to load the new kernel, and 11) Verify the new kernel is running.

Uploaded by

Nipun Kanade
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views2 pages

Kernel Compilation

The document outlines 11 steps to compile a modified Linux kernel source code: 1) Obtain the latest Linux kernel source code, 2) Extract the tarball, 3) Modify the Makefile, 4) Clean existing files, 5) Configure the kernel, 6) Compile the kernel, 7) Install the kernel files, 8) Create an initrd image, 9) Update the GRUB configuration, 10) Reboot to load the new kernel, and 11) Verify the new kernel is running.

Uploaded by

Nipun Kanade
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

2.

4 Compiling the modified Linux source


To study the scheduler, it is necessary to have a separate kernel image than working in the original Linux. If any problems occur while modifying the code then original Linux will get crash. Following steps are used to configure, compile, install and update the kernel. Step # 1 Get the Linux kernel code The latest source code is available in http://kernel.org. linux-2.6.31.5.tar.bz2 is used for this assignment. Step # 2 Extract tar (.tar.bz2) file Type the following command: $sudo tar -xjvf linux-2.6.31.5.tar.bz2 Step # 3 Modification in Makefile Changes made in Makefile of field EXTRAVERSION: .5_shivaprasad_mod. Before the compilation of the kernel, changes are made in Makefile in linux-2.6.31.5 folder. Step # 4 clean the runnable files and previous configured files $ sudo make clean $ sudo make mrproper Step # 5 To Configure kernel $ sudo make menuconfig Two options are need to be modified in menuconfig. Disable SMP. Change user id in Basic for grouping task. Step # 6 Compile kernel Start compiling a compressed kernel image, enter: $ sudo make Start compiling kernel modules: $ sudo make modules Install kernel modules:

$sudo make modules_install Step # 7 Install kernel $sudo make install Make install command will install three files into /boot directory as well as modification to kernel grub configuration file: System.map-2.6.31.5_shivaprasad_mod config-2.6.31.5_shivaprasad_mod vmlinuz-2.6.31.5_shivaprasad_mod Step # 8: Create an initrd image $sudo update-initramfs c k 2.6.31.5_shivaprasad_mod Step # 9: Update Grub configuration file $sudo update-grub Step # 10: Reboot computer to get a modified kernel in the grub loader Step # 11: Verification of kernel in the modified kernel $uname a

You might also like