This guide is valid for the RaspberryPi 1.
- In your linux PC home directory create a rpi_kernel directory:
cd ~/rpi_kernel
- Download the raspberry tools:
- Add the bin folder to PATH:
- Download kernel sources:
- Download the RT patch:
- Apply the patch:
KERNEL=kernel
cat ../patch-4.4.XX-rtYY.patch | patch -p1
- Make an RPi default configuration:
- Enabling the FULL PREEMPTIBLE KERNEL:
- Compiling the kernel:
- To install kernel and modules on your Raspberry follow the official guide from: Install directly onto the SD card
Source: https://www.raspberrypi.org/documentation/linux/kernel/building.md