How to compile the Linux kernel with Realtime Support

Build your Linux Kernel applying the patch with which you enable the specific scheduler for processes Real Time, is not something Arabic but understandable, of course for an expert.

Real time comes for the system to give an answer, not in fast times, but at set times of drawing and then in some cases does nothing but disrupt an ongoing process to switch to another that has a higher priority. To do this you need scheduling, which allows us to know if a task, that is, processing, ones and execute in a given predetermined time frame. Obviously in this case, we deal with a Linux kernel, so you need a basic knowledge of the operating system in question. Let’s see how to do a Realtime support.

Requirement :

  • Linux operating system installed
  • Kernel source (available on www.kernel.org)
  • Patch for real time always found on www.kernel.org

1.) Obtaining first the sources of the Linux kernel and the patch for the realtime. The links are as follows:

  • For the kernel sources: http://www.kernel.org/
  • For the patch: http://www.kernel.org/pub/linux/kernel/projects/rt/
  • Be sure to download the patch with the same number of kernel version, otherwise it would not be compatible. Now go to the folder where you unzipped the kernel and first copy the file with the old configuration, giving: ” cp / boot / config / path kernel /
  • Now type ” make oldconfig “, and answer ” Yes ” to all questions that the system poses.

2.) When finished The previous command give the command:

  • bzcat / path dellapatch / patch-2.6. Xx-rtyy. Tar. Bz2 | -p1 patch “.
  • That will put the patch of real time in the linux kernel. Then type the following command ” make menuconfig “.
  • Bring on ” Processor Type and features ” and under ” Preemption mode ” selected.
  • Complete Preemption (RealTime) “.
  • And under ” Frequency Timer ” choose as a value: ” 1000hz ” .
  • That done, if you feel you need to make other changes to the kernel. When you finished dates the following commands:
  • -j5 Make bzImage
  • Make -j5 modules
  • Make modules_install

3.) Here we are at the end joints. It just has to copy the files: ” .Config System.Map arch/x86/boot/bzImage into the /boot “.

Now to test your new kernel you have two possibilities: Using the Shell grub boot and manually upload files. Or create a new entry for grub, this can easily be done by copying the values ​​for the default version of the kernel that you find normally /boot/grub/menu. Obviously being careful to change the path and file names, and those of the new kernel. As you can see, following these steps will not be difficult to operate on your Linux system.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More