All of lore.kernel.org
 help / color / mirror / Atom feed
* diff between "bitbake meta-toolchain" and "bitbake -c populate_sdk <target>?
@ 2021-03-19 14:22 Robert P. J. Day
  2021-03-19 17:00 ` [OE-core] " Andre McCurdy
  0 siblings, 1 reply; 3+ messages in thread
From: Robert P. J. Day @ 2021-03-19 14:22 UTC (permalink / raw)
  To: OE Core mailing list


  colleague just asked me about the difference between building an SDK
with either of:

  $ bitbake meta-toolchain
  $ bitbake -c populate_sdk <some target>

i know that the meta-toolchain recipe file contains little more than
inheriting populate_sdk so, without checking, i speculated wildly as
follows:

  "bitbake meta-toolchain" takes no target, so it's limited to
whatever info it can glean from local.conf and bitbake.conf and so on
and so on, things like MACHINE and DISTRO, and whatever assignments to
TOOLCHAIN_HOST_TASK, etc, it runs into in its travels; in essence,
it's a "generic" toolchain.

  on the other hand, "bitbake -c populate_sdk <target>" can, in
addition, consult the target recipe file where it can collect even
further SDK defining info, like what you find in core-image-sato.bb:

TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"

  at the risk of over-simplification, is that a not wholly inaccurate
explanation of the difference?

rday

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] diff between "bitbake meta-toolchain" and "bitbake -c populate_sdk <target>?
  2021-03-19 14:22 diff between "bitbake meta-toolchain" and "bitbake -c populate_sdk <target>? Robert P. J. Day
@ 2021-03-19 17:00 ` Andre McCurdy
  2021-03-19 17:55   ` Robert P. J. Day
  0 siblings, 1 reply; 3+ messages in thread
From: Andre McCurdy @ 2021-03-19 17:00 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list

On Fri, Mar 19, 2021 at 7:23 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>   colleague just asked me about the difference between building an SDK
> with either of:
>
>   $ bitbake meta-toolchain
>   $ bitbake -c populate_sdk <some target>
>
> i know that the meta-toolchain recipe file contains little more than
> inheriting populate_sdk so, without checking, i speculated wildly as
> follows:
>
>   "bitbake meta-toolchain" takes no target, so it's limited to
> whatever info it can glean from local.conf and bitbake.conf and so on
> and so on, things like MACHINE and DISTRO, and whatever assignments to
> TOOLCHAIN_HOST_TASK, etc, it runs into in its travels; in essence,
> it's a "generic" toolchain.

It's an example of a "pure" toolchain recipe. You are free to modify
it and add additional packages or use it as a reference to create your
own toolchain recipe. Here's another example of a pure toolchain
recipe from my current project:

  SUMMARY = "Installable toolchain for SK"
  LICENSE = "MIT"

  inherit populate_sdk

  TOOLCHAIN_TARGET_TASK_append = " packagegroup-sk-build-deps"

(As a side note, LICENSE still seems to be required in toolchain
recipes even though it's not in image recipes... it's a bug).

>   on the other hand, "bitbake -c populate_sdk <target>" can, in
> addition, consult the target recipe file where it can collect even
> further SDK defining info, like what you find in core-image-sato.bb:

You mean <image-recipe> instead of <target>. I don't think you can
create a toolchain from a normal recipe.

> TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
>
>   at the risk of over-simplification, is that a not wholly inaccurate
> explanation of the difference?

Sounds about right. Note that using the populate_sdk task for an image
recipe means your toolchain will contain some extra junk (e.g.
busybox, etc) which isn't required and won't be there in toolchains
created from a pure toolchain recipe (since in a pure toolchain recipe
you have direct control over TOOLCHAIN_TARGET_TASK).

They both basically do the same but the populate_sdk task for an image
recipe automatically sets TOOLCHAIN_TARGET_TASK and
TOOLCHAIN_HOST_TASK for you based on the contents of the image whereas
with a pure toolchain recipe you are responsible for controlling these
explicitly (or leaving them alone, in which case you'll get a minimal
toolchain, as you do with the meta-toolchain recipe (horrible naming
IMO)).

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OE-core] diff between "bitbake meta-toolchain" and "bitbake -c populate_sdk <target>?
  2021-03-19 17:00 ` [OE-core] " Andre McCurdy
@ 2021-03-19 17:55   ` Robert P. J. Day
  0 siblings, 0 replies; 3+ messages in thread
From: Robert P. J. Day @ 2021-03-19 17:55 UTC (permalink / raw)
  To: Andre McCurdy; +Cc: OE Core mailing list

On Fri, 19 Mar 2021, Andre McCurdy wrote:

> On Fri, Mar 19, 2021 at 7:23 AM Robert P. J. Day <rpjday@crashcourse.ca> wrote:
> >   colleague just asked me about the difference between building an SDK
> > with either of:
> >
> >   $ bitbake meta-toolchain
> >   $ bitbake -c populate_sdk <some target>
> >
> > i know that the meta-toolchain recipe file contains little more than
> > inheriting populate_sdk so, without checking, i speculated wildly as
> > follows:
> >
> >   "bitbake meta-toolchain" takes no target, so it's limited to
> > whatever info it can glean from local.conf and bitbake.conf and so on
> > and so on, things like MACHINE and DISTRO, and whatever assignments to
> > TOOLCHAIN_HOST_TASK, etc, it runs into in its travels; in essence,
> > it's a "generic" toolchain.
>
> It's an example of a "pure" toolchain recipe. You are free to modify
> it and add additional packages or use it as a reference to create your
> own toolchain recipe. Here's another example of a pure toolchain
> recipe from my current project:
>
>   SUMMARY = "Installable toolchain for SK"
>   LICENSE = "MIT"
>
>   inherit populate_sdk
>
>   TOOLCHAIN_TARGET_TASK_append = " packagegroup-sk-build-deps"

  i'd guessed as much ... is this actually written down somewhere in
the docs?

> (As a side note, LICENSE still seems to be required in toolchain
> recipes even though it's not in image recipes... it's a bug).

  yes, that does seem a bit odd.
>
> >   on the other hand, "bitbake -c populate_sdk <target>" can, in
> > addition, consult the target recipe file where it can collect even
> > further SDK defining info, like what you find in
> > core-image-sato.bb:
>
> You mean <image-recipe> instead of <target>. I don't think you can
> create a toolchain from a normal recipe.

  yup, that's what i meant.

> > TOOLCHAIN_HOST_TASK_append = " nativesdk-intltool nativesdk-glib-2.0"
> >
> >   at the risk of over-simplification, is that a not wholly inaccurate
> > explanation of the difference?
>
> Sounds about right. Note that using the populate_sdk task for an
> image recipe means your toolchain will contain some extra junk (e.g.
> busybox, etc) which isn't required and won't be there in toolchains
> created from a pure toolchain recipe (since in a pure toolchain
> recipe you have direct control over TOOLCHAIN_TARGET_TASK).
>
> They both basically do the same but the populate_sdk task for an
> image recipe automatically sets TOOLCHAIN_TARGET_TASK and
> TOOLCHAIN_HOST_TASK for you based on the contents of the image
> whereas with a pure toolchain recipe you are responsible for
> controlling these explicitly (or leaving them alone, in which case
> you'll get a minimal toolchain, as you do with the meta-toolchain
> recipe (horrible naming IMO)).

  all this sounds about right, thanks.

rday

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-19 17:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 14:22 diff between "bitbake meta-toolchain" and "bitbake -c populate_sdk <target>? Robert P. J. Day
2021-03-19 17:00 ` [OE-core] " Andre McCurdy
2021-03-19 17:55   ` Robert P. J. Day

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.