| 1 | = Building a Kernel for Barrett Products and Ubuntu 14.04 = |
| 2 | |
| 3 | == Notice - Pre-release instructions == |
| 4 | 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. |
| 5 | |
| 6 | == Version Info == |
| 7 | |
| 8 | Ubuntu Version: 14.04.1 |
| 9 | |
| 10 | Kernel Version: 3.14.17 |
| 11 | |
| 12 | Xenomai Version: 2.6.4 |
| 13 | |
| 14 | == Building Xenomai Packages == |
| 15 | |
| 16 | Install Prereq's: |
| 17 | {{{ |
| 18 | sudo apt-get update |
| 19 | sudo apt-get install devscripts debhelper dh-kpatches findutils autotools-dev autoconf automake libtool |
| 20 | }}} |
| 21 | |
| 22 | Get and unpack the tar.bz2 archive: |
| 23 | {{{ |
| 24 | wget http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2 |
| 25 | tar -jxf xenomai-2.6.4.tar.bz2 |
| 26 | cd xenomai-2.6.4 |
| 27 | debuild -uc -us |
| 28 | }}} |
| 29 | |
| 30 | Install the packages |
| 31 | {{{ |
| 32 | cd |
| 33 | sudo dpkg -i *.deb |
| 34 | }}} |
| 35 | |
| 36 | == Patching the Kernel == |
| 37 | |
| 38 | Install Prereq's: |
| 39 | {{{ |
| 40 | sudo apt-get install kernel-package libncurses-dev fakeroot zlib1g-dev |
| 41 | }}} |
| 42 | |
| 43 | Locate and copy the correct ipipe patch from Xenomai: |
| 44 | {{{ |
| 45 | 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 |
| 46 | }}} |
| 47 | |
| 48 | Download the kernel source archive and extract: |
| 49 | {{{ |
| 50 | wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.17.tar.xz |
| 51 | tar -xf linux-3.14.17.tar.xz |
| 52 | cd linux-3.14.17 |
| 53 | }}} |
| 54 | |
| 55 | Patch the Kernel!! :D |
| 56 | {{{ |
| 57 | /usr/src/xenomai-kernel-source/scripts/prepare-kernel.sh --arch=amd64 --linux=. --adeos=../ipipe-core-3.14.17-x86-4.patch |
| 58 | }}} |
| 59 | |
| 60 | == Update kernel config for Realtime == |
| 61 | |
| 62 | Update config as follows... |
| 63 | {{{ |
| 64 | make menuconfig |
| 65 | }}} |
| 66 | |
| 67 | -> General setup |
| 68 | -> Auditing support |
| 69 | -> Enable system-call auditing support - DISABLE |
| 70 | |
| 71 | -> Real-time sub-system |
| 72 | -> Nucleus |
| 73 | -> Size of the system heap (Kb) - Set to 16384 |
| 74 | -> Shared interrupts - ENABLE |
| 75 | -> Drivers |
| 76 | -> Serial Drivers |
| 77 | -> 16550A UART driver - ENABLE |
| 78 | -> CAN drivers |
| 79 | -> RT-Socket-CAN, CAN raw socket interface - ENABLE |
| 80 | -> Phillips SJA1000 CAN controller - ENABLE |
| 81 | -> Standard ISA controllers - ENABLE for PC/104 only |
| 82 | -> PEAK PCI Card - ENABLE for external PC only |
| 83 | -> Real-time IPC drivers |
| 84 | -> RTIPC protocol family - LEAVE ALONE (DISABLE for non-IPC) |
| 85 | |
| 86 | -> Processor type and features |
| 87 | -> Intel Low Power Subsystem Support - DISABLE |
| 88 | -> Linux guest support - DISABLE |
| 89 | -> Memtest - DISABLE |
| 90 | -> Processor family - Set to Core 2/newer Xeon |
| 91 | |
| 92 | -> Power management and ACPI options |
| 93 | -> Power Management Debug Support |
| 94 | -> Test suspend/resume and wakealarm during bootup - ENABLE |
| 95 | -> Enable workqueue power-efficient mode by default - DISABLE |
| 96 | -> ACPI (Advanced Configuration and Power Interface) Support |
| 97 | -> Processor - DISABLE |
| 98 | -> PCI slot detection driver - DISABLE |
| 99 | -> Memory Hotplug - DISABLE |
| 100 | -> Boottime Graphics Resource Table support - DISABLE |
| 101 | -> ACPI Platform Error Interface (APEI) |
| 102 | -> APEI Error Record Serialization Table (ERST) Debug Support - MODULE |
| 103 | -> Extended Error Log support - DISABLE |
| 104 | -> CPU Frequency scaling |
| 105 | -> CPU Frequency scaling - DISABLE |
| 106 | -> CPU Idle |
| 107 | -> CPU idle PM support - DISABLE |
| 108 | |
| 109 | -> Bus options (PCI etc.) |
| 110 | -> PCI support |
| 111 | -> PCI Express Port Bus support |
| 112 | -> PCI Express ASPM control |
| 113 | -> Debug PCI Express ASPM - DISABLE |
| 114 | -> Enable PCI resource re-allocation detection - DISABLE |
| 115 | -> Support for PCI Hotplug |
| 116 | -> ACPI PCI Hotplug driver - DISABLE |
| 117 | |
| 118 | -> Device Drivers |
| 119 | -> Input device support |
| 120 | -> Miscellaneous devices |
| 121 | -> PC Speaker support - DISABLE |
| 122 | |
| 123 | == Build the Kernel == |
| 124 | {{{ |
| 125 | CONCURRENCY_LEVEL=8 fakeroot make-kpkg --initrd --append-to-version -xenomai-2.6.4 kernel_image kernel_headers |
| 126 | }}} |
| 127 | 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. |