Linux BSP

The Embodied Intelligence SDK provides Intel LTS Kernel v6.12 with Preempt RT patch to support on ArrowLake platform, which includes the Linux Kernel v6.12, optimized configuration and kernel boot parameters.

Quick Start

You can install this component from the Intel* Embodied Intelligence SDK repository.

For RT kernel:

$ sudo apt install linux-intel-rt-experimental

For generic kernel:

$ sudo apt install linux-intel-experimental

Configure and Build Linux Kernel

The Linux BSP Sources are available to download with apt-get source in addition to support developer to compile by self and deploy on target. This section will explain the procedure to configure the Linux kernel and build it.

Step 1: Environment Prerequisites

In this step, you will set up your build environment.

Install additional packages before building a kernel. To do so, run this command:

$ sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc flex libelf-dev bison debhelper

The command we used above installs the following packages:

Package

Package description

git

Tracks and makes a record of all changes during development in the source code. It also allows reverting the changes.

fakeroot

Creates the fake root environment.

build-essential

Installs development tools such as C, C++, gcc, and g++.

ncurses-dev

Provides API for the text-based terminals.

xz-utils

Provides fast file compression and file decompression.

libssl-dev

Supports SSL and TSL that encrypt data and make the internet connection secure.

bc (Basic Calculator)

Supports the interactive execution of statements.

flex (Fast Lexical Analyzer Generator)

Generates lexical analyzers that convert characters into tokens.

libelf-dev

Issues a shared library for managing ELF files (executable files, core dumps and object code)

bison

Converts grammar description to a C program.

debhelper

A tool that is used inside debian/rules files to ease package building.

Step 2: Download the Source Code

To use below commands to download and extract the kernel source.

For RT kernel:

$ sudo apt-get source linux-intel-rt-experimental
$ cd linux-intel-rt-experimental*

For generic kernel:

$ sudo apt-get source linux-intel-experimental
$ cd linux-intel-experimental*

Step 3: Configure RT Kernel

The Linux kernel source code comes with the default configuration. Please refer to below list which provides the additional kernel configurations used during compilation to optimize the system for real-time performance.

kernel config fragment overrides (.cfg)

Comments

CONFIG_HZ_250=y
CONFIG_NO_HZ=n
CONFIG_NO_HZ_FULL=y
CONFIG_NO_HZ_IDLE=n
CONFIG_ACPI_PROCESSOR=n
CONFIG_CPU_FREQ_GOV_ONDEMAND=n
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=n
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ=n
CONFIG_CPU_IDLE=n

Reduce task scheduling-clock overhead and disable CPU governor Linux* features

ARCH_SUSPEND_POSSIBLE=n
CONFIG_SUSPEND=n
CONFIG_PM=n

Disable Linux* power-management runtime features

CONFIG_VIRT_CPU_ACCOUNTING=y
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y

Enable more accurate task and CPU time accounting

CONFIG_CPU_ISOLATION=y
CONFIG_RCU_NOCB_CPU=y
CONFIG_PREEMPT_RCU=y
CONFIG_HAVE_PREEMPT_LAZY=y
CONFIG_PREEMPT_LAZY=y
CONFIG_PREEMPT_RT=y

Enable more preemptive task scheduling policies and CPU temporal-isolation

You can find a file named config-6.12.8-intel-ese-experimental-lts in /boot/ when the target had installed with ‘sudo apt install linux-intel-rt-experimental’, and copy it into Linux kernel source directory.

  1. To make changes to the configuration file, run the make command:

    $ make olddefconfig
    
  2. if you need to modify configuration options by menu, run the menuconfig command:

    $ make menuconfig
    

Use the arrows to make a selection or choose Help to learn more about the options. When you finish making the changes, select Save, and then exit the menu.

Note: Changing settings for some options can lead to a non-functional kernel. If you are unsure what to change, leave the default settings.

Step 4: Build the kernel

Starting building the kernel by running the following command:

$ cp build-full/ltsintelrelease .
$ make ARCH=x86 bindeb-pkg

Step 5: Install the kernel

The process of building and compiling the Linux kernel takes some time to complete. you will find kernel debian package which can be installed on target with below commands:

$ sudo dpkg -i *.deb
$ sudo update-grub

Step 6. Reboot and Verify Kernel version

When you complete the steps above, reboot the machine.

When the system boots up, verify the kernel version using the uname command:

$ uname -mrs

Packages