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.
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.
Saul, give an example please
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.
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.
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.