On Fri, 19 Mar 2021, Andre McCurdy wrote: > On Fri, Mar 19, 2021 at 7:23 AM Robert P. J. Day <[email protected]> > 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
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149692): https://lists.openembedded.org/g/openembedded-core/message/149692 Mute This Topic: https://lists.openembedded.org/mt/81456418/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
