Building a Kernel for Barrett Products and Ubuntu 14.04

Notice - Pre-release instructions

This software has not been fully tested. It is meant for use with external PC's only (not the WAM's internal PC/104). We recommend using a standard OS and Kernel that ship with Barrett's products.

Version Info

Ubuntu Version: 14.04.1

Kernel Version: 3.14.17

Xenomai Version: 2.6.4

Building Xenomai Packages

Install Prereq's:

sudo apt-get update
sudo apt-get install devscripts debhelper dh-kpatches findutils autotools-dev autoconf automake libtool

Get and unpack the tar.bz2 archive:

wget https://xenomai.org/downloads/xenomai/stable/xenomai-2.6.4.tar.bz2
tar -jxf xenomai-2.6.4.tar.bz2
cd xenomai-2.6.4
debuild -uc -us

Install the packages

cd
sudo dpkg -i *.deb

Patching the Kernel

Install Prereq's:

sudo apt-get install kernel-package libncurses-dev fakeroot zlib1g-dev

Locate and copy the correct ipipe patch from Xenomai:

cp /usr/src/xenomai-kernel-source/ksrc/arch/x86/patches/ipipe-core-3.14.17-x86-4.patch ~/ipipe-core-3.14.17-x86-4.patch

Download the kernel source archive and extract:

wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.17.tar.xz
tar -xf linux-3.14.17.tar.xz
cd linux-3.14.17

Patch the Kernel!! :D

/usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh --arch=amd64 --linux=. --adeos=../ipipe-core-3.14.17-x86-4.patch

Update kernel config for Realtime

Update config as follows...

make menuconfig
-> General setup
   -> Auditing support
      -> Enable system-call auditing support - DISABLE

-> Real-time sub-system
   -> Nucleus
      -> Size of the system heap (Kb) - Set to 16384
      -> Shared interrupts - ENABLE
   -> Drivers
      -> Serial Drivers
         -> 16550A UART driver - ENABLE
      -> CAN drivers
         -> RT-Socket-CAN, CAN raw socket interface - ENABLE
            -> Phillips SJA1000 CAN controller - ENABLE
               -> Standard ISA controllers - ENABLE for PC/104 only
               -> PEAK PCI Card - ENABLE for external PC only
      -> Real-time IPC drivers
         -> RTIPC protocol family - LEAVE ALONE (DISABLE for non-IPC)

-> Processor type and features
   -> Intel Low Power Subsystem Support - DISABLE
   -> Linux guest support - DISABLE
   -> Memtest - DISABLE
   -> Processor family - Set to Core 2/newer Xeon

-> Power management and ACPI options
   -> Power Management Debug Support
      -> Test suspend/resume and wakealarm during bootup - ENABLE
   -> Enable workqueue power-efficient mode by default - DISABLE
   -> ACPI (Advanced Configuration and Power Interface) Support
      -> Processor - DISABLE
      -> PCI slot detection driver - DISABLE
      -> Memory Hotplug - DISABLE
      -> Boottime Graphics Resource Table support - DISABLE
      -> ACPI Platform Error Interface (APEI)
         -> APEI Error Record Serialization Table (ERST) Debug Support - MODULE
      -> Extended Error Log support - DISABLE
   -> CPU Frequency scaling
      -> CPU Frequency scaling - DISABLE
   -> CPU Idle
      -> CPU idle PM support - DISABLE

-> Bus options (PCI etc.)
   -> PCI support
      -> PCI Express Port Bus support
         -> PCI Express ASPM control
            -> Debug PCI Express ASPM - DISABLE
      -> Enable PCI resource re-allocation detection - DISABLE
   -> Support for PCI Hotplug
      -> ACPI PCI Hotplug driver - DISABLE

-> Device Drivers
   -> Input device support
      -> Miscellaneous devices
         -> PC Speaker support - DISABLE

Build the Kernel

CONCURRENCY_LEVEL=8 fakeroot make-kpkg --initrd --append-to-version -xenomai-2.6.4 kernel_image kernel_headers

Image and Headers will be in the home directory. Follow the steps at http://support.barrett.com/wiki/BuildingAPC/14-04-1_64_Install to complete the PC installation.

Last modified 4 years ago Last modified on Jan 20, 2021, 8:04:22 PM