OS: CentOS5.6
Kernel: 2.6.18-238.5.1-el5
- Download Kernel RPM Source from CentOS website link
- Install RPMS file "rpm -ivh kernel-2.6.18-238.5.1.el5.src.rpm"
(many warning "user mockbuild does not exist is normal") - cd /usr/src/redhat/SPECS
- rpmbuild -bp kernel-2.6.spec #Run the patch for kernel source
- cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386
- nano Makefile #Update "EXTRAVERSION = -238.netatalk" (Optional)
- make menuconfig
- Update your config e.g. Networking -> Networking options -> Appletalk protocol support
- make all
- make rpm #RPM fine will stored in "/usr/src/redhat/RPMS/i386/"
- rpm -ivh kernel-2.6.18-238.5.1.netatalk.rpm #install rpm kernel
- /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install 2.6.18-238.netatalk #Update Grub config and create initrd image, "-238.netatalk" is the EXTRAVERSION setting from the SPECS file, which is part of kernel modules directory name, you can check the /lib/modules/ to find correct directory name.