http://www.centos.org/modules/newbb/viewtopic.php?viewmode=flat&order=DESC&topic_id=11914&forum=37

useradd -d /usr/local/src/kernels -m -p test kbuild
su - kbuild
3. mkdir -p rpmbuild/{SRPMS,RPMS,SPECS,BUILD,SOURCES} ; echo "%_topdir %(echo $HOME)/rpmbuild" > .rpmmacros
4. wget http://mirror.centos.org/centos/5.1/updates/SRPMS/kernel-2.6.18-53.1.4.el5.src.rpm
rpm -Uvh kernel-2.6.18-53.1.4.el5.src.rpm
5. cd ~/rpmbuild/SPECS ; $ rpmbuild -bp --target=i586 kernel-2.6.spec


Create a user account kbuild with a home directory of /usr/local/src/kernels/. Reserve this account for your kernel building exploits only. Login as kbuild and create the required directory tree:

mkdir -p rpmbuild/{SRPMS,RPMS,SPECS,BUILD,SOURCES}
echo "%_topdir %(echo $HOME)/rpmbuild" > .rpmmacros

Now install the source rpm:

rpm -i http://mirror.centos.org/centos/5/updates/SRPMS/kernel-2.6.18-53.1.4.el5.src.rpm

and prep it:

cd ~/rpmbuild/SPECS
rpmbuild -bp --target=i586 kernel-2.6.spec

You can ignore the numerous errors (471 is a number that currently comes to mind) relating to the user "mockbuild".

Then continue in the fashion I previously described - you will be starting from the section header Configuring your kernel in the Wiki tutorial - replacing i686, where appropriate, with i586.

KERNEL
as kbuild
cd kernel
make menuconfig
make

as root
make modules_install
make install


MADWIFI
as kbuild
cd madwifi
make KERNELPATH=/var/src/kernels/rpmbuild/BUILD/linux-2.6.25.3/ clean
make KERNELPATH=/var/src/kernels/rpmbuild/BUILD/linux-2.6.25.3/

as root
cd madwifi
make KERNELPATH=/var/src/kernels/rpmbuild/BUILD/linux-2.6.25.3/ install


[root@jabu /]# cat tarker

datum=`date '+%Y%m%d%H%M%S'`

prefix=`ls -c /boot/vmlinuz-* | head -n 1 | sed 's/\/boot\/vmlinuz-//g'`
echo ${prefix}

if [ -e /boot/vmlinuz-${1} ]
  then
    prefix=${1}
  else
    if [ -e /boot/vmlinuz-${prefix} ]
        then
            nop=1
        else
            echo "kernel not found"
            exit 1
    fi
fi

archiv=/kernel-${prefix}_$datum.tar

echo $archiv

tar cf $archiv boot/System.map-${prefix}
tar rf $archiv boot/vmlinuz-${prefix}
tar rf $archiv boot/initrd-${prefix}.img
tar rf $archiv lib/modules/${prefix}

cd /boot
tar rf $archiv grub/grub.conf
tar rf $archiv /tarker

cp /lib/modules/${prefix}/build/.config /boot/config-${prefix}
tar rf $archiv /boot/config-${prefix}

Watchdog
Geode LX
http://git.infradead.org/?p=geode.git;a=commitdiff;h=5a840828ddb5bb7381435509a9460e0ba4aab550
http://lkml.org/lkml/2008/2/17/215

tar rf $archiv /usr/local/bin/athstats /usr/local/bin/80211stats /usr/local/bin/athkey /usr/local/bin/athchans /usr/local/bin/athctrl
tar rf $archiv  /usr/local/bin/athdebug  /usr/local/bin/80211debug  /usr/local/bin/wlanconfig  /usr/local/bin/ath_info

May 22 08:37:26 paja kernel: geode-mfgpt:  Registered timer 1
May 22 08:37:27 paja kernel: geodewdt: probe of geodewdt failed with error -16
May 22 08:42:59 paja kernel: wdt: WDT device closed unexpectedly.  WDT will not stop!

initrd
gzip -dc ../initrd-2.6.25.4.Geode-r3.img | cpio -ivd
find . | cpio -c -o | gzip -9 > ../initrd-new

ath9k
iw
hostapd
openssl-devel