Monday, March 1, 2010

Kernel Compilation

# cd /usr/src/linux-2.6.18.8/
# cp ./.config ../kernel.2.6.18.8.config
# make clean
# make mrproper
# cp ../kernel.2.6.18.8.config ./.config

yum install ncurses-devel

make mrproper
make oldconfig
make menuconfig
make
make modules_install
make install

or

make bzImage
bzImage inside arch/i386/boot

make modules.

make modules_install.


It will install three files into /boot directory as well as modification to your kernel grub configuration file:

    * System.map-2.6.25
    * config-2.6.25
    * vmlinuz-2.6.25

# cd /boot
# mkinitrd -o initrd.img-2.6.25 2.6.25



make -j bzImage
make -j modules
make -j modules-Install

j=2*cpu no

sh /usr/src/linux-2.6.32.3/arch/x86/boot/install.sh 2.6.32.3 arch/x86/boot/bzImage \
                System.map "/boot"


====================================================
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-53.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
        initrd /initrd-2.6.18-53.el5.img


title new
        root (hd0,0)
        kernel /mynewkernel ro root=/dev/hda3

====================================================





http://tldp.org/HOWTO/Module-HOWTO/copyright.html
https://www.linuxquestions.org/questions/slackware-14/cant-make-menuconfig-as-non-root-ncurses-not-found-543858/
http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html
http://www.linuxchix.org/content/courses/kernel_hacking/lesson4
http://bobcares.com/blog/?p=162









No comments:

Post a Comment

 Linux Interview  Linux booting process EXT4 XFS file system runlevel scan disk hba driver systool -c fc_host lspci -nn | grep -i hba single...