This patchset adds a new recipe to meta-raspberrypi to give users the option to choose a full PREEMPT_RT Linux kernel with the full PREEMPT_RT patch applied. It is based on the linux-raspberrypi 4.4 kernel with the -rt patch from https://www.kernel.org/pub/linux/kernel/projects/rt/, specifically it is linux-raspberrypi-4.4.35 with the patch-4.4.32-rt43 -rt patch applied.
To select this kernel for your image, set: PREFERRED_PROVIDER_virtual/kernel = "linux-raspberrypi-rt" in local.conf or similar. Normally when using the -rt kernel on the raspberrypi and enabling full preemption (CONFIG_PREEMPT_RT_FULL=y), the device will become unstable and be prone to frequent crashing. There are two ways to fix this problem: 1) disable FIQ 2) patch the FIQ handling to avoid the race which causes the crashes The FIQ can be disabled by appending "dwc_otg.fiq_enable=0 dwc_otg.fiq_fsm_enable=0" to the kernel cmdline. Disabling the FIQ altogether does fix the problem but increases latencies. The better solution is to patch the FIQ handling code to avoid the race condition that causes the crash. This allows the FIQ to be used, and lowers latencies. This patch implements the 2nd option of patching the kernel code to avoid the race condition. Thus providing a better -rt experience on this platform. A full explanation of this issue can be found here: https://www.osadl.org/Single-View.111+M5c03315dc57.0.html This kernel recipe ignores the raspberrypi-specific kernel configuration mechanisms of the other raspberrypi kernel recipes so that users are free to modify the base kernel configuration using fragments in the usual Yocto way. The base defconfig for this kernel is the same as the linux-raspberrypi-4.4 kernel but with full preemption enabled (and whatever else that pulls in). Trevor Woerner (1): linux-raspberrypi-rt: add .../0001-fix-dtbo-rules.patch | 44 + .../FIQ_PREEMPT_RT_on_raspi.patch | 310 + .../linux/linux-raspberrypi-rt-4.4/defconfig | 5419 ++++ .../patch-4.4.32-rt43.patch | 31403 +++++++++++++++++++ recipes-kernel/linux/linux-raspberrypi-rt_4.4.bb | 55 + 5 files changed, 37231 insertions(+) create mode 100644 recipes-kernel/linux/linux-raspberrypi-rt-4.4/0001-fix-dtbo-rules.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi-rt-4.4/FIQ_PREEMPT_RT_on_raspi.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi-rt-4.4/defconfig create mode 100644 recipes-kernel/linux/linux-raspberrypi-rt-4.4/patch-4.4.32-rt43.patch create mode 100644 recipes-kernel/linux/linux-raspberrypi-rt_4.4.bb -- 2.10.2 -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto