Bug 9297 - Toaster: Simplify building extensible SDK
Summary: Toaster: Simplify building extensible SDK
Status: NEW
Alias: None
Product: Toaster
Classification: Build System, Metadata & Runtime
Component: toaster (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium enhancement
Target Milestone: Future
Assignee: Toaster default assignee
QA Contact:
URL:
Whiteboard: GUI design pending
Depends on:
Blocks:
 
Reported: 2016-03-17 22:31 UTC by Henry Bruce
Modified: 2023-12-14 04:20 UTC (History)
6 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
eSDK configuration form (sketch) (10.56 MB, image/png)
2016-06-02 11:15 UTC, Belen Barros Pena
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henry Bruce 2016-03-17 22:31:08 UTC
Expected behavior
-----------------
When selecting an image recipe present an 'also build eSDK' checkbox 

Observed behavior
-----------------
Building the eSDk requires setting a number of variables then invoking populate_sdk_ext task for your image.

Set the following variables
 SDK_EXT_TYPE = "minimal"
 SDK_INCLUDE_PKGDATA = "1"
 SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"
 SSTATE_MIRRORS = "file://.* http://path/to/build/sstate-cache/PATH" 

Select recipe 'your-image:populate_sdk_ext' and build.
Comment 1 Henry Bruce 2016-05-20 18:30:57 UTC
Update to Expected behavior
-----------------
When selecting an image recipe present an 'also build eSDK' checkbox 
If checkbox is selected, open a textbox to enter SSTATE_MIRRORS URL
Comment 2 Belen Barros Pena 2016-05-23 08:59:53 UTC
(In reply to comment #1)
> Update to Expected behavior
> -----------------
> When selecting an image recipe present an 'also build eSDK' checkbox 
> If checkbox is selected, open a textbox to enter SSTATE_MIRRORS URL

I would need to confirm: 

1) what are the options people *must* set when building the eSDK
2) what are their valid values (if a set of valid values exist) and 
3) for which ones we can provide sane defaults. 

In the comments we have so far:

 SDK_EXT_TYPE = "minimal"

What are the eSDK types? Should "minimal" be the default value?

 SDK_INCLUDE_PKGDATA = "1"

Are the values either 0 or 1? Should 1 be the default value?

 SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"

Does this whitelist whichever URL(s) people are entering as the SSTATE_MIRRORS? Is this something we want to expose? Could we transparently set it to SSTATE_MIRRORS whenever users provide one or more SSTATE_MIRRORS URL?

 SSTATE_MIRRORS = "file://.* http://path/to/build/sstate-cache/PATH" 

Is it mandatory to set this variable to something? Can it be blank? Can we provide a default value?

Thanks!
Comment 3 Henry Bruce 2016-05-23 16:15:11 UTC
I added Paul to get his input.
Comment 4 Paul Eggleton 2016-05-30 05:35:45 UTC
Strictly speaking there aren't any must-set options - there are defaults for all of the settings. However let's take each variable in turn:

SDK_EXT_TYPE can be "full" (the default) or "minimal". I think the default is reasonable, because "minimal" requires that you set up and configure an sstate mirror, whereas with "full" you get an installer that itself contains all the artifacts (but is significantly larger as a result).

SDK_INCLUDE_PKGDATA can be "0" (default) or "1". The default is reasonable because enabling this basically builds "world" which can take quite a long time (the assumption is that if you are enabling this you're probably building a distro already and therefore you're probably going to be building world anyway). It's possible we may need to look at tuning this further though.

SDK_LOCAL_CONF_WHITELIST allows variables through from the build system configuration to the configuration used within the extensible SDK that gets built. SSTATE_MIRRORS is *blacklisted* by default because the assumption is any mirrors used on the build machine may well not be accessible to users of the SDK; by whitelisting the variable you are explicitly saying all the mirrors you're providing via SSTATE_MIRRORS are OK to be used within the extensible SDK.

We can't really provide a default for SSTATE_MIRRORS because no default mirror would contain the actual artifacts produced in the build (that you're about to start from Toaster). There's a step required where you expose the build artifacts produced there via the specified URL(s), and that's going to be highly dependent on the user's configuration.
Comment 5 Belen Barros Pena 2016-06-02 11:14:35 UTC
Thanks Paul: this clears up quite a few of my questions. 

It looks like we can provide defaults that won't require any additional user input, beyond saying "please build me an eSDK for the specified image target".

Users should be able to access a "configuration" form where they can set SDK_INCLUDE_PKGDATA and SDK_EXT_TYPE. 

If they choose "minimal" as their SDK_EXT_TYPE, then we'll ask them to set SSTATE_MIRRORS and we'll transparently set 

SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS"

without user intervention (since this seems required).

Attached a rough sketch.
Comment 6 Belen Barros Pena 2016-06-02 11:15:15 UTC
Created attachment 3208 [details]
eSDK configuration form (sketch)
Comment 7 Belen Barros Pena 2016-07-29 11:25:17 UTC
A first design proposal is available here

https://youtu.be/NH2T3lebh8A