]> code.ossystems Code Review - openembedded-core.git/commit
wic: obey the rootfs size from the metadata
authorChristopher Larson <chris_larson@mentor.com>
Thu, 15 Dec 2016 19:42:39 +0000 (12:42 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 17 Dec 2016 09:56:45 +0000 (09:56 +0000)
commit1d50e11286722c4114c1ae0bc285f846cd85fc4c
tree3a5a53b6c44aad27abd0010b1b94d1e58402dd6a
parent8111316e0988b8d5a777a5ebda6ed59218d1f3b4
wic: obey the rootfs size from the metadata

When no --size is specified for the rootfs in the .wks, we want to obey the
rootfs size from the metadata, otherwise the defined IMAGE_ROOTFS_EXTRA_SPACE
and IMAGE_OVERHEAD_FACTOR will not be obeyed. In some cases, this can result
in image construction failure, if the size determined by du was insufficient
to hold the files without the aforementioned extra space.

This fallback from --size to ROOTFS_SIZE was already implemented when
--rootfs-dir is specified in the .wks, but it did not occur otherwise, neither
when --rootfs-dir= was passed to `wic create` nor when IMAGE_ROOTFS was used.
This made a certain amount of sense, as this fallback logic happened at such
a level that it wasn't able to identify which partitions were rootfs
partitions otherwise. Rather than doing it at that level, we can do it in
prepare_rootfs(), which is run by the rootfs source plugins.

Note that IMAGE_OVERHEAD_FACTOR and a --overhead-factor in the .wks will now
both be applied when --size isn't specified in the .wks. A warning is added
about this, though a user won't see it unless wic fails or they examine the
do_image_wic log.

Fixes [YOCTO #10815]

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
scripts/lib/wic/partition.py