After doing some minor testing, it seems to be running fine. Keep in mind that I've never done Linux kernel development before, so it could be that what the code does is wrong is some way, or could be improved. I welcome any suggestions or fixes!
Depending on the kernel configuration, the patch will use one of two clock sources for updating the timestamp counter. If power management is enabled, the 1MHz System Timer will be used. If power management is disabled, the ARM Timer, configured to run at 250MHz, will be used instead. Keep in mind that the ARM Timer’s clock is derived from the system clock. Since power management can dynamically change the system clock, the ARM Timer is only used if power management is disabled. See section 14 of the BCM2835 ARM Peripherals guide for more details.
To compile:
1. Get Chris Boot's rpi-3.2.21 branch (https://github.com/bootc/linux/tree/rpi-3.2.21).
2. Apply the Xenomai 2.6.1 patch:
Code: Select all
$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
Code: Select all
cd $linux_tree
patch -p1 < rpi-linux-3.2.21-xenomai-2.6.1.patch
I compiled it with the cross compilers from https://github.com/raspberrypi/tools.
Ian
P.S. Thanks to Juan for providing the hardware!