[OE-core] [wic][PATCH] wic: Implement --build-rootfs command line option

Adrian Freihofer adrian.freihofer at gmail.com
Mon Apr 20 16:13:20 UTC 2015


Let wic call bitbake seems to be a great idea.

One question is open to me. What's the recommended approach to resolve
the dependencies between the image, the bootloader and native tools
which are additionally required to create the final disk image?
Basically the right place to resolve this dependency is the kickstart
file. Bitbake should not even know that syslinux or any other bootloader
will be added to the final disk image. In other words
IMAGE_EXTRA_DEPENDS or similar are not the right place to add the
bootloader dependency anymore. But if bitbake does not provide e.g.
syslinux-native wic will fail to use it. This is kind of a chicken egg
problem...
A nice solution would be if wic would maintain a simple dependency list
For example: There is a kickstart file assembling a disk image including
my-mini-image and syslinux-native. To create the partition layout,
parted-native is required as well. Hence bitbake should be called like
this: "bitbake my-mini-image parted-native syslinux-native" before wic
starts assembling the disk image. my-mini-image is provided by the -e
parameter of wic. The latter two tools should be provided by the wic
plugins creating the partitions and the disk image. My proposal is to
extend the internal API of wic by a dependency list where plugins can
append required tools e.g. during start up of wic. This would enable the
disk plugin to request "parted-native" and the boot partition plugin to
request "syslinux-native" before bitbake is called.
Further on one more problem could be solved easily. If wic takes care
about the final disk assembly bitbake --fetch-only might not be
sufficient to download everything needed to create the whole firmware.
This makes it hard to create a complete premirror. If wic would support
the dependency list as mentioned above and provide a command line
parameter --fetch-only everything would be consistent. Instead of
calling "bitbake  my-mini-image  --fetch-only" the user just calls the
corresponding wic command with --fetch-only appended. This would result
in "bitbake my-mini-image parted-native syslinux-native --fetch-only".




More information about the Openembedded-core mailing list