RT Fully Preemptive Kernel configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

RT Fully Preemptive Kernel configuration

2,376 Views
marina_prital
Contributor I

Hello all,

I am working with Yocto SDK 2.0 (and also tried 2.0-1703) with the p4080ds target

(www.nxp.com/support/developer-resources/run-time-software/linux-software-and-development-tools/linux-sdk-for-qoriq-processors:SDKLINUX).

Now I need to change the Kernel to be Fully Preemptive RT.

Is it enough only to turn on the "Fully Preemptive Kernel (RT)" in Kernel configuration, or RT patch should be loaded in addition?

If I only turn on the "Fully Preemtive Kernel (RT)", the system starts up with the message:

"Configuring network interfaces... BUG: sleeping function called from invalid context at rtmutex.c:917".

If I configure the local.conf with:

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
COMPATIBLE_MACHINE_p4080ds = "p4080ds"

and run the command "bitbake fsl-image-core", this commands fails with errors: "udbg.c:164: undefined reference to `early_console' " and "core.c:301: undefined reference to `early_printk' ".

What is the correct way to enable the Fully Preemptive RT configuration?

Thanks in advance,

istbor

0 Kudos
1 Reply

2,119 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Marina Prital ,

NXP uses Linux PREEMPT_RT patch (also known as RT patch) to meet these requirements. PREEMPT_RT patch can be pulled from kernel.org git repository

PREEMPT_RT patch is applied in the kernel available with this SDK 2.0. By default, RT feature is disabled in all the defconfigs of this SDK.

Please fetch Linux Kernel source

$bitbake virtual/kernel -c patch -f

$bitbake virtual/kernel -c configure

Please go to Linux Kernel build folder  build_p4080ds/tmp/work/p4080ds-fsl-linux/linux-qoriq/4.1-r0/build/ to configure Linux Kernel as the following.

Kernel options --->
          Preemption Model (Fully Preemptible Kernel (RT)) --->
                    (X) Fully Preemptible Kernel (RT)

CONFIG_SLAB=y

CONFIG_HIGHMEM=y

CONFIG_PREEMPT_RT_FULL=y

Then rebuild Linux Kernel with Yocto command

$bitbake virtual/kernel -c compile -f

$bitbake virtual/kernel

To verify that PREEMPT_RT Patch is applied and RT is enabled in Linux configuration after Linux has booted, check Linux version on Linux prompt, one should see pattern “PREEMPT RT” in the version string. Eg:
root@bsc913x:~# uname -a
Linux bsc913x 3.8.13-rt6+ #52 PREEMPT RT Wed May 22 12:26:51 IST 2013 ppc GNU/Linux

Thanks,

Yiping

0 Kudos