/rpi4-preemptrt-prebuilt

This is a repository to apply real-time on Raspberry Pi 4 using pre-built Preempt-rt kernel.

(Pre-built) Raspberry Pi 4 Preempt-RT Patch

These steps will help you through the installation of preempt-rt on the Raspberry Pi 4. The kernel that is used is the 4.19.86 linux kernel.

  • This is a simplified version of rpi4-preemptrt repository.
  • It contains additional support as an option to use W5500 Ethernet network driver for users who need extra ethernet port on raspberry pi.

Requirements:

  • Raspberry Pi 4
  • (Option) WIZnet W5500 Ethernet chip with SPI interface

Create a new raspbian image on the micro-SDcard with the Pi imager. Use the file on the link below.
2020-02-13-raspbian-buster.zip


A. Installing the preempt-rt on the Raspberry pi

  1. Download the pre-built kernel
pi@raspberrypi:~$ cd /tmp
pi@raspberrypi:/tmp$ wget -O RTkernel_W5500.tgz https://github.com/shkwon98/rpi4-preemptrt-prebuilt/blob/main/RTkernel_W5500.tgz?raw=true
  1. Inside the raspberry pi, unpack the .tgz and copy it
pi@raspberrypi:/tmp$ tar xzf RTkernel_W5500.tgz
pi@raspberrypi:/tmp$ cd boot
pi@raspberrypi:/tmp/boot$ sudo cp -rd * /boot/
pi@raspberrypi:/tmp/boot$ cd ../lib
pi@raspberrypi:/tmp/lib$ sudo cp -rd * /lib/
pi@raspberrypi:/tmp/lib$ cd ../overlays
pi@raspberrypi:/tmp/overlays$ sudo cp -d * /boot/overlays
pi@raspberrypi:/tmp/overlays$ cd ..
pi@raspberrypi:/tmp$ sudo cp -d bcm* /boot/
  1. Edit the boot configutarion
pi@raspberrypi:/tmp$ sudo nano /boot/config.txt

Add in the beginning:

kernel=kernel7l.img

(Option) Type in the last line:

dtoverlay=w5500
  1. Reboot and check the patched kernel
pi@raspberrypi:/tmp$ sudo reboot
pi@raspberrypi:~$ uname -r

BENCHMARK: