[poky] Status of preempt-rt on raspberrypi
Bruce Ashfield
bruce.ashfield at windriver.com
Fri Apr 15 11:19:24 PDT 2016
On 2016-04-15 1:44 PM, Francis Giraldeau wrote:
> I'd like to create an image with linux preempt-rt for the raspberry-pi.
>
> I merged the patches specific to the rpi on top of the linux 4.4
> preempt-rt branch [1]. Now, I'm trying to add the support in the
> meta-raspberrypi layer [2].
>
> However, I still have an issue setting the required config, such as
> CONFIG_PREEMPT_FULL=y for the kernel. I saw that there is already a
> preempt-rt branch and config by default in Yocto, but I haven't found
> the way to select in the local.conf file when building for the rpi. My
> local.conf file has this content:
The issue would be that the rpi machine is using a different kernel
repo, and that repository doesn't have -rt integrated.
>
> MACHINE ??= "raspberrypi2"
> PREFERRED_PROVIDER_virtual/kernel ?= "linux-raspberrypi-rt"
>
> In fact, even with this local.conf:
> MACHINE ??= "qemuarm"
> KBRANCH ?= "standard/preempt-rt"
>
> The resulting kernel config does not include PREEMPT_FULL:
> $ grep PREEMPT
> ./tmp/work/qemuarm-poky-linux-gnueabi/linux-yocto/4.1.15+gitAUTOINC+46bb64d605_cf760f381c-r0/linux-qemuarm-standard-build/.config
> CONFIG_PREEMPT_RCU=y
> # CONFIG_PREEMPT_NONE is not set
> # CONFIG_PREEMPT_VOLUNTARY is not set
> CONFIG_PREEMPT=y
> CONFIG_PREEMPT_COUNT=y
> CONFIG_DEBUG_PREEMPT=y
> # CONFIG_PREEMPT_TRACER is not set
You need linux-yocto-rt to get the proper -rt configuration generated.
>
> And CONFIG_DEBUG_PREEMPT should be unset, because it is known to cause
> slowdowns.
>
> I followed the kernel dev manual and tried to add .cfg file, but it
> looks like the kernel .config is generated from within
> do_configure_prepend() in the meta-raspberrypi kernel recipe. That seems
> to overwrite other config done by bitbake.
The flexibility (and diversity) in BSPs means that not all kernel builds
behave the same. Getting consensus on elements of the config and build
(and deploy) isn't simple .. so there is core kernel build support in
oe-core
and extensions for linux-yocto. Unless a recipe inherits kernel-yocto and
turns on that framework, then you need to look at the kernel you are
building
and see how it is configured.
That's very likely why the .cfg isn't being applied on the end.
Cheers,
Bruce
>
> So, I'm a bit confused on how things should properly work. Any advice
> would be greatly appreciated.
>
> Thanks for the help,
>
> Francis
>
> [1] https://github.com/giraldeau/linux/tree/linux-4.4.y-rt-rebase-rpi
> [2]
> https://github.com/giraldeau/meta-raspberrypi/commit/56168d6b320c1b724d04b1e7f365255ffdb62e70
>
>
>
More information about the poky
mailing list