RPi 5 with 6.12 PREEMPT_RT = Using POSIX non-realtime
- alangibson
- Offline
- Senior Member
-
- Posts: 68
- Thank you received: 29
echo 'CONFIG_CRASH_DUMP=y' >> .config
echo 'CONFIG_ARCH_SUPPORTS_CRASH_DUMP=y' >> .config
echo 'CONFIG_KEXEC_CORE=y' >> .config
echo 'CONFIG_PROC_KCORE=y' >> .config
echo 'CONFIG_PROC_FS=y' >> .config
echo 'CONFIG_MMU=y' >> .config
Please Log in or Create an account to join the conversation.
- gene_weber
-
- Offline
- Junior Member
-
- Posts: 37
- Thank you received: 14
But all I did (hoped was necessary) was to update the kernel. sudo rpi-update next, thne reboot. Must one actually build the kernel with a patch? That seems odd if the kernel offers full RT support.
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
- Posts: 10928
- Thank you received: 3625
It seems that on the Pi a default 6.12 RT kernel build is not recognised by linuxcnc unless the kernel has additional settings that are provided in the patch. This may end up being fixed by the kernel developers in later versions
This may not be relevant to you but building a custom image that includes Linuxcnc is not trivial and requires building a kernel from source so it needs to be a RT kernel.
Please Log in or Create an account to join the conversation.
- gene_weber
-
- Offline
- Junior Member
-
- Posts: 37
- Thank you received: 14
I gave this a try because I was excited to read that "This release includes realtime support (PREEMPT_RT), a feature that has been in the works for 20 years." So is there a bug in the PREEMPT_RT support in the 6.12 kernel, or is it simply not implemented the way LinuxCNC has come to expect? Obviously LinuxCNC needs to support a working standard.
Please Log in or Create an account to join the conversation.
- rodw
-
- Away
- Platinum Member
-
- Posts: 10928
- Thank you received: 3625
Please Log in or Create an account to join the conversation.
- gene_weber
-
- Offline
- Junior Member
-
- Posts: 37
- Thank you received: 14
Please Log in or Create an account to join the conversation.
- alangibson
- Offline
- Senior Member
-
- Posts: 68
- Thank you received: 29
So is there a bug in the PREEMPT_RT support in the 6.12 kernel, or is it simply not implemented the way LinuxCNC has come to expect? Obviously LinuxCNC needs to support a working standard.
This conversation is a bit confusing because rodw and I are doing different things to get the same result.
I am starting with Raspberry Pi OS, switching to their 6.12 branch then building the kernel to enable PREEMPT_RT. I'm doing this because they don't have a kernel build of 6.12 with realtime enabled yet.
rodw is starring with plain Debian and using a build system to create an image for the Raspberry Pi.
Sidenote: all realtime code is merged in upstream 6.12 now, but you still have to enable it at build time with a configuration option. There's no way to turn realtime on and off after it's built.
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
- Posts: 1200
- Thank you received: 417
This has been a bit of a headache all weekend, I've built a successful image using the 6.1.y branch (unfortunatley first attempt didn't include the Linuxcnc binaries), the commit chosen is 6.1.69, the latest commit on that branch doesn't have a corresponding patch set is available.
I tried with the 6.12.y branch, but there was an issue with the build of the final image.
Finally working with the 6.1.y branch and the 6.1.69 commit it appears that I have a successful image, with the Linuxcnc binaries and spi turned on as default.
I think one reason for "rolling our own image" is to get away from any RPi Foundation branding. Another reason is that we can insert our own modifications in as well.
Please Log in or Create an account to join the conversation.
- gene_weber
-
- Offline
- Junior Member
-
- Posts: 37
- Thank you received: 14
I've been trying to simply update the kernel to 6.12, install LinuxCNC in uspace and go. I've been playing with this for a week. I took the blogs that said the kernel now supports PREEMPT_RT a bit too literally. (First version of this sentence was considerably less kind to the bloggers)
The post about the differences between the different kernels is very enlightening. I've been using Linux for years at work & home. I had thought there was "The One Linux Kernel" at the heart of Debian, Fedora, Ubuntu, Mint, etc. Based on this conversation I guess that's not the case.
Please Log in or Create an account to join the conversation.
- Cant do this anymore bye all
-
- Offline
- Platinum Member
-
- Posts: 1200
- Thank you received: 417
For SPI you'll have to compile Linuxcnc from the most recent sources, master or 2.9.3, as they include the spi driver thats supports the RPi5. If using ethernet nothing needs to be done.
This may be worth a read
github.com/by/RT-Kernel
Along with this post
forum.linuxcnc.org/38-general-linuxcnc-q...6-12?start=40#318767
I'm actually getting fed up with my RPi5, for the second time for Linuxcnc, it's a Me Issue which I fully admit to. Hopefully I'll be able to gently with great care put it back into the container rather than forcibly inserting into the wall, which will make other people mad at me.
Please Log in or Create an account to join the conversation.