* How to require image recipe from another layer?
@ 2011-12-28 20:06 autif khan
2011-12-28 20:12 ` Chris Larson
0 siblings, 1 reply; 8+ messages in thread
From: autif khan @ 2011-12-28 20:06 UTC (permalink / raw)
To: yocto
Hi,
I have the following problem and I am not sure how to resolve it.
I have created my own layer (say) meta-autif
In the layer - I have my recipes (say) helloworld, many more may be
Now I want to add these packages to the core-image-sato recipe for the
image. This recipe resides in meta layer (under recipes-sato/images)
I have the following recipe (say) core-image-autif.bb
require core-image-sato.bb
IMAGE_FEATURES += "helloworld"
When I execute "bitbake core-image-autif", I get the following error
ERROR: Could not include required file core-image-sato.bb
However, when I copy core-image-sato.bb from meta/recipes-sato/images
to the same directory as core-image-autif.bb, I get the image (with my
helloworld and other apps)
My question is - if there is a way to include/require a recipe form a
different directory? If yes, what is it? If not, is there a
recommended solution - that scales (if the core-image-sato.bb changes,
that should be reflected in core-image-autif).
Thanks
Autif
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-28 20:06 How to require image recipe from another layer? autif khan
@ 2011-12-28 20:12 ` Chris Larson
2011-12-28 20:22 ` autif khan
0 siblings, 1 reply; 8+ messages in thread
From: Chris Larson @ 2011-12-28 20:12 UTC (permalink / raw)
To: autif khan; +Cc: yocto
On Wed, Dec 28, 2011 at 1:06 PM, autif khan <autif.mlist@gmail.com> wrote:
> I have the following problem and I am not sure how to resolve it.
>
> I have created my own layer (say) meta-autif
>
> In the layer - I have my recipes (say) helloworld, many more may be
>
> Now I want to add these packages to the core-image-sato recipe for the
> image. This recipe resides in meta layer (under recipes-sato/images)
>
> I have the following recipe (say) core-image-autif.bb
>
> require core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
You want something like:
require recipes-core/images/core-image-sato.bb
--
Christopher Larson
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-28 20:12 ` Chris Larson
@ 2011-12-28 20:22 ` autif khan
2011-12-28 20:31 ` Chris Larson
0 siblings, 1 reply; 8+ messages in thread
From: autif khan @ 2011-12-28 20:22 UTC (permalink / raw)
To: Chris Larson; +Cc: yocto
Thats right. Accounting for the relative, path, the following recipe
seems to works.
require ../../../meta/recipes-sato/images/core-image-sato.bb
IMAGE_FEATURES += "helloworld"
Thanks for the help
Autif
On Wed, Dec 28, 2011 at 3:12 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Wed, Dec 28, 2011 at 1:06 PM, autif khan <autif.mlist@gmail.com> wrote:
>> I have the following problem and I am not sure how to resolve it.
>>
>> I have created my own layer (say) meta-autif
>>
>> In the layer - I have my recipes (say) helloworld, many more may be
>>
>> Now I want to add these packages to the core-image-sato recipe for the
>> image. This recipe resides in meta layer (under recipes-sato/images)
>>
>> I have the following recipe (say) core-image-autif.bb
>>
>> require core-image-sato.bb
>> IMAGE_FEATURES += "helloworld"
>
> You want something like:
>
> require recipes-core/images/core-image-sato.bb
> --
> Christopher Larson
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-28 20:22 ` autif khan
@ 2011-12-28 20:31 ` Chris Larson
2011-12-28 20:43 ` autif khan
0 siblings, 1 reply; 8+ messages in thread
From: Chris Larson @ 2011-12-28 20:31 UTC (permalink / raw)
To: autif khan; +Cc: yocto
On Wed, Dec 28, 2011 at 1:22 PM, autif khan <autif.mlist@gmail.com> wrote:
> Thats right. Accounting for the relative, path, the following recipe
> seems to works.
>
> require ../../../meta/recipes-sato/images/core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
That's not what I was referring to. You don't need the full relative
path. It will automatically search BBPATH if you require a relative
path. if you do require recipes-sato/images/core-image-sato.bb, it
will search your layers and find it.
--
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-28 20:31 ` Chris Larson
@ 2011-12-28 20:43 ` autif khan
2011-12-29 18:14 ` autif khan
0 siblings, 1 reply; 8+ messages in thread
From: autif khan @ 2011-12-28 20:43 UTC (permalink / raw)
To: Chris Larson; +Cc: yocto
Must be the hangover from the holidays!
I typed the path as you suggested (I did replace recipes-core with
recipes-sato), but I must have had a type somewhere and it did not
work and gave the same error. I then tried the relative path - which I
copied and pasted - instead of typing and it worked. So I assumed
thats what it must have been.
Now, I have the following as my recipe and it works just fine. As I
said - must be the hangover from the holidays.
require recipes-sato/images/core-image-sato.bb
IMAGE_FEATURES += "helloworld"
Thanks again
Autif
On Wed, Dec 28, 2011 at 3:31 PM, Chris Larson <clarson@kergoth.com> wrote:
> On Wed, Dec 28, 2011 at 1:22 PM, autif khan <autif.mlist@gmail.com> wrote:
>> Thats right. Accounting for the relative, path, the following recipe
>> seems to works.
>>
>> require ../../../meta/recipes-sato/images/core-image-sato.bb
>> IMAGE_FEATURES += "helloworld"
>
>
> That's not what I was referring to. You don't need the full relative
> path. It will automatically search BBPATH if you require a relative
> path. if you do require recipes-sato/images/core-image-sato.bb, it
> will search your layers and find it.
> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-28 20:43 ` autif khan
@ 2011-12-29 18:14 ` autif khan
2011-12-29 18:23 ` Paul Eggleton
2011-12-29 18:27 ` Chris Larson
0 siblings, 2 replies; 8+ messages in thread
From: autif khan @ 2011-12-29 18:14 UTC (permalink / raw)
To: Chris Larson; +Cc: yocto
Another recipe question along the same path.
The following recipe does not actually put helloworld in the image -
it does not even build it.
require recipes-sato/images/core-image-sato.bb
IMAGE_FEATURES += "helloworld"
The following one does.
require recipes-sato/images/core-image-sato.bb
IMAGE_INSTALL += "helloworld"
I am guessing that if I have several recipes in my layer (say) hw1,
hw2, hw3 etc, I would have to use the following recipe.
require recipes-sato/images/core-image-sato.bb
IMAGE_INSTALL += "hw1 hw2 hw3 etc"
However, I am sure there is a way to ties these up with
"IMAGE_FEATURE" variable.
Can you please help me with setting up my recipes so that all the
hello world apps are included when I use the following recipe.
require recipes-sato/images/core-image-sato.bb
IMAGE_FEATURES += "helloworld"
I am guessing that I would have to tell the hw1 recipe that it is a
helloworld feature. How do I go about doing this?
Here it is for reference:
DESCRIPTION = "hello world app"
SECTION = "autif"
LICENSE = "SomeLic"
LIC_FILES_CHKSUM = "file://COPYING;md5=178c09540123ca26c1b9c1ccbfbcde87"
PR = "r0"
SRC_URI = "file://COPYING \
file://helloworld.c"
S = "${WORKDIR}"
do_compile () {
${CC} helloworld.c -o helloworld
}
do_install () {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
Thanks again!
Autif
On Wed, Dec 28, 2011 at 3:43 PM, autif khan <autif.mlist@gmail.com> wrote:
> Must be the hangover from the holidays!
>
> I typed the path as you suggested (I did replace recipes-core with
> recipes-sato), but I must have had a type somewhere and it did not
> work and gave the same error. I then tried the relative path - which I
> copied and pasted - instead of typing and it worked. So I assumed
> thats what it must have been.
>
> Now, I have the following as my recipe and it works just fine. As I
> said - must be the hangover from the holidays.
>
> require recipes-sato/images/core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
>
> Thanks again
>
> Autif
>
> On Wed, Dec 28, 2011 at 3:31 PM, Chris Larson <clarson@kergoth.com> wrote:
>> On Wed, Dec 28, 2011 at 1:22 PM, autif khan <autif.mlist@gmail.com> wrote:
>>> Thats right. Accounting for the relative, path, the following recipe
>>> seems to works.
>>>
>>> require ../../../meta/recipes-sato/images/core-image-sato.bb
>>> IMAGE_FEATURES += "helloworld"
>>
>>
>> That's not what I was referring to. You don't need the full relative
>> path. It will automatically search BBPATH if you require a relative
>> path. if you do require recipes-sato/images/core-image-sato.bb, it
>> will search your layers and find it.
>> --
>> Christopher Larson
>> clarson at kergoth dot com
>> Founder - BitBake, OpenEmbedded, OpenZaurus
>> Maintainer - Tslib
>> Senior Software Engineer, Mentor Graphics
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: How to require image recipe from another layer?
2011-12-29 18:14 ` autif khan
@ 2011-12-29 18:23 ` Paul Eggleton
2011-12-29 18:27 ` Chris Larson
1 sibling, 0 replies; 8+ messages in thread
From: Paul Eggleton @ 2011-12-29 18:23 UTC (permalink / raw)
To: yocto
On Thursday 29 December 2011 13:14:20 autif khan wrote:
> The following recipe does not actually put helloworld in the image -
> it does not even build it.
>
> require recipes-sato/images/core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
>
> The following one does.
>
> require recipes-sato/images/core-image-sato.bb
> IMAGE_INSTALL += "helloworld"
>
> I am guessing that if I have several recipes in my layer (say) hw1,
> hw2, hw3 etc, I would have to use the following recipe.
>
> require recipes-sato/images/core-image-sato.bb
> IMAGE_INSTALL += "hw1 hw2 hw3 etc"
>
> However, I am sure there is a way to ties these up with
> "IMAGE_FEATURE" variable.
IMAGE_FEATURES do not refer to individual packages, they are specially defined
package groups (or behaviours in the case of e.g. package-management). If you
have a look at classes/core-image.bbclass and classes/image.bbclass you can
see how the package groups are set up (PACKAGE_GROUP_featurename). As you
found, at the moment there is nothing checking that features in IMAGE_FEATURES
are valid, thus as there is no PACKAGE_GROUP_helloworld and nothing checking
for "helloworld" in IMAGE_FEATURES, it does nothing.
However, if all you want to do is add a few specific packages it's just fine to
add their names to the end of IMAGE_INSTALL - IMAGE_FEATURES might be
overkill.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: How to require image recipe from another layer?
2011-12-29 18:14 ` autif khan
2011-12-29 18:23 ` Paul Eggleton
@ 2011-12-29 18:27 ` Chris Larson
1 sibling, 0 replies; 8+ messages in thread
From: Chris Larson @ 2011-12-29 18:27 UTC (permalink / raw)
To: autif khan; +Cc: yocto
On Thu, Dec 29, 2011 at 11:14 AM, autif khan <autif.mlist@gmail.com> wrote:
> Can you please help me with setting up my recipes so that all the
> hello world apps are included when I use the following recipe.
>
> require recipes-sato/images/core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
>
> I am guessing that I would have to tell the hw1 recipe that it is a
> helloworld feature. How do I go about doing this?
commit f9f4416a8cfbd37c7d3a8eb19ee82820e2e6b38cAuthor: Chris Larson
<chris_larson@mentor.com>Date: Mon Aug 8 16:09:37 2011 -0700
image: implement IMAGE_FEATURES
IMAGE_FEATURES is analagous to DISTRO_FEATURES and
MACHINE_FEATURES, for root filesystem construction. Currently, the
only supported features are any defined package groups, as used by
the oe.packagegroup python module.
Example usage:
PACKAGE_GROUP_myfeature = "vim iptables" IMAGE_FEATURES
+= "myfeature"
Signed-off-by: Chris Larson <chris_larson@mentor.com>--
Christopher Larson
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-12-29 18:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-28 20:06 How to require image recipe from another layer? autif khan
2011-12-28 20:12 ` Chris Larson
2011-12-28 20:22 ` autif khan
2011-12-28 20:31 ` Chris Larson
2011-12-28 20:43 ` autif khan
2011-12-29 18:14 ` autif khan
2011-12-29 18:23 ` Paul Eggleton
2011-12-29 18:27 ` Chris Larson
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.