6

I'm planning to do some realtime control loop tasks with the RPi. In this post PREEMPT_RT and Xenomai were proposed. I'm thinking about trying PREEMPT_RT, as I'd like to keep it as simple as possible.

In the linked post, @Nakedible opposes that the current (as of his writing from Sep 29 '12) drivers are a work-in-progress and might still contain long blocking sleeps.

Is this still the case, or are the drivers real-time capable already? I'll need I2C and maybe SPI drivers.

Also, are there good tutorials on how to compile a working RPi kernel with PREEMPT_RT? So far I've found this and that, but I have never built a kernel yet.

fabb
  • 283
  • 3
  • 11

2 Answers2

2

There doesn't seem to be any tutorial for building an RT kernel. I'm working on it, but no success so far. Here's as far as I've got:

  • Start by getting the 3.6 source as described here
  • Apply the stock 3.6.11-rt25 patch
  • One line of the patch fails - you have to manually add a line to a makefile
  • Using the .config from the stock raspbian wheezy distro seems easiest - the defconfig included in the source leaves too many things undefined
  • Modify the config for PREEMPT_RT
  • Complete the build as per the link above.

However, the MMC/SD driver still seems to be broken.

Tom
  • 179
  • 1
  • 5
1

I wrote this tutorial for creating an PREEMPT_RT kernel for Raspberry Pi 3 (and only the version 3). It will install Linux kernel 4.14.14 with RT Linux patch 4.14.12-rt10 on Raspbian version 2017-11-29.

Also I included some pointers for how to adapt this for different combinations of kernels and RT Linux patches, but this still remains the challenge in the process.

tanius
  • 203
  • 1
  • 5