[OE-core] [PATCH 0/5] wic: bugfixes & --fixed-size support

Maciej Borzęcki maciej.borzecki at rndity.com
Wed Nov 9 13:49:36 UTC 2016


On Wed, Nov 9, 2016 at 2:17 PM, Burton, Ross <ross.burton at intel.com> wrote:
> I pulled this series into a test run on the autobuilder and it is throwing
> quite a lot of exceptions, such as:
>
> Traceback (most recent call last):
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/wic",
> line 319, in <module>
>     sys.exit(main(sys.argv[1:]))
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/wic",
> line 314, in main
>     return hlp.invoke_subcommand(args, parser, hlp.wic_help_usage,
> subcommands)
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/help.py",
> line 95, in invoke_subcommand
>     subcommands.get(args[0], subcommand_error)[0](args[1:], usage)
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/wic",
> line 247, in wic_create_subcommand
>     options.compressor, options.bmap, options.debug)
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/engine.py",
> line 195, in wic_create
>     crobj.main(cmdline)
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/creator.py",
> line 125, in main
>     return self._subcmds[pname](options, *args[1:])
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/plugins/imager/direct_plugin.py",
> line 93, in do_create
>     creator.create()
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/imager/baseimager.py",
> line 159, in create
>     self._create()
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/imager/direct.py",
> line 305, in _create
>     system_id=part.system_id)
>   File
> "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-x86-64-lsb/build/scripts/lib/wic/utils/partitionedfs.py",
> line 101, in add_partition
>     size = size * 1024 // self.sector_size
> TypeError: unsupported operand type(s) for //: 'str' and 'int'
> WARNING:
> TOPDIR/tmp/work/genericx86_64-poky-linux/core-image-lsb/1.0-r0/temp/run.do_image_wic.15783:1
> exit 1 from 'BUILDDIR="TOPDIR" wic create "$wks" --vars
> "TOPDIR/tmp/sysroots/genericx86-64/imgdata/" -e "core-image-lsb" -o "$out/"'
>
> See
> http://errors.yoctoproject.org/Errors/Latest/Autobuilder/?filter=a44a6a635c9ed02edb2a3dee0a13b0067becc425&type=commit
> for more examples and context.

Thanks. I see now that bootimg-efi and rawcopy plugins do not convert partition
size to int as they should be.


>
> Ross
>
> On 8 November 2016 at 15:56, Maciej Borzecki <maciej.borzecki at rndity.com>
> wrote:
>>
>> The patch series is a follow-up after a previous attempt of adding
>> --reserved-size option to wic[1].
>>
>> The series introduces a number of fixes in patches 1 - 4.
>>
>> The last patch in the series introduces --fixed-size option as discussed
>> in [1].
>> The patch also introduces minor refactoring to code responsible for
>> computing
>> partition size.
>>
>> Aside from new option, another user-visible change is how the size rootfs
>> partitions with vfat is calculated. In previous code, vfat rootfs
>> partition size
>> did not account for --extra-space nor --overhead-factor. Now, all rootfs
>> partitions (except for squashfs) are subject to the same rules of
>> partition
>> sizing.
>>
>>
>> http://lists.openembedded.org/pipermail/openembedded-core/2016-October/127634.html
>>
>> Maciej Borzecki (5):
>>   wic: make sure that partition size is always an integer in internal
>>     processing
>>   wic: use partition size when creating empty partition files
>>   wic: check that filesystem is specified for a rootfs partition
>>   wic: fix function comment typos
>>   wic: add --fixed-size wks option
>>
>>  scripts/lib/wic/help.py                | 14 +++--
>>  scripts/lib/wic/imager/direct.py       |  2 +-
>>  scripts/lib/wic/ksparser.py            | 41 +++++++++++++--
>>  scripts/lib/wic/partition.py           | 93
>> +++++++++++++++++++++-------------
>>  scripts/lib/wic/utils/partitionedfs.py |  6 +--
>>  5 files changed, 109 insertions(+), 47 deletions(-)
>>
>> --
>> 2.5.0
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>



-- 
Maciej Borzecki
RnDity



More information about the Openembedded-core mailing list