[yocto] image inheritance problem

Khem Raj raj.khem at gmail.com
Fri Jan 26 12:46:24 PST 2018


On Fri, Jan 26, 2018 at 11:49 AM, Martin Townsend
<mtownsend1973 at gmail.com> wrote:
> On Fri, Jan 26, 2018 at 7:17 PM, Martin Townsend
> <mtownsend1973 at gmail.com> wrote:
>> Hi Khem,
>>
>> On Fri, Jan 26, 2018 at 6:57 PM, Khem Raj <raj.khem at gmail.com> wrote:
>>> On 1/26/18 10:52 AM, Martin Townsend wrote:
>>>> Hi,
>>>>
>>>> I have an image say
>>>>
>>>> my-image-minimal.bb in one layer and and append this
>>>> (my-image-minimal.bbappend) in another layer.  In this append I'm adding
>>>> IMAGE_INSTALL += "kernel-modules"
>>>> for example.
>>>>
>>>> Now if I run
>>>> bitbake my-image-minimal -e | grep ^IMAGE_INSTALL
>>>> I see kernel-modules
>>>>
>>>> So bbappend is working, now I have another image
>>>>
>>>> my-image which has
>>>> requires /core/images/my-image-minimal.bb
>>>> ...
>>>>
>>>> But kernel-modules is not appearing in this image and
>>>> bitbake my-image -e | grep ^IMAGE_INSTALL
>>>>
>>>> confirms this.
>>>>
>>>> Any ideas as to what I'm doing wrong, I assume bitbake supports this.
>>>>
>>>
>>> in second case you are including the .bb file so its behaving as an
>>> include file.
>>> bbappend only applies to parsed recipes not include files.
>>>
>>
>> Thanks for the swift reply and clarifications on how requires/include works.
>>
>> Don't suppose you know of the best way of handling this situation?
>
> Not sure if it's the best way but I converted the bbappend to an image
> recipe my-minimal-image-xxx.bb
> and then include this as well as include will ignore it if the layer
> doesn't exist. Seems to work :)

thats probably ok. you can call it a .inc file and use include instead
of require to include it
that way you can include it in multiple image recipes or bbappends in
your own layers.


>
>>
>>>> I'm using the Krogoth release.
>>>>
>>>> Many Thanks in advance,
>>>> Martin.
>>>>
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto at yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto



More information about the yocto mailing list