All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Lock <josh@openedhand.com>
To: poky@yoctoproject.org
Subject: Re: questions about bblayers idioms
Date: Tue, 25 Jan 2011 10:15:06 +0000	[thread overview]
Message-ID: <1295950506.4384.11.camel@scimitar> (raw)
In-Reply-To: <AANLkTikO8-sLM_qMNvj=Xpt723iL-eA2MJPxY6YwdaLQ@mail.gmail.com>

On Tue, 2011-01-25 at 11:59 +1000, Angus Lees wrote:
> I've been trying to play nice and describe my poky changes in
> self-contained layers.
> I have accumulated a bunch of questions about some common problems
> I've hit, and I'm sorry if some of these are FAQs:

The layers are still new and I'm glad to see people using them, if
there's documentation missing we'll be glad to add it.


> 1. *.bbappend lets me modify *.bb files.  How do I incrementally
> modify other files?
> 
> Eg: I'd really like to add something to gcc-common.inc (for example).
> Do I need to add a family of gcc-*.bbappend files to hook in the
> common change?

That seems like it would work, I'm not sure if there's a neater
alternative...

> 
> 1a. How do I modify/fix a bbclass file?
> 
> In particular {siteinfo,insane}.bbclass need to be modified to add new
> architectures, which seems like a common task.
> Copying and modifying (as I have done), gets increasingly ugly now
> that I have two layers, which each want to add new architectures (one
> SDK, one target).

Not something I've tried either, but you should be able to use the
inclusion capabilities of BitBake to create a class which includes the
class from the core and adds whatever you require.

http://bitbake.berlios.de/manual/ch02.html#id869194

> 
> 2. BBCLASSEXTEND doesn't work in .bbappend files.
> 
> Is this correct?  I tried to add BBCLASSEXTEND+="nativesdk" to a
> .bbappend file but it didn't seem to have any effect.

Not sure, is this simply a case where the += syntax requires a space,
i.e try:

BBCLASSEXTEND += " nativesdk"
or
BBCLASSEXTEND =+ "nativesdk"

http://bitbake.berlios.de/manual/ch02.html#id868981

Though I can't see why we wouldn't take a change like that into the
core. 

> 
> 3. What is the standard idiom for picking up patches from layers?
> 
> I've been using something like this:
>  THISDIR := "${@os.path.dirname(bb.data.getVar('FILE', d, True))}"
>  FILESPATH =. "${@base_set_filespath(["${THISDIR}/${BP}"], d)}:"

In the emenlow layer we use:

FILESEXTRAPATHS := "${THISDIR}/${PN}"

THISDIR is already defined for you in base.bbclass

This is vaguely alluded to in the BSP document:
http://www.yoctoproject.org/docs/poky-ref-manual/poky-ref-manual.html#bsp-filelayout-kernel

> 
> But this gets increasingly more difficult once you have multiple
> layers and I had to use unique names for THISDIR in each layer :(
> Is there some better way to handle this?

Hopefully this will get you a bit further until someone better informed
comes along.

Regards,
Joshua
-- 
Joshua Lock
        Intel Open Source Technology Centre



      reply	other threads:[~2011-01-25 10:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25  1:59 questions about bblayers idioms Angus Lees
2011-01-25 10:15 ` Joshua Lock [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1295950506.4384.11.camel@scimitar \
    --to=josh@openedhand.com \
    --cc=poky@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.