Donal Morrissey
2018-11-13 19:12:23 UTC
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
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