Bug 11044 - wic should support multiple boot labels such as boot and install targets
Summary: wic should support multiple boot labels such as boot and install targets
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: Medium normal
Target Milestone: 2.3
Assignee: Ed Bartosh
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-02-10 14:52 UTC by Saul Wold
Modified: 2017-03-31 22:57 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: New (Never tested)
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Saul Wold 2017-02-10 14:52:59 UTC
Currently wic only supports one bootloader label or target, which is just to boot the media while the current live/hddimg/iso bbclass can support both a boot and install label.

WIC should have the flexibility to add an alternate label and target script.
Comment 1 Ed Bartosh 2017-02-10 14:56:56 UTC
WIC already supports this. It can be done by using custom boot loader configs (--configfile bootloader option in .wks)

That's much better way than hardcoding bootloader targets in wic code, I believe.
Comment 2 Stephen K Jolley 2017-02-16 15:38:23 UTC
Saul, give an example please
Comment 3 Saul Wold 2017-02-16 15:51:30 UTC
Is there an example WKS file that has both boot and install labels?  If not then we should have one.  As mentioned before, in order to replace live/hddimg we need the same functionality that is currently provided by live/hddimg.
Comment 4 Ed Bartosh 2017-02-16 18:05:11 UTC
there is an example configuration file and .wks file:
 scripts/lib/wic/canned-wks/directdisk-bootloader-config.cfg
 scripts/lib/wic/canned-wks/directdisk-bootloader-config.wks

They're not using 2 boot largets, so I'm going to add 'install' target there and test if it works as expected.

It would be good to remove all hardcoded boot loader configurations from the wic plugins code and replace them with config files. That would simplify the code and increase maintainability.
Comment 5 Ed Bartosh 2017-03-06 11:43:44 UTC
The patchset http://lists.openembedded.org/pipermail/openembedded-core/2017-February/133287.html has been merged to poky master.

Note, that patchset doesn't cover userspace changes that need to be addressed to make the solution fully working. It only implements support of multiple targets in the wic code.