From: Darren Hart <dvhart@linux.intel.com>
To: Philip Balister <philip@balister.org>
Cc: Yocto Project <yocto@yoctoproject.org>
Subject: Re: RFC: User configurable recipe features
Date: Wed, 12 Oct 2011 08:41:56 -0700 [thread overview]
Message-ID: <4E95B544.2020907@linux.intel.com> (raw)
In-Reply-To: <4E94DCD5.2060200@balister.org>
On 10/11/2011 05:18 PM, Philip Balister wrote:
> On 10/11/2011 07:51 PM, Khem Raj wrote:
>> On Tue, Oct 11, 2011 at 3:15 PM, Richard Purdie
>> <richard.purdie@linuxfoundation.org> wrote:
>>> On Mon, 2011-10-10 at 11:41 -0700, Darren Hart wrote:
>>>> As part of working on meta-tiny, I've come across a need (want?) to
>>>> present users with the ability to select some set of features in a local
>>>> configuration file that will impact the build of the image and a set of
>>>> recipes.
>>>>
>>>> It is currently possible to affect which packages are installed in an
>>>> image with variables like POKY_EXTRA_INSTALL. What I'm not finding a way
>>>> to do is specify some set of features that will impact how a recipe is
>>>> built.
>>>>
>>>> For example, a user may or may not want networking support or virtual
>>>> terminal support in their image. This impacts both the kernel and
>>>> busybox (at least). The linux-yocto infrastructure provides us with
>>>> config fragment functionality, something similar will need to be added
>>>> to busybox. Access to that is still bound to the machine config by means
>>>> of the SRC_URI machine override mechanism, but it would be useful to be
>>>> able to influence it from the image config or the user's local config.
>>>>
>>>> For example, when building a tiny image I may decide I do not want VT
>>>> nor INET support. I might wish to specify this like this (by removing
>>>> them from the default features):
>>>>
>>>> local.conf:
>>>> #CORE_IMAGE_TINY_FEATURES = "VT INET MDEV"
>>>> CORE_IMAGE_TINY_FEATURES = "MDEV"
>>>>
>>>> I would want this to affect linux-yocto-tiny by dropping the vt.cfg and
>>>> inet.cfg fragments from the SRC_URI (or from the .scc descriptor files
>>>> assembled by the linux-yocto meta indrastructure).
>>>>
>>>> Busybox would need a similar configuration mechanism, and would also
>>>> need to add a "no-vt-support.patch" patch to the SRC_URI to avoid a
>>>> bug/oversight in the busybox init routine.
>>>>
>>>> I'd appreciate some help determining the proper bitbake way of doing
>>>> this. I want to avoid having to create a new machine.conf and/or recipes
>>>> for every possible combination of features that a user may want to turn
>>>> on or off.
>>>
>>> We have a few mechanisms around for this but its a difficult problem to
>>> do totally generically since everyone has their own ideas about what
>>> should/shouldn't happen.
>>>
>>> One tricky aspect is that some people care about package feeds and the
>>> output into those needs to be deterministic. This is why DISTRO_FEATURES
>>> exist which state things like "does x11 make sense"? This means dbus may
>>> or may not be compiled with X but given a set of policy decisions by the
>>> distro, the output is determined.
>>>
>>> Recently we've taken the idea of PACKAGECONFIG on board. This is recipe
>>> level policy which can enable/disable features in a given recipe (e.g.
>>> does gsteamer depend on and build flac or not?). Whilst we have a high
>>> level setup for this for autotools recipes, this is probably something
>>> we need to do a more custom implementation of for busybox and the
>>> features you mention above would map well to this. It would be good to
>>> have a standardised way of representing this (and we may also want to
>>> look at moving the kernel feature control towards this variable name
>>> too).
>>>
>>> What we need to be really really careful about is getting the
>>> namespacing right and your CORE_IMAGE_TINY_FEATURES = "VT INET MDEV"
>>> example above scares me as it mixes up several different things. My
>>> worry is for example trying to build two different versions of busybox
>>> in the same tmpdir depending on what image you build, for example what
>>> does "bitbake core-image-tiny core-image-sato" do?
>>>
>>> Contrast this to some settings:
>>>
>>> PACKAGECONFIG_pn-linux-yocto = "vt inet"
>>> PACKAGECONFIG_pn-busybox = "mdev"
>>>
>>> which then mean you have one set of configuration for these recipes and
>>> its clear what the bitbake command above would result in.
>>>
>>> One of the bigger problems we're going to have with tiny is its
>>> effectively a different set of distro settings to our normal builds. The
>>> side effect of that is that you couldn't share a tmpdir with a "big"
>>> build but I'm not sure that is an issue in practise, we just need to do
>>> it in a way which doesn't give us the nasty configuration corner cases.
>>>
>>> So I guess what I'm saying is the end result of your work is likely a
>>> "poky-tiny" distro setting which would take the "poky" distro but tweak
>>> some pieces for really small images. It would need a separate tmpdir and
>>> we should look in the PACKAGECONFIG variable direction for handling
>>> recipe specific customisations...
>>>
>>
>> FWIW I agree it seems like a new distro to me. I think if we add more to mix
>> it just will complicate the customizations and may even make it
>> difficult to share
>> things.
>
> Along the same line of thought, does this overlap with the micro distro?
>
Hrm... the micro distro? What's this?
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-10-12 15:42 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-10 18:41 RFC: User configurable recipe features Darren Hart
2011-10-11 15:53 ` McClintock Matthew-B29882
2011-10-11 16:06 ` Darren Hart
2011-10-11 22:15 ` Richard Purdie
2011-10-11 23:51 ` Khem Raj
2011-10-12 0:18 ` Philip Balister
2011-10-12 15:41 ` Darren Hart [this message]
2011-10-12 15:47 ` Koen Kooi
2011-10-12 15:52 ` Paul Eggleton
2011-10-12 16:49 ` Darren Hart
2011-10-12 15:40 ` Darren Hart
2011-10-11 23:49 ` Tim Bird
2011-10-12 15:55 ` Darren Hart
2011-10-12 18:44 ` Khem Raj
2011-10-12 19:30 ` Koen Kooi
2011-10-12 19:32 ` Khem Raj
2011-10-12 20:15 ` Darren Hart
2011-10-12 19:13 ` Tim Bird
2011-10-12 16:59 ` Darren Hart
2011-10-12 17:19 ` Tim Bird
2011-10-12 19:22 ` William Mills
2011-10-13 8:30 ` Jack Mitchell
2011-10-13 18:33 ` William Mills
2011-10-13 20:50 ` Khem Raj
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=4E95B544.2020907@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=philip@balister.org \
--cc=yocto@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.