Her is how you can build the kernel and kernel modules. This is tested on Ubuntu 8.10, gcc version 4.3.2
1: Download and install the toolchain form Irex:
Code:
cd /tmp
wget http://developer.irexnet.com/pub/iLiad/Linux%20kernel/cross-2.95.3.tar.bz2
tar xvfj cross-2.95.3.tar.bz2
#location is important: path is compiled in binaries
sudo mkdir /usr/local/arm
sudo mv 2.95.3 /usr/local/arm/2.95.3
2: Download the kernel sources
Code:
# Last-Modified: Thu, 22 Feb 2007 16:28:15 GMT
wget http://developer.irexnet.com/pub/iLiad/Linux%20kernel/linux-2.4.19-rmk7-pxa2-irex1.tar.bz2
tar xvfj linux-2.4.19-rmk7-pxa2-irex1.tar.bz2
3: Apply patch(es)
Code:
cd linux-2.4.19-rmk7-pxa2-irex1
# big patch, probably already applied? gives warnings if tried...
# Last-Modified: Thu, 22 Feb 2007 16:28:11 GMT
wget http://developer.irexnet.com/pub/iLiad/Linux%20kernel/linux-2.4.19-rmk7-pxa2-irex1.patch.gz
# small patch for 2.11
# Last-Modified: Thu, 04 Oct 2007 08:45:48 GMT
wget http://developer.irexnet.com/pub/iLiad/Linux%20kernel/linux-2.4.19-rmk7-pxa2-irex1-v2.11.patch
# apply patch
patch -p0 < linux-2.4.19-rmk7-pxa2-irex1-v2.11.patch
4: Set the right PATH to activate the right compilers . The order is important! Check that gcc --version shows your local compiler
and arm-linux-gcc --version shows 2.95.3
Code:
export PATH=$PATH:/usr/local/arm/2.95.3/bin
5: Provide depmod.old (make install complains about a missing /sbin/depmod.old)
Code:
sudo ln -s /sbin/depmod /sbin/depmod.old
6: Build everything
Code:
# this copies the right kernel configuration to .config
# (arch/arm/def-configs/irex?)
make irex_config
make oldconfig # sets things with the settings in .config
make dep # creates files with dependencies
make zImage # create the kernel
make modules # builds the modules
7: Group all results in a handy place, (not in /boot and /lib/modules...)
Code:
mkdir /tmp/irex_stuff
make INSTALL_PATH=/tmp/irex_stuff install
make INSTALL_MOD_PATH=/tmp/irex_stuff modules_install
8: Compile a kernel module
Example: the Irex button driver from
http://developer.irexnet.com/pub/iLi...drivers.tar.gz
Code:
cd /tmp
tar xvfz irex_er0100_kernel_drivers.tar.gz
cd button
export PATH=$PATH:/usr/local/arm/2.95.3/bin
make KERNEL_PATH=/tmp/linux-2.4.19-rmk7-pxa2-irex1
Enjoy!