how can I generate .wic image by using u-boot, kernel image and rootfs in i.MX8QM

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how can I generate .wic image by using u-boot, kernel image and rootfs in i.MX8QM

2,469件の閲覧回数
mallibeerala
Contributor III

Dear NXP Team,

how can I generate .wic image by using u-boot, kernel image and rootfs in i.MX8QM.

Thanks & Regards,
Mallikarjuna

0 件の賞賛
返信
4 返答(返信)

2,451件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @mallibeerala,

I hope you are doing well
 
The .wic file can be generated using Yocto. Kindly refer to the i.MX Yocto Project User's Guide for the same.
To modify the .wic file and its partition using yocto, one can modify the particular sources/meta-freescale/wic/imx-imx-boot-bootpart.wks.in file from the sources directory.
 
For more information related to the same kindly refer to the below document.
 
Thanks & Regards,
Dhruvit Vasavada
0 件の賞賛
返信

2,430件の閲覧回数
mallibeerala
Contributor III

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

0 件の賞賛
返信

2,390件の閲覧回数
rudi_cyber
Contributor III

.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

 

 

0 件の賞賛
返信

2,401件の閲覧回数
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @mallibeerala,

I hope you are doing well
 
NXP does not have any document or procedure to generate a .wic file without using Yocto.
Please accept my apology for the inconvenience due to the same.
 
Thanks & Regards,
Dhruvit Vasavada

0 件の賞賛
返信