Difference between revisions of "Build PREEMPT-RT kernel"

From TASTE
Jump to: navigation, search
 
m (1 revision imported)
 
(No difference)

Latest revision as of 21:01, 4 August 2017

PREEMPT-RT

PREEMPT-RT is a patch that is applied against the linux kernel and that makes appear the interrupts as regular threads so that you can change their priorities. In addition, it makes the whole kernel preemptible, enhancing its whole reactivity. For our experiments, when experiencing the PREEMPT-RT patch without Etherlab, we used the 3.4.4 version of the Linux kernel and the rt14 patch from the PREEMPT-RT project.


Building a new kernel

You need the following files:

Then, follow these instructions to build the kernel:

  • Untar the kernel sources:
tar jxvf linux-3.4.4.tar.bz2
  • Unzip the PREEMPT-RT patch:
bunzip2 patch-3.4.4-rt14.patch.bz2
  • Patch the kernel sources :
cd linux-3.4.4 && patch -p1 < patch-3.4.4-rt14.patch
  • Copy the configuration file into the linux kernel directory :
cp -f config-3.4.4-preempt-rt linux-3.4.4/.config

A configuration file has been put in the TASTE subversion repository, you can find it here : https://tecsw.estec.esa.int/svn/taste/trunk/linux-distro/config/config-3.4.4-preempt-rt . Be careful, if you configure everything by yourself, you have to make sure to disable ACPI settings and enable the RT nature of the kernel. See links below, the PREEMPT-RT HOWTO

  • Build the kernel sources and headers.
cd linux-3.4.4 && make-kpkg --rootcmd fakeroot --initrd --config menuconfig kernel_image kernel_source kernel_headers
  • Install the kernel
dpkg -i linux-image* linux-headers*
  • Reboot


Configure the kernel

For configuring the kernel and testing its reactivity, you may refer to the following page : Tricks and tools for PREEMPT-RT kernel

Links