[linux-yocto] [yocto] A question on adding a new program to a new meta layer

Bruce Ashfield bruce.ashfield at windriver.com
Fri Mar 8 08:31:36 PST 2013


On 13-03-08 07:25 AM, Insop Song wrote:
> Bruce,
>
> 1. I've tried this, which is just add edf-stage.scc.
> And it failed with the following messages.

Right. This definitely isn't the feature that you want to use, since
it is intended to apply patches to a tree, versus use a feature
that is already staged (which EDF/sched_dealine are).

See below for more details.

>
> ----
> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> index 7c1dff7..3397eea 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> @@ -24,6 +24,7 @@ COMPATIBLE_MACHINE =
> "qemuarm|qemux86|qemuppc|qemumips|qemux86-64"
>
>   # Functionality flags
>   KERNEL_FEATURES_append = " features/netfilter/netfilter.scc"
> +KERNEL_FEATURES_append = " taging/edf-stage.scc"
>   KERNEL_FEATURES_append_qemux86=" cfg/sound.scc"
>   KERNEL_FEATURES_append_qemux86-64=" cfg/sound.scc"
>   KERNEL_FEATURES_append_qemux86=" cfg/paravirt_kvm.scc"
>
> ----
>
> | To force apply this patch, use 'guilt push -f'
> | [ERROR] unable to complete push
> | pending patches are:
> | links/kernel-cache/arch/arm/v7-A15/ARM-LPAE-Invalidate-the-TLB-for-module-addresses-dur.patch
> | links/kernel-cache/arch/arm/arm-ARM-EABI-socketcall.patch
> | ERROR. could not update git tree
> | ERROR. Could not apply patches for qemux86.
> |        Patch failures can be resolved in the devshell (bitbake -c
> devshell linux-yocto)
> | ERROR: Function failed: do_patch (see
> /home/insop/mybuilds/master/tmp/work/qemux86-poky-linux/linux-yocto/3.8+gitAUTOINC+c2ed0f16fdec628242a682897d5d86df4547cf24_b170394a475b96ecc92cbc9e4b002bed0a9f69c5-r4.0/temp/log.do_patch.19405
> for further information)
> ERROR: Task 831
> (/home/insop/poky/meta/recipes-kernel/linux/linux-yocto_3.8.bb,
> do_patch) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1611 tasks of which 1606 didn't need to
> be rerun and 1 failed.
> No currently running tasks (1611 of 1648)
>
> ---
>
> 2. if I do this, it builds and seems okay, but how to set so that your
> "edf.cfg" can be applied as part of bitbaking?

I didn't have an "enable" fragment available, since I was the only
user and was still testing :) I just pushed a changed to the 3.8
repository for this.

http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.8/commit/?h=meta&id=cc572ff970662c844c0a8dd2dab93cc10b8b2a3f

You'd want KERNEL_FEATURES=" cfg/edf.scc"

to use this fragment in your builds. But note! Until I push
SRCREV updates to the main yocto branches and repository, you'll
need to make sure your mSRCREV_meta is the commit I point to above.

>
> diff --git a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> index 7c1dff7..7311ea7 100644
> --- a/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> +++ b/meta/recipes-kernel/linux/linux-yocto_3.8.bb
> @@ -1,12 +1,14 @@
>   require recipes-kernel/linux/linux-yocto.inc
>
>   KBRANCH_DEFAULT = "standard/base"
> -KBRANCH = "${KBRANCH_DEFAULT}"
> +KBRANCH_EDF = "standard/edf"
> +KBRANCH = "${KBRANCH_EDF}"
>
>   SRCREV_machine_qemuarm ?= "351d133943b50a9dfeee07661d44254722a19f04"
>   SRCREV_machine_qemumips  ?= "d529d082041142435587bd442b1235dbe1c72950"
>   SRCREV_machine_qemuppc ?= "8dcd155ad408658e9180d1630da2ac7e0ee70542"
> -SRCREV_machine_qemux86 ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5"
> +#SRCREV_machine_qemux86 ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5"
> +SRCREV_machine_qemux86 ?= "${AUTOREV}"
>   SRCREV_machine_qemux86-64 ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5"
>   SRCREV_machine ?= "b170394a475b96ecc92cbc9e4b002bed0a9f69c5"
>   SRCREV_meta ?= "c2ed0f16fdec628242a682897d5d86df4547cf24"
> insop at sputnik ~/poky(master) $
>
>
> 3. one way that I've tried is to pull out edf.cfg from yocto-kernel to
> "meta-realtime/recipes-kernel". (see other email more details).
> Is it okay?

We want to keep configuration fragments in a centralized place, since
as I tweak them over time, the ones I can't see will get out of sync.
And if you tweak/tune it, other users of the kernel in other layers or
ways, won't get the benefit of your changes.

I'm not saying that people aren't free to do this (they are, since
I can't force them), and it definitely gets your immediate work moving,
but we should try and consoldate/share as much as possible.

Cheers,

Bruce

>
> https://github.com/insop/meta-realtime/blob/master/recipes-kernel/linux/linux-yocto_3.8.bbappend
>
> Thank you.
>
> Insop
>
>
>
>
>
>>>
>>> I actually have:
>>>
>>> CONFIG_HIGH_RES_TIMERS = y
>>> CONFIG_PREEMPT = y
>>> CONFIG_HZ_1000 = y
>>> # CONFIG_NO_HZ is not set
>>>
>>> all the other options are not required (anymore, as the PREEMPT_RT,
>>> since SCHED_DEADLINE is currently based on 3.8-rc7).
>>
>>
>> Thanks Juri,
>>
>> (I switched to linux-yocto for the mailing list to spare the yocto
>> general list that I've been spamming with kernel talk :)
>>
>> I changed my fragment here to the settings you list above:
>>
>> http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.8/commit/?h=meta&id=eb882c36d6b71a029cfbc7809568ffe9abdc65ea
>>
>> And will get around to taking it for a spin shortly.
>>
>> Cheers,
>>
>> Bruce




More information about the linux-yocto mailing list