[yocto] How to extract files from wic.gz image?

Dimitris Tassopoulos dimtass at gmail.com
Mon Jun 3 00:53:33 PDT 2019


Hi JH,

I believe the most important feature of the wic images is to be able to
flash your SD card faster than just extract and dd the full image on the
SD card. For that reason you can use the bmap-tool which already supports
the gz  compression (as also .bz2). To do that you also need the bmap file
for this image. If it's not already there then you can add it your in your
image
like this:

IMAGE_FSTYPES += "wic.bmap"

(see also here:
https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#flashing-images-using-bmaptool
)

Then you can just run:

$ sudo bmaptool copy dev-image-20190528085324.rootfs.wic.gz /dev/sdX

and you copy the gz image on your SD much much faster.

Regards,
Dimitris

On Sat, Jun 1, 2019 at 12:40 PM JH <jupiter.hce at gmail.com> wrote:

> Thanks Zoran and Tom, I can use dd to install the image to SD card on
> IMX EVK, now I need to install the image to NAND flash of a customized
> IMX device via USB HID, it cannot use the dd, IMX provided UUU utility
> which I am new to it and I have to decompose the image to
> zImage-initramfs and  losetup -P does work, dd does not work either.
>
> $ losetup -P dev-image-20190528085324.rootfs.wic
> losetup: solar-dev-image-solarevk-20190518084330.rootfs.wic: failed to
> use device: No such device
>
> Thanks for your helps anyway.
>
> Kind regards,
>
> - jupiter
>
> On 5/31/19, Tom Rini <trini at konsulko.com> wrote:
> > On Fri, May 31, 2019 at 10:21:40PM +1000, JH wrote:
> >> Hi,
> >>
> >> What command and tools to extract files from Yocto / bitbake image
> >> such as dev-image-20190528085324.rootfs.wic.gz?
> >>
> >> I am using IMX UUU to install dev-image-20190528085324.rootfs.wic.gz
> >> to IMX, I was advised to extract the archive and use "uuu <script
> >> name>" or "uuu u-boot-dtb.imx" to get bootloader work first.
> >
> > A wic image is just another way of saying it's a raw disk image.
> > Decompress it, losetup -P (generally useful, but not needed this time)
> > and dd out the contents you want.
> >
> > --
> > Tom
> >
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190603/fd0c3075/attachment.html>


More information about the yocto mailing list