[FE training-materials-updates] Real-time lab: update kernel version for use with PREEMPT_RT

Michael Opdenacker michael.opdenacker at free-electrons.com
Fri Nov 3 13:53:20 CET 2017

Repository : git://git.free-electrons.com/training-materials.git
On branch  : master
Link       : http://git.free-electrons.com/training-materials/commit/?id=a66c1b247548a93e1c56c926f470d969b17f8cc9


commit a66c1b247548a93e1c56c926f470d969b17f8cc9
Author: Michael Opdenacker <michael.opdenacker at free-electrons.com>
Date:   Fri Nov 3 13:53:20 2017 +0100

    Real-time lab: update kernel version for use with PREEMPT_RT
    - Didn't manage to boot the Xenomai Cobalt kernel on the Xplained
      board yet (ongoing work)
    Signed-off-by: Michael Opdenacker <michael.opdenacker at free-electrons.com>


 labs/sysdev-real-time/sysdev-real-time.tex | 44 +++++++++++++++++++++++-------
 1 file changed, 34 insertions(+), 10 deletions(-)

diff --git a/labs/sysdev-real-time/sysdev-real-time.tex b/labs/sysdev-real-time/sysdev-real-time.tex
index 5ca12df..64864b2 100644
--- a/labs/sysdev-real-time/sysdev-real-time.tex
+++ b/labs/sysdev-real-time/sysdev-real-time.tex
@@ -29,9 +29,13 @@ supports Xenomai.
 Let's build this with Buildroot.
-Reuse and extract the Buildroot 2016.02 sources. Configure Buildroot
-with the following settings, using the \code{/} command in \code{make
-  menuconfig} to find parameters by their name:
+Download and extract the Buildroot 2016.02 sources. As the latest
+version of Xenomai doesn't seem to work on the Xplained board (yet),
+we need an older version of Buildroot that will build Xenomai 2.6.
+Configure Buildroot with the following settings,
+using the \code{/} command in \code{make
+menuconfig} to find parameters by their name:
 \item In \code{Target}:
@@ -88,12 +92,32 @@ tests:
 cp data/* nfsroot/root
+\section{Downloading sources and patches}
+We will use a kernel version that is supported by the PREEMPT\_RT
+So, go to
+download the latest patch available in a single file.
+Then go to \url{http://kernel.org} and download the exact version
+corresponding to the patch you downloaded. At the time of this writing,
+this version was 4.13.10.
 \section{Compile a standard Linux kernel}
-Reusing the 4.6 kernel we previously compiled, make sure that you disable
+Extract the sources of your 4.13.x kernel but don't apply the
+PREEMPT\_RT patches yet.
+Configure your kernel for your Xplained board, and then make sure
+that the below settings are disabled:
+Also, for the moment, disable the \code{CONFIG_HIGH_RES_TIMERS}
+option which impact we want to measure.
 Boot the Xplained board by mounting the root filesystem that you
 built. As usual, login as \code{root}, there is no password.
@@ -136,7 +160,7 @@ with further results.
 Obviously, this resolution will not provide accurate sleep times, and
 this is because our kernel doesn't use high-resolution timers. So
-let's enable the \code{CONFIG_HIGH_RES_TIMERS} option in the kernel
+let's add back the \code{CONFIG_HIGH_RES_TIMERS} option in the kernel
 Recompile your kernel, boot your Xplained with the new version, and
@@ -180,7 +204,7 @@ improvement in the maximum latency.
 \section{Testing Xenomai scheduling latency}
-Stay in \code{$HOME/embedded-linux-labs/realtime/rttest}.
+Stay in \code{$HOME/embedded-linux-labs/realtime}.
 Download the 2.6.4 release of Xenomai (that's what our version of
 Buildroot supports by default), and extract it.
@@ -195,7 +219,7 @@ and extract them.
 Now, prepare our kernel for Xenomai compilation:
-cd $HOME/embedded-linux-labs/realtime/rttest
+cd $HOME/embedded-linux-labs/realtime
 ./xenomai-2.6.4/scripts/prepare-kernel.sh --arch=arm \
 --linux=linux-3.14.17 \
@@ -222,7 +246,7 @@ So go in your Buildroot source directory, and force Buildroot to build
 the host variant of {\em pkg-config}:
-cd $HOME/embedded-linux-labs/realtime/rttest/buildroot-YYYY.MM/
+cd $HOME/embedded-linux-labs/realtime/buildroot-YYYY.MM/
 make host-pkgconf
@@ -230,8 +254,8 @@ We can now compile \code{rttest} for the Xenomai POSIX skin:
-cd $HOME/embedded-linux-labs/realtime/rttest/nfsroot/root
-export PATH=$HOME/embedded-linux-labs/realtime/rttest/buildroot-YYYY.MM/output/host/usr/bin:$PATH
+cd $HOME/embedded-linux-labs/realtime/nfsroot/root
+export PATH=$HOME/embedded-linux-labs/realtime/buildroot-YYYY.MM/output/host/usr/bin:$PATH
 arm-none-linux-gnueabi-gcc -o rttest rttest.c \
   $(pkg-config --libs --cflags libxenomai_posix)

More information about the training-materials-updates mailing list