Check the mainline or distribution kernel version that is running on your Raspberry Pi device (substitute the Raspberry Pi with any other device you may be running Linux on); for example, on the Raspberry Pi 3B+ I'm using, it's running the stock Raspbian (or Raspberry Pi OS) GNU/Linux 10 (buster) with the 5.4.51-v7+ kernel.
We'd like to build an RTL kernel for the Raspberry Pi with the closest possible matching kernel to the standard one it's currently running; for our case here, with it running 5.4.51[-v7+], the closest available RTL patches are for kernel versions 5.4.y-rt[nn] (https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.4/); we shall come back to this shortly...
Let's go step by step:
- The steps to download the Raspberry Pi specific kernel source tree onto your host system disk have already been covered in Chapter 3, Building the 5.x Linux Kernel from Source – Part 2, in the Kernel...