PREEMPT_RT kernel on ROC-RK3399-PC (Renegade Elite)

I am going to use Renegade Elite for LinuxCNC installed over Debian 12. Real-time kernel is one of the requirements of LinuxCNC, so I will need to get one. Debian provides PREEMPT_RT kernel as linux-image-rt-arm64 but as I understand, in order to get a similar image, I will need to clone v6.1/libretech-master branch of libretech-linux fork over it, then apply 6.1-rt patch, and finally cross-compile it. Did I get all the steps right? Or maybe there’s already a prebuilt kernel somewhere, and I don’t need to compile it myself? If not, are there any specific instructions for kernel compilation?

This is the branch to use: GitHub - libre-computer-project/libretech-linux: Mainline Linux Fork for Libre Computer
This is also the default branch.

We will support an RT kernel after Linux 6.6 is completed since the RT patchset will be manageable. The printk stuff is finally in place. For now, you have to do it on your own. But please let us know how it goes and share any issues you run into. We may be able to resolve it for you.

Thanks for your fast reply! I had no problems applying the patch, but I did it over the v6.1/libretech-rt branch, all patches applied gracefully, there were no conflicts. My patched source can be found here. I will try to patch linux-6.1.y-lc as well.

The next step would be getting a cross-compiling toolchain that you use, modifying the kernel config (where is it published?) and following all the kernel build steps. Are there any instructions regarding this?

Any ARM64 cross-compilation toolchain is fine. You can use the arch defconfig, it is tailored for our boards.

After some more rebasing, I was able to patch the default branch (now updated to 6.1.46) with 6.1.46-rt13 patchset. The patched source can be found here.

I will try to build it with Arm GNU Toolchain and defconfig. Was hoping it’s possible to replicate the build process that is being used for official builds, but I think the outcome should be the same.

If anyone is interested in trying out this kernel, but not interested in building it, I have uploaded it here: linux-arm64-6.1.46-rt13. I can’t test it right now, because my board won’t boot (most likely a problem with SPI flash loader), but I will as soon as I get it working.