Does Balena OS support PREEMPT_RT patch?

I am interested in trying out the PREEMPT_RT patch while using Balena. Is there any way to use the patch on Balena OS?

Hi,
at this moment the kernel with PREEMPT_RT patch is not supported. In order to make it work you would need to build your own image as described here:

@mtoman I am following the docs in the balena OS site and looking in particular at meta-raspberrypi, which contains a set of recipes (in ~/balena-raspberrypi/layers/meta-raspberrypi/recipes-kernel/linux for linux). At the same time, I have noticed that the raspberry3.conf file in ~/balena-raspberrypi/layers/meta-raspberrypi/conf/machine uses the rpi-default-providers.inc in ~/balena-raspberrypi/layers/meta-raspberrypi/conf/machine/include to identify which kernel to use. Is that where I can attempt to switch it to one of the rt versions listed in the recipes-kernel mentioned above?

Hi,
the meta-raspberrypi layer has some previous work for building the RT kernel at layers/meta-raspberrypi/recipes-kernel/linux/linux-raspberrypi-rt_4.19.bb. It might be worth a try to either make it replace the current kernel (use linux-raspberrypi-rt instead of linux-raspberrypi) or just blindly copy the LINUX_VERSION, LINUX_RPI_BRANCH and SRCREV variables to layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_4.19.bbappend and see what happens. As I have mentioned before we do not support the RT kernel and we have not tried building it so I would not expect this to work out of the box. I hope this helps you.

edit to rephrase my question more concretely:

As far as I understand, Balena does provide a CONFIG_PREEMPT_VOLUNTARY kernel with CONFIG_HZ_1000 tick.

Baleno does not provide a CONFIG_PREEMPT kernel with CONFIG_HZ_1000 tick (like Ubuntu’s low-latency kernel). And nor does it provide a CONFIG_PREEMPT_RT kernel.

Is that correct? And if so, is there anything on the roadmap that aims to deliver something similar to Ubuntu’s low-latency configuration?

2 Likes