Has anyone been able to compile a Linux kernel with PREEMPT-RT patches for the Rock Pi 4?



Yesterday I tried to apply latest RT patch to the radxa’s kernel repo. The result is 15 files with rejected hunks (about 10 Kb in total, RT patch size is 1Mb). All rejected hunks must be added manually. And kernel building results is undefined (:

One more possible solution - using the develop-4.4-rt176 branch from the upstream rockchip repo.

Here is my topic about this - What about RT linux?

Thanks for your feedback!

My current status trying to get a RT kernel to run:

Branch develop-4.4-rt from github/radxa does not have the correct DTS for Rock Pi 4. After copying necessary files (rockpi4-linux.dts, rk3399.dtsi, rk3399-linux.dtsi, rk3399-opp.dtsi) the kernel builds, but hangs in an endless loop while starting (failed to bind ff960000.dsi). I could not find enough useful information on Google to resolve this.

Branch release-4.4-rockpi4 with version 4.4.154 can be patched with patch-4.4.157-rt174.patch; the patch needs to be adapted slightly to fit the modified Radxa kernel tree. Additional patches for drivers/input/keyboard/rk_keys.c and drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c were necessary to fix build errors (diffed from develop-4.4-rt).

The resulting kernel boots, but will panic as soon as peripheral hardware (e.g. WLAN) is accessed, due to improper use of the new interrupt framework in the RT kernel. To resolve this, it would be necessary to adapt all the additional drivers not present in mainline 4.4, but present in Radxa 4.4 for use with PREEMPT_RT.

I decided to wait for PREEMPT_RT 5.1 to become available and try again with a mainline kernel.

Kind regards,

1 Like