Building Kernel 3.10.32 with Xenomai 2.6.4 for Ubuntu 12.04.5
Notes
Useful References:
https://sites.google.com/site/drckmu/simulation/xenomai http://support.barrett.com/wiki/BuildingAPC/Precise64Install
Ubuntu Version: 12.04.5 Kernel Version: 3.10.32 Xenomai Version: 2.6.4
These instructions assume that you start from the home directory.
Building Xenomai Packages
Install Prereq's:
apt-get install devscripts debhelper dh-kpatches findutils apt-get install devscripts debhelper dh-kpatches autotools-dev autoconf automake libtool
Get and unpack the tar.bz2 archive:
wget -O - http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2 | tar -jxf - cd xenomai-2.6.4 DEBEMAIL="your@email" DEBFULLNAME="Your Name" debchange -v 2.6.4 Release 2.6.4 debuild -uc -us
Install the packages
cd dpkg -i *.deb
Building a patched Linux kernel package
Install Prereq's:
apt-get install kernel-package libncurses-dev fakeroot zlib1g-dev
Locate and copy the correct ipipe patch from Xenomai:
cp /usr/src/xenomai-2.6.4/ksrc/arch/x86/patches/ipipe-core-3.10.32-x86-4.patch ~/ipipe-core-3.10.32-x86-4.patch
Download the kernel source archive and extract:
wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.10.32.tar.xz tar -xf linux-3.10.32.tar.xz && cd linux-3.10.32
Patch the Kernel!! :D
/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh --arch=amd64 --linux=. --adeos=../ipipe-core-3.10.32-x86-4.patch
Recycle an old realtime config:
cp /your/old/linux/config .config
If you want to only change settings that aren't already defined (most if not all of the defaults for new params are ok, but AUDITSYSCALL and KGDB should be disabled, and be careful of anything to do with IRQ's):
make oldconfig
If you want the graphical interface to make changes:
make menuconfig
Build the Kernel:
CONCURRENCY_LEVEL=8 fakeroot make-kpkg --initrd --append-to-version -xenomai-2.6.4 --revision 1.0 kernel_image kernel_headers
Image and Headers will be in the home directory. Follow the steps at http://support.barrett.com/wiki/BuildingAPC/Precise64Install2 to complete the PC installation.