-2

Much like the ability to mount an image copy of an SD card, I am attempting to 'mount' a yocto/bitbake output file to inspect the contents or run via docker.

Looking through various docs/tutorial, it is stated the 'wic.bz2' file type is designed to burn straight to an sd card mount, surely this is not the only option?

Perhaps I'm mis-understand the result of bitbake build or indeed inspecting the wrong files?

Other info: .I am using the 'Dunfell' branch to build a small Rasbperrypi3-64 image .I am use WSL 20.04 V2

Sources:

sdming updated to wic.bz2 format

Downloading and flashing to sd card

  • 1
    If it were a partition image, you could mount it as passthrough (after bunzip), but if it's a disk image with multiple partitions, I'm not sure that works. Maybe this? https://superuser.com/questions/211338/how-to-mount-a-multi-partition-disk-image-in-linux – Tim Roberts Feb 23 '23 at 01:14
  • @TimRoberts I did try booting it up using osfboot, I din't see anything. Good idea with bunzip, I'll give it a go thanks, I'm just amazed it isn't a common ask/tutorial, hence the question in perhaps I'm missing something. – Jamie Nicholl-Shelley Feb 23 '23 at 01:32
  • @TimRoberts I post an answer to the question below however it was then deleted, unsure why as it includes your as stage one. – Jamie Nicholl-Shelley Mar 15 '23 at 16:40

2 Answers2

1

Short answer: you can't convert a wic file into an img file. As mentioned here

If you want to test the yocto output however, here is a guide:

  1. As @Tim Robeerts mentioned, using bunzip

  2. Either write the wic file to an sd card (Example here), or other alternatives mentioned in wic examples

  3. Using a tool such as rufus, create an .img file from the sd card.

  4. Using Quick EMUlator (QEMU) Qemu emulator Allows you to boot the img file for testing. Alternatively, you can use virtual box: Virtual box

1

Found two convenient ways to inspect a wic-file:

  1. wic ls (docs)
  • Extract image.wic.[gz|xz|bz2] with the respective tool.
  • wic ls image.wic:3/usr/bin - Show a path on the rootfs partition. Without :3 and path it shows all available partitions.
  1. Script
  • This script creates a directory from the rootfs.
  • Symbolic links are broken, but works well with find etc.
  • In short, it decompresses, mounts to a loopback and copies the files to a specified directory.
Mo_
  • 13
  • 4