preempt-rt activation using bitbake

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

preempt-rt activation using bitbake

1,561 Views
Taeyoon
Contributor I

Hi, i'm building a custom kernel with lx2160ardb-rev2 board, and I'm trying using "bitbake linux-yocto-rt" command for Realtime Linux. 

In my first try, following error occurs:

       linux-yocto-rt was skipped: incompatible with machine lx2160ardb-rev2 (not in COMPATIBLE_MACHINE)

So, I added lx2160ardb-rev2 to COMPATIBLE_MACHINE in linux-yocto-rt_6.1.bb file.

 

after this, another error occurs:

      linux-yocto-rt was skipped: Set PREFERRED_PROVIDER_virtual/kernel to linux-yocto-rt to enable it

so, I added PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt" to my "local.conf" file. (i tried this to bblayers.conf file, lx2160ardb.conf file... and every candidate file... )

but same problem still remains.. how to solve this? I suffer from this long time.. please save me..

(plus, I added COMPATIBLE_MACHINE_lx2160ardb-rev2 = "lx2160ardb-rev2" to linux-yocto-rt's bbappend file. but nothing changes)

thanks for any answer!

0 Kudos
Reply
5 Replies

1,513 Views
khushbur
NXP TechSupport
NXP TechSupport

Hi @Taeyoon 

 

Which sdk version you are using for your setup?

 

Thanks

Khsuhbu

0 Kudos
Reply

1,495 Views
Taeyoon
Contributor I
I referred to LLDP user guide rev. L6.1.22_2.0.0 - (27 July 2023) for my setup.



and I did as indicated in part 4.5.2 of user guide (Downlopad Yocto bitbake part),

$ repo init -u https://github.com/nxp-qoriq/yocto-sdk -b mickledore -m ls 6.1.22-2.0.0_distro.xml

$ repo sync

$ . setup-env -m lx2160ardb-rev2

and

$ bitbake ls-image-main



after this, I needed to switch from default kernel to PREEMPT_RT kernel, so I tried in my original post..



thanks for your reply

Taeyoon
0 Kudos
Reply

1,476 Views
khushbur
NXP TechSupport
NXP TechSupport

Hi @Taeyoon 

 

Please go to Linux Kernel build folder build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git

and checkout to lf-5.15.y-rt

 

git checkout lf-x.x.y-rt  (where x.x is your kernel version)

 

Enable “ CONFIG_PREEMPT_RT=y” in the kernel:

General setup --->

 Preemption Model (Fully Preemptible Kernel (Real-Time) --->

 (X) Fully Preemptible Kernel (Real-Time)

 

$bitbake virtual/kernel -c compile -f

$bitbake virtual/kernel

 

Thanks

Khushbu

0 Kudos
Reply

1,439 Views
Taeyoon
Contributor I

Hi, @khushbur

first of all, please forgive my ignorance.

I did what you guide me last week, but some problems happend when I ran the command "$ bitbake virtual/kernel"

I have two questions.

1. It seems that bitbake uses linux-qoriq.6.1.bb recipe, contrary to my idea that bitbake should use "5.15.rt" version recipe. should I modify some recipe files or config, class etc.. files?

2. and I confused about "work" directory and "work-shared". In your reply, the directory which the RT kernel source is downloaded to is under the "tmp/work" directory, but it seemed that bitbake complied and built kernel under "tmp/work-shared" directory. Could you tell me the difference between kernel source under "work" and kernel source under "work-shared"?


Thanks for taking the time to consider my question.
Taeyoon

0 Kudos
Reply

1,399 Views
khushbur
NXP TechSupport
NXP TechSupport

Hi @Taeyoon 

 

 but some problems happend when I ran the command "$ bitbake virtual/kernel"

I have tried same. Please refer below logs for same.

 

khushbu@1N120809QD-DESK:~/yocto-6.1$ DISTRO=fsl-qoriq-distro MACHINE=lx2160ardb-rev2 source distro-setup-env

khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$ bitbake -c unpack virtual/kernel
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 4914 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.2.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "lx2160ardb-rev2"
DISTRO = "fsl-qoriq-distro"
DISTRO_VERSION = "4.1.1"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:b50f718e4cb73214e7ad298484ecdadd6cfeb866"
meta-oe
meta-multimedia
meta-python
meta-networking
meta-gnome
meta-filesystems
meta-webserver
meta-perl = "HEAD:c354f92778c1d4bcd3680af7e0fb0d1414de2344"
meta-virtualization = "HEAD:8857b36ebfec3d548755755b009adc491ef320ab"
meta-cloud-services = "HEAD:b7eaf24eb1e007aad05760771944a5a0d23f78ad"
meta-security = "HEAD:2aa48e6f4e519abc7d6bd56da2c067309a303e80"
meta-freescale = "HEAD:09c47379218167dda9fb0098129909a667fea2ec"
meta-freescale-distro = "HEAD:1069c2f210b18cd707a4d8a82140a684a42a4ff6"
meta-qoriq = "HEAD:36cb7a032083394fdc38a136383f735752fbce59"
meta-nxp-desktop = "HEAD:156c31e0c9f09cfb443fea0926d44a8943e0770c"

Initialising tasks: 100% |#####################################################################################################| Time: 0:00:00
Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 0 (0% match, 0% complete)
NOTE: No setscene tasks
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$ cd tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git/
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git$ git checkout lf-5.15.y-rt
Updating files: 100% (41963/41963), done.
Branch 'lf-5.15.y-rt' set up to track remote branch 'lf-5.15.y-rt' from 'origin'.
Switched to a new branch 'lf-5.15.y-rt'
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/git$ cd ../../../
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2/tmp/work/lx2160ardb_rev2-fsl-linux$ cd ../../../
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$ bitbake -c do_menuconfig virtual/kernel
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 4914 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.2.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "lx2160ardb-rev2"
DISTRO = "fsl-qoriq-distro"
DISTRO_VERSION = "4.1.1"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:b50f718e4cb73214e7ad298484ecdadd6cfeb866"
meta-oe
meta-multimedia
meta-python
meta-networking
meta-gnome
meta-filesystems
meta-webserver
meta-perl = "HEAD:c354f92778c1d4bcd3680af7e0fb0d1414de2344"
meta-virtualization = "HEAD:8857b36ebfec3d548755755b009adc491ef320ab"
meta-cloud-services = "HEAD:b7eaf24eb1e007aad05760771944a5a0d23f78ad"
meta-security = "HEAD:2aa48e6f4e519abc7d6bd56da2c067309a303e80"
meta-freescale = "HEAD:09c47379218167dda9fb0098129909a667fea2ec"
meta-freescale-distro = "HEAD:1069c2f210b18cd707a4d8a82140a684a42a4ff6"
meta-qoriq = "HEAD:36cb7a032083394fdc38a136383f735752fbce59"
meta-nxp-desktop = "HEAD:156c31e0c9f09cfb443fea0926d44a8943e0770c"

Initialising tasks: 100% |#####################################################################################################| Time: 0:00:01
Sstate summary: Wanted 96 Local 96 Mirrors 0 Missed 0 Current 49 (100% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 655 tasks of which 648 didn't need to be rerun and all succeeded.
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$ bitbake virtual/kernel -c compile -f
Loading cache: 100% |##########################################################################################################| Time: 0:00:00
Loaded 4914 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.2.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "lx2160ardb-rev2"
DISTRO = "fsl-qoriq-distro"
DISTRO_VERSION = "4.1.1"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:b50f718e4cb73214e7ad298484ecdadd6cfeb866"
meta-oe
meta-multimedia
meta-python
meta-networking
meta-gnome
meta-filesystems
meta-webserver
meta-perl = "HEAD:c354f92778c1d4bcd3680af7e0fb0d1414de2344"
meta-virtualization = "HEAD:8857b36ebfec3d548755755b009adc491ef320ab"
meta-cloud-services = "HEAD:b7eaf24eb1e007aad05760771944a5a0d23f78ad"
meta-security = "HEAD:2aa48e6f4e519abc7d6bd56da2c067309a303e80"
meta-freescale = "HEAD:09c47379218167dda9fb0098129909a667fea2ec"
meta-freescale-distro = "HEAD:1069c2f210b18cd707a4d8a82140a684a42a4ff6"
meta-qoriq = "HEAD:36cb7a032083394fdc38a136383f735752fbce59"
meta-nxp-desktop = "HEAD:156c31e0c9f09cfb443fea0926d44a8943e0770c"

NOTE: Tainting hash to force rebuild of task /home/khushbu/yocto-6.1/sources/meta-qoriq/recipes-kernel/linux/linux-qoriq_6.1.bb, do_compile:00
WARNING: /home/khushbu/yocto-6.1/sources/meta-qoriq/recipes-kernel/linux/linux-qoriq_6.1.bb:do_compile is tainted from a forced runA: 0:00:00
Initialising tasks: 100% |#####################################################################################################| Time: 0:00:00
Sstate summary: Wanted 95 Local 95 Mirrors 0 Missed 0 Current 50 (100% match, 100% complete)
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 655 tasks of which 654 didn't need to be rerun and all succeeded.

Summary: There was 1 WARNING message.
khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$ bitbake virtual/kernel
Loading cache: 100% |##########################################################################################################| Time: 0:00:01
Loaded 4914 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION = "2.2.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "universal"
TARGET_SYS = "aarch64-fsl-linux"
MACHINE = "lx2160ardb-rev2"
DISTRO = "fsl-qoriq-distro"
DISTRO_VERSION = "4.1.1"
TUNE_FEATURES = "aarch64"
TARGET_FPU = ""
meta
meta-poky
meta-yocto-bsp = "HEAD:b50f718e4cb73214e7ad298484ecdadd6cfeb866"
meta-oe
meta-multimedia
meta-python
meta-networking
meta-gnome
meta-filesystems
meta-webserver
meta-perl = "HEAD:c354f92778c1d4bcd3680af7e0fb0d1414de2344"
meta-virtualization = "HEAD:8857b36ebfec3d548755755b009adc491ef320ab"
meta-cloud-services = "HEAD:b7eaf24eb1e007aad05760771944a5a0d23f78ad"
meta-security = "HEAD:2aa48e6f4e519abc7d6bd56da2c067309a303e80"
meta-freescale = "HEAD:09c47379218167dda9fb0098129909a667fea2ec"
meta-freescale-distro = "HEAD:1069c2f210b18cd707a4d8a82140a684a42a4ff6"
meta-qoriq = "HEAD:36cb7a032083394fdc38a136383f735752fbce59"
meta-nxp-desktop = "HEAD:156c31e0c9f09cfb443fea0926d44a8943e0770c"

WARNING: /home/khushbu/yocto-6.1/sources/meta-qoriq/recipes-kernel/linux/linux-qoriq_6.1.bb:do_compile is tainted from a forced runA: 0:00:00
Initialising tasks: 100% |#####################################################################################################| Time: 0:00:01
Sstate summary: Wanted 139 Local 129 Mirrors 0 Missed 10 Current 50 (92% match, 94% complete)
NOTE: Executing Tasks
WARNING: linux-qoriq-6.1.y+gitAUTOINC+29549c7073-r0 do_package_qa: QA Issue: File /usr/src/debug/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/drivers/video/logo/logo_linux_clut224.c in package linux-qoriq-src contains reference to TMPDIR
File /usr/src/debug/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/drivers/tty/vt/consolemap_deftbl.c in package linux-qoriq-src contains reference to TMPDIR
File /usr/src/debug/linux-qoriq/6.1.y+gitAUTOINC+29549c7073-r0/lib/oid_registry_data.c in package linux-qoriq-src contains reference to TMPDIR [buildpaths]
NOTE: Tasks Summary: Attempted 817 tasks of which 787 didn't need to be rerun and all succeeded.

Summary: There were 2 WARNING messages.

khushbu@1N120809QD-DESK:~/yocto-6.1/build_lx2160ardb-rev2$

 

Thanks

Khsuhbu

0 Kudos
Reply