Dear NXP Team,
how can I generate .wic image by using u-boot, kernel image and rootfs in i.MX8QM.
Thanks & Regards,
Mallikarjuna
Hi @mallibeerala,
Hi Dhruvit,
Is it possible to generate .wic image without using yocto build, if yes please provide procedure for generate .wic image using u-boot, kernel image and root file system.
Thanks & Regards,
Mallikarjuna
.wic/.sdcard is just a sdcard mirror.
You can use the same commands of Yocto to do the same thing.
Yocto is just a "script"(bb file). Yocto can do that, you also can do that manually.
Alternatively, I would like to introduce you one very useful tool under linux.
It calls kpartx. It can simulate a virtual sdard mirror.
If you know how to create a sdcard mirror with a real sdcard on PC. You can use the kpartx do the same thing.
truncate -s 7900M 1.sdcard
sudo sgdisk -n 0:0:+2600M -c 0:"rootfs" -p 1.sdcard
sudo sgdisk -n 0:0:+600M -c 0:"data1" -p 1.sdcard
sudo sgdisk -n 0:0:+650M -c 0:"data2" -p 1.sdcard
sudo kpartx -av 1.sdcard
sudo dd if=flash.bin of=/dev/loop0 bs=1k seek=32 conv=fsync
sudo mkfs.ext4 /dev/mapper/loop0p1
mkdir mnt
sudo mount /dev/mapper/loop0p1 mnt/
sudo touch mnt/test.txt
ls mnt/
lost+found test.txt
sudo umount mnt
sudo kpartx -dv /dev/loop0
If you use a real sdcard, the device will be, for example, /dev/sda.
for kpartx, it will be /dev/loop0
If you use a real sdcard, the partition will be like /dev/sda1
for kpartx, it will be /dev/mapper/loop0p1
Hi @mallibeerala,