Building a rt-preempt kernel for Debian Jessie - x86-amd64
There are currently no stock Debian rt-preempt kernels available for Debian Jessie. Building your own is not difficult providing you have a full development system installed. The sample instructions below cover the building of kernel 3.8.11 with rt patch no 7
The best way to approach this is to:
-
Go to www.kernel.org/pub/linux/kernel/projects/rt/ and select the latest stable patch
-
Then download the matching vanilla kernel from www.kernel.org
-
Substitute the kernel version you have for 3.8.11 and the rt-patch version you have for 3.8.11-rt7 in the below instructions
-
Cut and Paste this config to a file called .config in the root directory of the kernel sources. Meaning the
linux-3.18.11
directory that got created after unpacking. All the recent rt x86-amd64 patches up to kernel 4.4.9 have been tested and all worked well.
Commands from a terminal
-
Commands below should be replaced with the kernel you looked for in the instructions above.
cd ~
sudo apt-get install build-essential libncurses5-dev
mkdir rtlinux
cd rtlinux
wget -c ftp://ftp.kernel.org/pub/linux/kernel/v3.x/linux-3.18.11.tar.xz
wget -c https://www.kernel.org/pub/linux/kernel/projects/rt/3.18/patch-3.18.11-rt7.patch.gz
tar -xpf linux-3.18.11.tar.xz
gunzip patch-3.18.11-rt7.patch.gz
cp patch-3.18.11-rt7.patch linux-3.18.11
cd linux-3.18.11
cat patch-3.18.11-rt7.patch | patch -p1
make menuconfig
-
this will make a screen like this one below pop-up
.config - Linux/x86 3.18.11 Kernel Configuration
──────────────────────────────────────────────────────────────────────────────
┌──────────────── Linux/x86 3.18.11 Kernel Configuration ─────────────────┐
│ Arrow keys navigate the menu. <Enter> selects submenus ---> (or empty │
│ submenus ----). Highlighted letters are hotkeys. Pressing <Y> │
│ includes, <N> excludes, <M> modularizes features. Press <Esc><Esc> to │
│ exit, <?> for Help, </> for Search. Legend: [*] built-in [ ] │
│ ┌─────────────────────────────────────────────────────────────────────┐ │
│ │ [*] 64-bit kernel │ │
│ │ General setup ---> │ │
│ │ [*] Enable loadable module support ---> │ │
│ │ [*] Enable the block layer ---> │ │
│ │ Processor type and features ---> │ │
│ │ Power management and ACPI options ---> │ │
│ │ Bus options (PCI etc.) ---> │ │
│ │ Executable file formats / Emulations ---> │ │
│ │ [*] Networking support ---> │ │
│ │ Device Drivers ---> │ │
│ └────┴(+)─────────────────────────────────────────────────────────────┘ │
├─────────────────────────────────────────────────────────────────────────┤
│ <Select> < Exit > < Help > < Save > < Load > │
└─────────────────────────────────────────────────────────────────────────┘
-
if you want an amd64 kernel, check the 64-bit kernel box
-
press 2x <ESC> to exit
-
then continue
make -j$(nproc)
-
go and have a coffee. When finished do:
sudo make modules_install
sudo make install