[yocto] wic creates invalid image

Dimitris Tassopoulos dimtass at gmail.com
Tue Nov 13 11:29:11 PST 2018


Hi Alex,

If you don't want the extended partitions you need to create a gpt
partition, you can do this by adding this to your wks file.

bootloader --ptable gpt

Regards,
Dimitris


On Tue, 13 Nov 2018, 20:23 Alex Kiernan <alex.kiernan at gmail.com wrote:

> On Tue, Nov 13, 2018 at 7:13 PM Donal Morrissey
> <donal.morrissey at gmail.com> wrote:
> >
> > 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?
> >
>
> I've not checked, but I'd assume it's switched to extended partitions,
> since MBR only has 4 primary partitions.
>
> --
> Alex Kiernan
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20181113/d89c39fe/attachment.html>


More information about the yocto mailing list