Yocto build for preempt_rt
Asked Answered
S

1

6

I'm building a custom kernel for the beaglebone black. Following this guide (http://android.serverbox.ch/?p=1273) I'm able to boot to console successfully using a base image.

When I try to build with the realtime kernel patch using command:

bitbake core-image-rt

I get the following error messages:

Loading cache: 100% |###############################| ETA:  00:00:00
Loaded 1222 entries from dependency cache.
Parsing recipes: 100% |#############################| Time: 00:00:00
Parsing of 862 .bb files complete (861 cached, 1 parsed). 1221 targets, 61 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: multiple providers are available for virtual/kernel (linux-yocto, linux-dummy)
NOTE: consider defining a PREFERRED_PROVIDER entry to match virtual/kernel
ERROR: Nothing PROVIDES 'linux-yocto-rt' (but /home/ste/yocto/poky/meta/recipes-rt/images/core-image-rt.bb DEPENDS on or otherwise requires it)
ERROR: linux-yocto-rt was skipped: incompatible with machine beaglebone (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-rt was skipped: incompatible with machine beaglebone (not in COMPATIBLE_MACHINE)
ERROR: linux-yocto-rt was skipped: incompatible with machine beaglebone (not in COMPATIBLE_MACHINE)
ERROR: Required build target 'core-image-rt' has no buildable providers.
Missing or unbuildable dependency chain was: ['core-image-rt', 'linux-yocto-rt']
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

I applied the suggestions in the README file (or think I did...):

The recipes-rt recipes provide package and image recipes for using and testing
the PREEMPT_RT kernel. The core-image-rt*.bb images are minimal images with
a couple extra packages, including rt-tests. In order to build the image with
the linux-yocto-rt kernel, be sure to include the following line in your
local.conf, bblayers.conf, or your $MACHINE.conf.

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"

If you are creating a new BSP which should use linux-yocto-rt by default,
use the line above in the $MACHINE.conf in your BSP layer, and specify the
following in a linux-yocto-rt bbappend recipe:

COMPATIBLE_MACHINE_$MACHINE = $MACHINE

But still get the same error messages.
Has anyone had any success with building a realtime kernel using Yocto ? Unable to find a definitive procedure anywhere for this.

Sincerity answered 19/1, 2015 at 13:36 Comment(0)
I
6

I was able to get it to build core-image-rt by adding the following to build/conf/local.conf

PREFERRED_PROVIDER_virtual/kernel = "linux-yocto-rt"
COMPATIBLE_MACHINE_beaglebone = "beaglebone"
COMPATIBLE_MACHINE_quilt-native = "beaglebone"
Infelicity answered 19/1, 2015 at 18:53 Comment(7)
I can get the build to succeed using this, but the image does not boot :-(Sincerity
Are you connected to the serial console? Do you get any kernel output or nothing at all after u-boot runs the kernel?Infelicity
No, not connected, I need to get a cableSincerity
Looks like my /boot folder is empty, there should be a uImage file in thereSincerity
The kernel config looks alright... If I get a chance I'll try running it tomorrow. Definitely get a cable though even if you get this sorted out you're bound to need it again (even with a different board).Infelicity
This answer certainly helped. However I also needed to change the required package in /meta/recipes-rt/images/core-image-rt.bb from core-image-minimal to core-image-base.Sincerity
The suffix of COMPATIBLE_MACHINE_* is the MACHINE name defined in the local.conf.Seiler

© 2022 - 2024 — McMap. All rights reserved.