- Raspian 12 Bookworm version on Raspberry Pi 4
As reported here
linuxcnc.org/docs/devel/html/getting-sta...lling_on_raspbian_12
I prepared a microSD card with the latest version of Raspbian to use on both Raspberry Pi4 and Pi5 and then evaluate the differences
After up to date with the latest packages, I moved on to install the patch for the PREEMPT_RT.
It must be said that I didn't use the command
sudo apt-get install linux-image-rt-arm64
in addition to the fact that the available version is not aligned with the version of the operating system and that in any case (having tried directly) despite the installation being completed without errors, it does not produce any effect.
In my opinion this is due to the fact that the procedure installs the files in /boot rather than in /boot/firmware.
packages.debian.org/bookworm/arm64/linux...13-rt-arm64/filelist
Therefore I followed the Kevin Doren procedure mentioned above.
It should be noted, as reported in the link above, that the installation instructions currently require changes for debian bookworm that expects the files to be copied into directory /boot/firmware/ instead of /boot/
Verify the correct installation with the command
pi@raspberrypi4:~ $ uname -a
Linux raspberrypi4 6.1.54-rt15-v8+ #1 SMP PREEMPT_RT Fri Sep 29 08:29:09 BST 2023 aarch64 GNU/Linux
Then I added "isolcpus=2,3 max.processor.cstate=1" to /boot/cmdline.txt (for latency issues)
Installing Linuxcnc can be done easily with the LinuxCNC installer script
www.linuxcnc.org/linuxcnc-install.sh
The result of the latency test (latency-histogram --nobase --sbinsize 1000 --servo 40000)
is the following
Then I verified that the hal_pi_gpio and hal_gpio modules load without error.
pi@raspberrypi4:~ $ halrun -I
halcmd: loadrt hal_gpio inputs=GPIO6,GPIO12,GPIO13,GPIO16,GPIO17,GPIO18,GPIO19 \
halcmd+: outputs=GPIO20,GPIO21,GPIO22,GPIO23,GPIO24,GPIO25,GPIO26,GPIO27 \
halcmd+: invert=GPIO20,GPIO27 \
halcmd+: reset=GPIO21,GPIO22
Note: Using POSIX realtime
halcmd: show pin
Component Pins: Owner Type Dir Value Name
4 bit OUT FALSE hal_gpio.GPIO12-in
4 bit OUT FALSE hal_gpio.GPIO12-in-not
4 bit OUT FALSE hal_gpio.GPIO13-in
4 bit OUT FALSE hal_gpio.GPIO13-in-not
4 bit OUT FALSE hal_gpio.GPIO16-in
4 bit OUT FALSE hal_gpio.GPIO16-in-not
4 bit OUT FALSE hal_gpio.GPIO17-in
4 bit OUT FALSE hal_gpio.GPIO17-in-not
4 bit OUT FALSE hal_gpio.GPIO18-in
4 bit OUT FALSE hal_gpio.GPIO18-in-not
4 bit OUT FALSE hal_gpio.GPIO19-in
4 bit OUT FALSE hal_gpio.GPIO19-in-not
4 bit IN FALSE hal_gpio.GPIO20-out
4 bit IN FALSE hal_gpio.GPIO21-out
4 bit IN FALSE hal_gpio.GPIO22-out
4 bit IN FALSE hal_gpio.GPIO23-out
4 bit IN FALSE hal_gpio.GPIO24-out
4 bit IN FALSE hal_gpio.GPIO25-out
4 bit IN FALSE hal_gpio.GPIO26-out
4 bit IN FALSE hal_gpio.GPIO27-out
4 bit OUT FALSE hal_gpio.GPIO6-in
4 bit OUT FALSE hal_gpio.GPIO6-in-not
4 s32 OUT 0 hal_gpio.read.time
4 s32 OUT 0 hal_gpio.reset.time
4 s32 OUT 0 hal_gpio.write.time
However, this microSD is not compatible with the Raspberry Pi 5, due to the PREEMPT_RT patch which is not compatible.
Therefore I had to prepare a new microSD for the new Raspberry.