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 [Link] [Link].bz2 is used for this assignment. Step # 2 Extract tar (.tar.bz2) file Type the following command: $sudo tar -xjvf [Link].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-[Link] 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: [Link]-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