* Status of preempt-rt on raspberrypi
@ 2016-04-15 17:44 Francis Giraldeau
2016-04-15 18:19 ` Bruce Ashfield
0 siblings, 1 reply; 2+ messages in thread
From: Francis Giraldeau @ 2016-04-15 17:44 UTC (permalink / raw)
To: poky
[-- Attachment #1: Type: text/plain, Size: 1790 bytes --]
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:
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
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.
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
[-- Attachment #2: Type: text/html, Size: 2652 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Status of preempt-rt on raspberrypi
2016-04-15 17:44 Status of preempt-rt on raspberrypi Francis Giraldeau
@ 2016-04-15 18:19 ` Bruce Ashfield
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2016-04-15 18:19 UTC (permalink / raw)
To: Francis Giraldeau, poky
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
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-04-15 18:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-15 17:44 Status of preempt-rt on raspberrypi Francis Giraldeau
2016-04-15 18:19 ` Bruce Ashfield
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.