- Log in into your Raspberry PI.
- Download the Raspberry PI Linux Kernel 3.2.21 via git
git clone --branche=rpi-3.2.21 --depth 1 git://github.com/bootc/linux.git
- Download xenomai 2.6.1
wget http://download.gna.org/xenomai/stable/xenomai-2.6.1.tar.bz2
- Download and apply the raspberry PI Xenomai Patch
http://www.cim.mcgill.ca/~ian/rpi-linux-3.2.21-xenomai-2.6.1.patch
- Copy your current Linux Configuration into your Linux-Kernel-Source-Tree
zcat /proc/config.gz > /path/to/kerneltree/.config
- Comment out some stuff in your Kernel.config, which are good for reducing the latency
# CONFIG_NO_HZ
# CONFIG_CC_STACKPROTECTOR
# XENO_OPT_STATS
Select via make menuconfig:
Go to: "Kernel Features -> Preemption Model" and set "Preemptible Kernel (Low-Latency Desktop)"
- Patch the kernel with the rpi-linux-3.2.21-xenomai-2.6.1.patch
patch -p1 ...
- Apply the xenomai 2.6.1 Patch
$xenomai_root/scripts/prepare-kernel.sh --arch=arm \
--adeos=$xenomai_root/ksrc/arch/arm/patches/ipipe-core-3.2.21-arm-1.patch \
--linux=$linux_tree
- Compile the kernel and the kernel modules (higher priorities with nice could make the compiler process faster)
nice -n -10 make && nice -n -10 make modules
- Copy the Kernel Image into /boot
Sources:
http://www.raspberrypi.org/phpBB3/viewtopic.php?t=12368&p=154691
http://elinux.org/RPi_Kernel_Compilation