

#Raspberry Pi 4B: RealTime System using PreemptRT (kernel 4.19.y)
Raspberry Pi, Real Time Systems  7 min  7777
performancepreemptrt kernelraspberry pi 4braspbian busterreal time systemThe PreemptRT patching article is one of the most visited articles in my blog. However, that article needed a small update: Raspberry Pi 4B is out there and with Raspbian Buster, a new version of kernel is available: 4.19.y.
I also uploaded the compiled and patched kernel to lemariva/RTToolsRPi. You can follow all these steps and compile the kernel by yourself or you can download the files from the repository and deploy the kernel on your Raspberry Pi 4B.
This tutorial is the second of a series of three that evaluate the performance of the Raspberry Pi 4B. This time the performance of the s...

#Raspberry Pi: Real Time System  Xenomai Patching Tutorial for Kernel 4.14.y
Real Time Systems  6 min  9305
kernel patchingraspberry pireal time systemxenomaiThe website of Xenomai says the following about it Xenomai:
Xenomai brings POSIX and traditional RTOS APIs for porting timecritical applications to Linuxbased platforms. When the native Linux kernel cannot meet the response time requirements of the application, Xenomai supplements it with Cobalt, a small realtime infrastructure which schedules timecritical activities independently from the main kernel logic.
Checking the list of supported hardware, the Raspberry Pi 2, 3 B(+) ARM micro (BCM2835) is included.
This tutorial is almost the same as the tutorial for PreemptRT patching, but in ...

#Raspberry Pi: Real Time System  PreemptRT Patching Tutorial for Kernel 4.14.y
Real Time Systems  8 min  19489
kernel patchingpreemptrtraspberry pireal time systemThe PreemptRT tutorial article is the most visited post on my blog. Therefore, I decided to update the tutorial to make it cleaner, and to introduce some other possible modifications and tips for solving problems.
PreemptRT is a popular patch for the Linux kernel to transform Linux into such a realtime operating system. There is another option to get this done, and that's Xenomai (tutorial and performance tests here).
Tiejun Chen, the main responsible for the official RaspberryPiRT branch, has published a video about PreemptRT here. It includes tips, results and tests.
Getting the Sour...

#Raspberry Pi: The Nqueens Problem (benchmark) PreemptRT vs. Standard Kernel
Real Time Systems  5 min  2537
nqueen problemperformancepreemptrtraspberry pistandard kernelNQueens Problem: A Benchmarking Solver for Raspberry Pi
The NQueens Problem/Puzzle is a wellknown problem that consists of placing N chess queens on an N × N chessboard so that no two queens attack each other. For example, one possible solution to the Nqueens problem for N = 4 is the following:
Fig. 1: Nqueens problem example (N = 4). Source: Google Optimization Tools As you can see, no two queens are on the same row, column or diagonal. Usually the problem consists to find all possible solutions, rather than one optimal solution.
I wrote a script in Python that calculates ...

#Rapberry Pi: PreemptRT Kernel Performance on Rasbperry PI 3 Model B+
Real Time Systems  3 min  4645
kernelpatchingpreemptrtraspberry pi 3 B plusstandardThe Raspberry Pi 3 Model B+ (Fig. 1) is now on sale and I bought one two weeks ago. The main modifications are the followings:
 A 1.4GHz 64bit quadcore ARM CortexA53 CPU
 Dualband 802.11ac wireless LAN and Bluetooth 4.2
 Faster Ethernet (Gigabit Ethernet over USB 2.0)
 PoweroverEthernet support (with separate PoE HAT)
 Improved PXE network and USB massstorage booting
 Improved thermal management
Fig. 1: Raspberry Pi 3 Model B+ The Raspberry Pi uses now the LAN2515 chip from Microchip instead of the LAN9514 for Ethernet and the USB Ports.
If you are looking for some Benchmarkin...

#Raspberry Pi: PreemptRT Kernel 4.14.y on Raspberry Pi
Real Time Systems  1 min  1128
kernel patchingofficial branchpreemptrtraspberry piThe forked rpi4.14.yrt repo by TiejunChina is now a branch under the official Raspberry Pi repo. That means you need to type the following to clone the PreemptRT patched Kernel
~/rpikernel$ git clone https://github.com/raspberrypi/linux.git ~/rpikernel$ cd linux ~/rpikernel/linux/ git checkout rpi4.14.yrt
Then, you can follow the tutorial from here.

#Raspberry PI Zero W: PreemptRT Kernel Performance
Real Time Systems  2 min  2680
kernelpatchingperformancepreemptrtraspberry pi zerostandardToday I patched the kernel of a Raspberry Pi Zero W with PreemptRT. I used the repo TiejunChina.
Update 18.03.2018: The official PreemptRT patched Rasbian repo is here.
##~/rpikernel$ git clone https://github.com/TiejunChina/linux.git # update 18.03.2018: old repository## ~/rpikernel$ git clone https://github.com/raspberrypi/linux.git # update 18.03.2018: new repository ~/rpikernel$ cd linux ~/rpikernel/linux$ git checkout rpi4.14.yrt # today the kernel version is 4.14.22 # with rt17 resulting in 4.14.22rt17+
You can find a complete...

#Raspberry Pi: PreemptRT vs. Standard Kernel 4.14.y
Real Time Systems  5 min  6068
kernel patchinglatencyperformancepreemptrt kernelraspberry pistandard kernelThe last week I was working on a realtime application (with a 1 ms sample time) that runs on an ARMv8 CortexA53 (Raspberry Pi 3 Model B based board) and I was wondering the differences between latencies on the standard and the RealTime (RT) Linux kernel. I had some problems with the standard kernel version, then I thought I could analyze the latencies of both kernels, and make some conclusions. Many test are available but with older kernel versions. The tests were performed using the Raspbian Kernel 4.14.21 and the PreemptRT Patch 4.14.21rt17!
Hardware & Software
To follow the DIY parts, ...

#Raspberry Pi: PreemptRT Patching Tutorial for Kernel 4.14.y
Real Time Systems  7 min  17991
kernel patchingpreemptrtraspberry piraspbianstandard kernelYou can still read this article, but a new tutorial is available here: There are a lot of tutorials for Raspberry Pi kernel patching using PreemptRT, but I needed about 15 hours to get it working! I hate Kernel patching! and I have to say, that's not my first time. I have a system working with Ubuntu, RTAI and an Ethercat master. I patched the system more than once. But it is/was always a new thing! and It costs a lot of time! ;)
Then, you have another tutorial here. I only hope that the repo gets official. It could reduce the time to get the RT ...
