I recently noticed that the Raspbian update on Pi5 installs version 6.6.20+rpt-rpi-2712.
Therefore I thought about updating the PREEMPT_RT version
So I started with a fresh installation of the Raspberry Pi OS 64 bit via Raspberry Pi Imager.
I updated to version 6.6.20 with the usual commands:
sudo apt update
sudo apt upgrade
and I rebooted.
The
uname -a command now returns the following indication
Linux raspberrypi5 6.6.20+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.20-1+rpt1 (2024-03-07) aarch64 GNU/
I then compiled a new version of the Raspbian OS that included the PREEMPT_RT
For convenience I used the procedure here
forums.raspberrypi.com/viewtopic.php?t=343387
The kernel with the PREEMPT_RT is kernel-6.6.21-v8-16k-elv.zip
and can be downloaded from here
drive.google.com/file/d/1FKLQIBdXTh43kjC...48d/view?usp=sharing
To install it, just copy it to /tmp and then run these commands
cd /
sudo unzip /tmp/kernel-6.6.21-v8-16k-elv.zip
overwriting all files with the All option
So I edited the cmdline.txt with
sudo nano "/boot/firmware/cmdline.txt"
adding the following commands to the end of the line
isolcpus=2.3 rcu_nocbs=2.3 nohz_full=2.3 max.processor.cstate=1
At the next reboot the
uname -a command reports the following indication
Linux raspberrypi5 6.6.21-rpi999-rpi-2712 #1 SMP PREEMPT_RT Tue Mar 12 15:59:56 CET 2024 aarch64 GNU/Linux
To install linuxcnc simply type the following commands
sudo apt update
sudo apt install linuxcnc-uspace linuxcnc-uspace-dev
However, to date the installed version is the following
LINUXCNC - 2.9.0~pre1+git20230208.f1270d6ed7
If you want version 2.9.2 you can do it this way:
cd /tmp
wget
linuxcnc.org/dists/bookworm/2.9-uspace/b...pace_2.9.2_arm64.deb
wget
linuxcnc.org/dists/bookworm/2.9-uspace/b...-dev_2.9.2_arm64.deb
wget
linuxcnc.org/dists/bookworm/2.9-uspace/b...doc-en_2.9.2_all.deb
sudo apt install ./linuxcnc-uspace_2.9.2_arm64.deb
sudo apt install ./linuxcnc-uspace-dev_2.9.2_arm64.deb
sudo apt install ./linuxcnc-doc-en_2.9.2_all.deb
The result of the latency-histogram (latency-histogram --nobase --sbinsize 1000 --show --servo 35000) is however always very interesting
For those who do not want to retrace all the steps previously exposed, you can find the ready-made image (Lcnc292_pi5.img) here:
drive.google.com/file/d/1dd8oiYhcs_UComc...fNF/view?usp=sharing