Industrial Native Real-Time Linux OS Solution

Setup and Tuning Guide

ID Date Version Classification
634647 01/01/2021 1.0 Public
Document Table of Contents

Preempt RT Linux Installation

1. Copy the Debian packages for Preempt-RT Linux built in previous step to the target board.

2. Install Preempt-RT Linux Debian packages.

$ sudo dpkg -i [path]/linux-image-4.19.59-rt24-intel-pk-preempt-rt-ecs1.0_​​4.19.59-rt24-intel-pk-preempt-rt-ecs1.0-1_​​amd64.deb

$ sudo dpkg -i [path]/linux-headers-4.19.59-rt24-intel-pk-preempt-rt-ecs1.0_​​4.19.59-rt24-intel-pk-preempt-rt-ecs1.0-1_​​amd64.deb

$ sudo dpkg -i [path]/linux-libc-dev_​​4.19.59-rt24-intel-pk-preempt-rt-ecs1.0-1_​​amd64.deb

$ sudo dpkg -i [path]/ethercat_​​1.5.2-rt_​​amd64.deb

3. Edit grub to leave time to select new kernel and change the kernel cmdline.

$ sudo gedit /etc/default/grub

Changes are:

#GRUB_​​TIMEOUT_​​STYLE=hidden

GRUB_​​TIMEOUT=10

GRUB_​​CMDLINE_​​LINUX_​​DEFAULT="quiet splash nosmap console=ttyS0,115200 console=tty0 clocksource=tsc tsc=reliable nmi_​​watchdog=0 nosoftlockup idle=poll noht audit=0 irqaffinity=0 isolcpus=1-3 rcu_​​nocbs=1-3 intel_​​pstate=disable intel.max_​​cstate=0 intel_​​idle.max_​​cstate=0 processor.max_​​cstate=0 processor_​​idle.max_​​cstate=0 i915.enable_​​dc=0 i915.disable_​​power_​​well=0 noefi"
Note:
  1. Usually, the implementation for EFI variable read/write is in SMM, which means it will trigger SMI and result in large jitter. “noefi” will disable software access to EFI variable.
  2. User can change isolcpus and rcu_​nocbs arguments per needs.

4. Update grub and reboot.

$ sudo update-grub

$ sudo reboot

5. After reboot into Grub menu, select “Advanced options for Ubuntu” -> “Ubuntu, with Linux 4.19.59-rt24-intel-pk-preempt-rt-ecs1.0” in Grub menu, and then boot.