So Hot !!

Linux : How to make Real Time Linux Kernel

Date : Saturday,4 March 2017
Writer : Ataya P

My old notebook was already out of date. So, I tried to make it running better by making real time kernel. Let's see how to do it ..

Working Platform :
Lenovo Notebook , Intel Pentium Dual Core T2080 1.73GHz
2Gbyte RAM
Ubuntu Ubuntu 12.04.3 LTS

1. Download Kernel sourcecode from

2. Download realtime preemption patch that match the downloaded kernel version.

3. Extract kernel and patch the kernel
# tar xvf linux-3.2.83.tar.gz
# gzip -d patch-3.2.83-rt120.patch.gz
# cd linux-3.2.83
# patch -p1 < ../patch-3.2.83-rt120.patch

4. Config kernel to support realtime preemption.
# make distclean
# make i386_defconfig
# make xconfig


6. Enable HIGH_RES_TIMERS option

7. Disable all submenu of ACPI option
ACPI option

8. Disable APM option
APM option

9. Save config and make the kernel (option -j2 for my dual core PC)
# make -j2
# make -j2 modules
# make modules_install
# make install

10. Config your boot manager to boot the installed kernel.
config grub menu list

11. Reboot your machine.

12. Check your loaded kernel version
# uname -a
Linux XXXXX 3.2.83-rt120 #1 SMP PREEMPT RT Fri Mar 3 10:06:41 ICT 2017 i686 i686 i386 GNU/Linux

13. Install rt-tests tools for testing.
# apt-get install rt-tests

14. Install gnuplot for plotting the test result
# apt-get install gnuplot

15. Download plotting script from

16. Run cyclictest and plot the result.
# ./ 100000 > result
# ./ result

17. Compare the result between old kernel and patched realtime kernel runtime.
old kernel cyclictest resul

realtime kernel cyclictest resul

Share this page :

Custom Search