Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Mark Hatle <mark.hatle@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 6/6] image.bbclass: Add support to build the SDK in parallel with the image
Date: Mon, 2 Jul 2012 16:37:24 -0500	[thread overview]
Message-ID: <4FF21494.2030105@windriver.com> (raw)
In-Reply-To: <1341263124.2886.44.camel@x121e.pbcl.net>

On 7/2/12 4:05 PM, Phil Blundell wrote:
> On Mon, 2012-07-02 at 15:32 -0500, Mark Hatle wrote:
>> On 7/2/12 3:12 PM, Phil Blundell wrote:
>>> On Sat, 2012-06-30 at 00:07 -0500, Mark Hatle wrote:
>>>> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
>>>> index 4f50376..7e41982 100644
>>>> --- a/meta/classes/image.bbclass
>>>> +++ b/meta/classes/image.bbclass
>>>> @@ -3,6 +3,11 @@ inherit rootfs_${IMAGE_PKGTYPE}
>>>>    IMAGETEST ?= "dummy"
>>>>    inherit imagetest-${IMAGETEST}
>>>>
>>>> +inherit populate_sdk_base
>>>
>>> This seems to haul a vast amount of stuff into image.bbclass.  Is it
>>> really necessary to have all that in there by default?
>>
>> Yes, in order to build an SDK that matches an image, it is.
>>
>> We need to have all of the code that is needed for both IMAGE and SDK
>> generation.  The SDK code is only active if and only if you call the
>> populate_sdk task.
>
> Can the SDK bits not live in another class which is applied on top of
> the images via BBCLASSEXTEND or some such?  I don't entirely understand
> why this all needs to be in image.bbclass if, as you say, it's inactive
> by default.

In order to build an SDK that matches an images behavior, we need information 
that can only be supplied from an image recipe, and corresponding image.bbclass 
processing.  Once we have that information, then we can generate an SDK.

The SDK code needs to be included into this stream in order to get the 
information for all possible image types, otherwise we'd have to modify each 
image type that you might possibly want an SDK for.  I believe that is 
unreasonable, since if it works for one image type, why shouldn't it work for 
all of them.

The code is not enabled by default, i.e. in the main task order, specifically to 
preserve existing behavior for the majority of users who don't want a matching 
SDK each time they build an image.  (Building an SDK usually involves building 
somewhere around 800-1000 extra tasks, depending on configuration.)

The SDK code is only enabled when the bitbake -c populate_sdk <image recipe> is 
called.  This also avoids all of the standard tasks from the image recipe.

> The code itself looks harmless enough to a casual inspection, but the
> increased number of nested "inherits" does make it rather more difficult
> to understand what's going on, since you have to inspect all of the
> inherited files to understand whether or not they are doing anything.

The image class and populate_sdk_base class are designed to continue to be 
managed and handled separately from a development point of view.  The only 
interconnection is (in image.bbclass) the definiton of:

TOOLCHAIN_TARGET_TASK += "${PACKAGE_INSTALL}"
TOOLCHAIN_TARGET_TASK_ATTEMPTONLY += "${PACKAGE_INSTALL_ATTEMPTONLY} 
${PACKAGE_GROUP_dev-pkgs} ${PACKAGE_GROUP_dbg-pkgs}"

(note: the PACKAGE_GROUP_*, PACKAGE_INSTALL and PACKAGE_INSTALL_ATTEMPTONLY are 
the items that are only known by the image recipe/image.bbclass..)

If you are not using the SDK, the values get set and ignored.

> If we really are going to have this included in image.bbclass, though,
> then it might be worth trying to eliminate the duplicate definitions
> between image.bbclass and populate_sdk{_base}.bbclass.  I think PID and
> EXCLUDE_FROM_WORLD, at least, are defined in both places and I suspect
> there are probably some more.

If these duplications were removed, then the standalone SDKs such as 
meta-toolchain or meta-toolchain-gmae would fail.  By leaving them there, the 
behaviors are kept in sync, those values happen to be the same in both, and it 
allows the SDK to continue to be used separately as it has always been.

We could conceivable remove them from the image.bbclass, but if someone decides 
later to break apart this code -- then they'll have to re-add them to get the 
desired behavior.  I felt it was safer to leave the image and populate_sdk as 
complete as possible.

--Mark

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>





  reply	other threads:[~2012-07-02 21:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-30  5:07 [PATCH 0/6] Enable the ability to create an image matching SDK Mark Hatle
2012-06-30  5:07 ` [PATCH 1/6] Fix manual log file paths Mark Hatle
2012-06-30  5:07 ` [PATCH 2/6] populate_sdk.bbclass: Split into two parts Mark Hatle
2012-06-30  5:07 ` [PATCH 3/6] populate_sdk: Allow for attempt only packages in the SDK Mark Hatle
2012-06-30  5:07 ` [PATCH 4/6] populate_sdk_base.bbclass: Change to using task specific depends Mark Hatle
2012-06-30  5:07 ` [PATCH 5/6] populate_sdk: enable basic multilib support Mark Hatle
2012-06-30  5:07 ` [PATCH 6/6] image.bbclass: Add support to build the SDK in parallel with the image Mark Hatle
2012-07-02 19:44   ` Saul Wold
2012-07-02 19:49     ` Mark Hatle
2012-07-02 20:05       ` Saul Wold
2012-07-02 20:12   ` Phil Blundell
2012-07-02 20:32     ` Mark Hatle
2012-07-02 21:05       ` Phil Blundell
2012-07-02 21:37         ` Mark Hatle [this message]
2012-07-03 23:47   ` Saul Wold
2012-07-02 15:20 ` [PATCH 0/6 v2] Enable the ability to create an image matching SDK McClintock Matthew-B29882
2012-07-02 16:27   ` Mark Hatle

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=4FF21494.2030105@windriver.com \
    --to=mark.hatle@windriver.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox