Bug 5429

Summary: Add ability for SDK-from-image to pick up additional host/target tools automatically
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Unassigned <unassigned>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: Medium CC: khays, meta.mr.watcher, meta.watcher, otavio, randy.macleod, sgw
Version: 1.6   
Target Milestone: Future   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Paul Eggleton 2013-10-31 11:21:44 UTC
If you create an SDK from an image using bitbake -c populate_sdk <image>, it contains all of the development files for the packages in the image but likely not any of the tools. If we want this functionality to completely replace monolithic SDK recipes such as meta-toolchain-qte, we need to somehow make the addition of the tools packages to TOOLCHAIN_HOST_TASK happen automatically. 

It's not yet clear to me how the link between target packages and host development tools packages should be made, but the ideal situation would be such that for example if I have an image that only has my Qt-based application in IMAGE_INSTALL and no other references to Qt, that is sufficient to cause nativesdk-packagegroup-${QTNAME}-toolchain-host (where ${QTNAME} is qt or qte depending on whether my application uses Qt or Qt/Embedded) to be added to TOOCHAIN_HOST_TASK and thus add it to the host portion of the SDK.
Comment 1 Otavio Salvador 2014-02-07 14:36:42 UTC
One way I think it could be done is adding a custom field in the package which is used during SDK generation.

I'd say:

SDKTARGETRDEPENDS
SDKHOSTRDEPENDS

So packages could say:

- I need those host tools
- I need those target libraries
Comment 2 Paul Eggleton 2014-02-07 14:39:41 UTC
Hmm, good idea. In fact, it might not even need to be in the runtime package - if it feeds into pkgdata then the SDK construction code can just look it up there.
Comment 3 Otavio Salvador 2014-02-07 14:44:58 UTC
I think it needs to be in the package; bearing on mind we are intending to provide support for generating images using external tools, the same should be supported for a toolchain so it seems good to have it available.
Comment 4 Paul Eggleton 2017-08-01 09:34:39 UTC
With regard to Otavio's comment above I don't think we can do it within the packaging - then you would have to make modifications to the package manager or it would never work at runtime. Whilst we are supporting external image creation (e.g. through wic) the actual content of the image is still assembled under our control.

I'd have to double check but this may be solved fairly easily in the extensible SDK - if the standard dependencies don't ensure it already then they should be easy to add, since we are effectively dealing with the build system rather than a separate packaging namespace.