cd ~/ wget http://download.gna.org/xenomai/stable/xenomai-2.6.1.tar.bz2 tar -xvf xenomai-2.6.1.tar.bz2 export xenomai_root=~/xenomai-2.6.1 rm xenomai-2.6.1.tar.bz2 wget http://web.barrett.com/support/WAM_Installer/ipipe-core-3.2.0-x86-barrett.patch wget http://kernel.ubuntu.com/~kernel-ppa/configs/precise/amd64-config.flavour.generic sudo apt-get install fakeroot build-essential crash kexec-tools makedumpfile kernel-wedge kernel-package sudo apt-get build-dep linux sudo apt-get install git-core libncurses5 libncurses5-dev libelf-dev asciidoc binutils-dev sudo apt-get build-dep --no-install-recommends linux-image-3.2.0-26-generic-pae apt-get source linux-image-3.2.0-26-generic-pae # or 64-bit sudo apt-get build-dep --no-install-recommends linux-image-3.2.0-23-generic apt-get source linux-image-3.2.0-23-generic mkdir new_kernel cd ~/new_kernel tar xvf ../linux_3.2.0.orig.tar.gz cd linux-3.2 export linux_tree=~/new_kernel/linux-3.2/ gunzip /home/robot/linux_3.2.0-27.43.diff.gz -c | patch -p1 $xenomai_root/scripts/prepare-kernel.sh --linux=$linux_tree --arch=i386 or amd64 --adeos=~/ipipe-core-3.2.0-x86-barrett.patch cp ../../i386-config.flavour.generic-pae .config # or 64-bit cp ../../amd64-config.flavour.generic .config make menuconfig #Enable / Disable like so: Processor type/features: * Processor family => Core2 * 64 - gerneic-x86-64 * no Enable -fstack-protector buffer overflow detection (EXPERIMENTAL) Power management: * no APM - 32 bit * no ACPI * no CPU Frequency scaling - * no CPU idle PM Support Device Drivers: * Input Device Support: Miscellaneous devices: no PC speaker support Real-time sub-system: * add Shared interrupts * add Machine:SMI:Enable SMI Workaround * add Drivers:Serial:16550A UART driver * add Drivers:CAN:RT-Socket-CAN, CAN raw socket Next we must edit the following options by hand in our .config vim .config disable the following ie. # ... is not set CONFIG_PROFILING CONFIG_KGDB CONFIG_AUDITSYSCALL CONFIG_HAVE_SPARSE_IRQ CONFIG_SPARSE_IRQ CONFIG_DEBUG_KERNEL // FOR 64-BIT additionally CONFIG_CPU_IDLE #save and quit export CONCURRENCY_LEVEL=5 fakeroot make-kpkg --initrd --append-to-version=-xenomai-2.6.1 kernel-image kernel-headers Answer *no* to two questions asked. Debians should now be in ~/new_kernel