[yocto] wic creates invalid image

Donal Morrissey donal.morrissey at gmail.com
Tue Nov 13 11:12:23 PST 2018


Hi There,
I have a problem with an image being created by wic. If I add more than 4
partition definitions to the wks file, the generated image will include an
additional partition with no Fstype, and spanning the full length of the
additional partitions.

Take the following wks file:

part --source rawcopy --sourceparams="file=<long path>/image-r0/uboot.env"
--ondisk "mmcblk0" --align 4096 --no-table
part --source bootimg-partition --ondisk "mmcblk0" --fstype=vfat --label
boot --align 4096 --active --fixed-size 40
part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label primary
--align 4096 --fixed-size 147456k --exclude-path data/
part --source rootfs --ondisk "mmcblk0" --fstype=ext4 --label secondary
--align 4096 --fixed-size 147456k --exclude-path data/
part --ondisk "mmcblk0" --fstype=ext4 --label appdata1 --align 4096
--fixed-size 147456k
part --ondisk "mmcblk0" --fstype=ext4 --label appdata2 --align 4096
--fixed-size 147456k
bootloader --ptable msdos

wic will create a .direct file with the following structure:
Num     Start        End          Size      Fstype
 1      12582912     54525951     41943040  fat16
 2      54525952    205520895    150994944  ext4
 3     205520896    356515839    150994944  ext4
 4     360709632    666894335    306184704
 5     360710144    511705087    150994944  ext4
 6     515899392    666894335    150994944  ext4

Note the start and end addresses of partition 4, it spans from the start of
partitions 5 (appdata1)  to the end of partition 6 (appdata2).

If I modify the wks file and remove the entry for appdata2, the created
direct file is valid:

Num     Start        End          Size      Fstype
 1      12582912     54525951     41943040  fat16
 2      54525952    205520895    150994944  ext4
 3     205520896    356515839    150994944  ext4
 4     356515840    507510783    150994944  ext4

Any suggestions on what is going on here?

Cheers,
Donal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20181113/0261f622/attachment-0001.html>


More information about the yocto mailing list