[oe] Documentation

Robert Foerster robert at erafx.com
Wed Dec 1 22:46:19 UTC 2010


On Wed, Dec 1, 2010 at 1:54 PM, Stefan Schmidt <stefan at datenfreihafen.org>wrote:

> Hello.
>
> On Wed, 2010-12-01 at 12:39, David Lambert wrote:
> > That is indeed the version of documentation that I was reading. To
> > be more specific, one of the subjects I was attempting to look up
> > was how to specialize a recipe using "amend.inc". I do not see any
> > documentation on this subject.
>
> We lack a good technical writer in the community. IIRC there was a blogpost
> from
> Khem about it and maybe some more infos on the mailling list. Thats of
> course
> not the most straight forward location for the information.
>
> If you searched together the information it would be great if you could
> send a
> patch updating the manual with it. :)
>
> regards
> Stefan Schmidt
>
>
I'm not an expert on the subject, but I've managed to utilize amend.inc
based on some information I pieced together from the irc logs.  I hope to
soon write an article on how to use amend.inc, but haven't yet found the
time.

(This is far from authoritative, but it's been working for me here)

You need to add the following to build-dir/conf/local.conf (can also go in
overlay/conf/site.conf).
INHERIT += "amend"

DEV_BASE = "${HOME}/dev/openembedded/dev"
COLLECTIONS = "${DEV_BASE}/overlay/recipes \
                ${DEV_BASE}/openembedded/recipes"

# By default, file:// SRC_URIs only look under the current .bb file.
# Prepend our overlays into the file:// search path, so we can override
# openembedded recipes' SRC_URI files. Also, ensure the openembedded
# files are always in the search path, so our overlay .bb's can
# reference upstream files.
FILESPATHBASE =. "${@ \
        ':'.join([os.path.join(recipedir, \
                                os.path.basename(os.path.dirname( \
                                                        d.getVar('FILE',
1)))) \
                for recipedir in d.getVar('COLLECTIONS', 1).split()])}:"


You'll need to make DEV_BASE and COLLECTIONS match your setup.  This assumes
that I have two trees with recipes:
 - openembedded
 - overlay

This makes sure that for a given recipe, my local overlay will be in its
FILESPATH.


Now, for example, I've added a patch to psplash to adjust the colors.
In overlay/recipes/psplash/ I have two files:
amend.inc:
PR .= "-amend"
SRC_URI += "file://0001-tweaked-for-company-colors.patch"

and my patch, named 0001-tweaked-for-company-colors.patch

Now, the new patch will be applied when psplash is built.  Also, I like
updating PR with -amend, this way the package is now shown
as psplash-0.0+svnr422-r34-amend, so that I can easily tell that I've
amended the package.

I'm sure there are others who can provide more/better information, but
that'll hopefully get you started.

Regards,
Bob Foerster



More information about the Openembedded-devel mailing list