runqemu supports two types of images: - fsimages: rootfs only - vmimages: bootloader, kernel, rootfs wic images are handled as vmtype images. Hence, wic images without bootloader and kernel are not supported. However, it is totally fine to create a wic image which is of type fstype. This patch http://lists.openembedded.org/pipermail/openembedded-core/2019-April/281223.html allows to add QB_DEFAULT_FSTYPE = "wic-nb" to the machine configuration and to boot a wic image without bootloader and kernel. Are there any concerns or suggestions about the implementation?
One more note: I also thought about extending wic to automatically detect if there is a bootloader in the image and automatically treat the image as fsimage or vmimage. But there are two arguments against it: - It is possible that somebody wants to compile a vmimage for the real hardware, but still wants to boot this image in Qemu as an fsimage. - There are many special cases, such as different bootloaders and partitioning schemas which are hard to detect reliably. If I received a hint about what would be wrong with my implementation, I would try to provide an alternative implementation.
A new implementation is available on the mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2019-June/283392.html If QB_MACHINE contains "-machine virt", runqemu treats the wic image as a fstype image. Otherwise, wic images are still treated as Vmtype images.
It was solved by adding a new parameter QB_FSINFO. The parameter allows to pass e.g. "wic:no-kernel-in-fs" to runqemu. Further details can be found in the commit message. https://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0e4c79a7c4dae93fb1b12e8c0a59e8252e3f4b71