Prepare and Customize Endian Kernel

Install the repo

http://repo.opensource-sw.net/efw/

cd ~
   uname -a # take note of the current kernel version (write it down!)
   efw-upgrade -s # Upgrade to Bleeding Edge Dev channel.
   curl -O autoinstall.plesk.com/PSA_9.2.2/update-rpm-RedHat-el4-i386/glibc-devel-2.3.4-2.41.i386.rpm
   curl -O vault.centos.org/4.6/apt/i386/RPMS.os/ncurses-devel-5.4-15.el4.i386.rpm
   
   mkdir -p /usr/src/redhat/SOURCES
   mkdir -p /usr/src/redhat/BUILD
   mkdir -p /usr/src/redhat/RPMS/i386
   mkdir -p /usr/src/redhat/SRPMS/
   
   rpm -i kernel-2.6.32.43-57.e43.src.rpm
   rpm -i ncurses-devel-5.4-15.el4.i386.rpm 
   rpm -i --nodeps glibc-devel-2.3.4-2.41.i386.rpm   # Ignore errors
   
   smart install kernel-headers make patch gcc4 rpm-build m4 glibc-headers gcc

Make GCC4 default:

   cd /usr/bin/
   mv gcc gcc3
   ln -s gcc4 gcc


Prepare the kernel source tree:

   cd /usr/src/redhat/SPECS/
   rpmbuild -bp --target=i686 kernel.spec

cd /usr/src/redhat/BUILD/kernel-2.6.32/linux-2.6.32.i686/

cp /boot/config-2.6.32.43-57.e51.i586 /usr/src/redhat/BUILD/kernel-2.6.32/linux-2.6.32.i686/.config


make oldconfig

make menuconfig

cp .config /usr/src/redhat/SOURCES/kernel-2.6.32.config 

  • Set PAE

 

cd /usr/src/redhat/SPECS

nano kernel.spec

%define buildid .e51

time rpmbuild -bb --target=i686 kernel.spec

RPMS will be available at /usr/src/redhat/RPMS/i686

 

Reference

http://[email protected]:[email protected]/devel/

http://sourceforge.net/projects/addonsefw/files/?source=navbar