1

I am creating an empty partition for my yocto image file(.wic) by adding below line to directdisk.wks:

part /opt --use-uuid --fstype=ext4 --label user --align 1024 --size 1024

Able to create a partition but the image size gets increased i.e. image size + partition size. let's say, I have created empty /opt partition of 1GB, then 1.53 GB(initial image size) + 1 GB(/opt) = 2.53 GB(new image size). My concern is what happens with a 128 GB SSD allocated fully with partitions. Will the image size be 128 GB?

Is there a way to generate .wic unaffected with empty partition size?

Rachid K.
  • 4,490
  • 3
  • 11
  • 30
Raxesh Oriya
  • 383
  • 6
  • 27
  • you can generate sparse wic (wic.bmap) image which would compress empty sections. and then use bmap-tools to flash the image. like here https://github.com/riscv/meta-riscv#sparse-image-creation – Khem Apr 01 '20 at 07:29
  • 1
    do we have bmap-tools alternative for windows? – md.jamal Apr 01 '20 at 07:51
  • @Khem - Size of `.direct` image generated by `wic directdisk -e core-image-sato` is only reduced by half of the partition size(~500 MB) though I have created 1GB partition. an thoughts on this? – Raxesh Oriya Apr 02 '20 at 06:46
  • @md.jamal You can use balena etcher to flash an image with a bmap file if you package it all in a zip file. cp image.{wic,img}; cp image.{wic,img}.bmap; md5sum image.img > image.img.md5; zip image.img.zip image.img* – jjcf89 Feb 04 '21 at 21:14

0 Answers0