summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/kickstart
diff options
context:
space:
mode:
authorTom Zanussi <tom.zanussi@linux.intel.com>2014-10-29 17:04:20 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-10-30 13:03:40 +0000
commit005d81da2b069672a240b612fbddd0ad9dcead52 (patch)
treeb1a39d8df8444dece86197bd05fb71f9365bbeac /scripts/lib/wic/kickstart
parent334f83a14687c81ff7d8b9e9cbd2ffed76ead8df (diff)
downloadpoky-005d81da2b069672a240b612fbddd0ad9dcead52.tar.gz
wic: Use overhead factor when creating partitions from rootfs directories
When creating partitions sized to given rootfs directories, filesystem creation could fail in cases where the calculated target partition size was too small to contain the filesystem created using mkfs. This occurred in particular when creating partitions to contain very large filesystems such as those containing sdk image artifacts. This same limition is present in the oe-core image creation classes, which can be readily see by changing IMAGE_OVERHEAD_FACTOR from the default 1.3 to 1.0 and building a sato-sdk image. It should be possible to calculate required sizes exactly given the source rootfs and target filesystem types, but for now, to address the specific problem users are hitting in such situations, we'll just do exactly what oe-core does and define and use an IMAGE_OVERHEAD_FACTOR or 1.3 in those cases. Fixes [YOCTO #6863]. (From OE-Core rev: bbaef3ff5833fc1d97b7b028d7770834f62789da) Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/kickstart')
-rw-r--r--scripts/lib/wic/kickstart/custom_commands/partition.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/lib/wic/kickstart/custom_commands/partition.py b/scripts/lib/wic/kickstart/custom_commands/partition.py
index 3950b43621..54a494e033 100644
--- a/scripts/lib/wic/kickstart/custom_commands/partition.py
+++ b/scripts/lib/wic/kickstart/custom_commands/partition.py
@@ -229,6 +229,7 @@ class Wic_PartData(Mic_PartData):
229 extra_blocks = IMAGE_EXTRA_SPACE 229 extra_blocks = IMAGE_EXTRA_SPACE
230 230
231 rootfs_size = actual_rootfs_size + extra_blocks 231 rootfs_size = actual_rootfs_size + extra_blocks
232 rootfs_size *= IMAGE_OVERHEAD_FACTOR
232 233
233 msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ 234 msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
234 (extra_blocks, self.mountpoint, rootfs_size)) 235 (extra_blocks, self.mountpoint, rootfs_size))
@@ -276,6 +277,7 @@ class Wic_PartData(Mic_PartData):
276 extra_blocks = IMAGE_EXTRA_SPACE 277 extra_blocks = IMAGE_EXTRA_SPACE
277 278
278 rootfs_size = actual_rootfs_size + extra_blocks 279 rootfs_size = actual_rootfs_size + extra_blocks
280 rootfs_size *= IMAGE_OVERHEAD_FACTOR
279 281
280 msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \ 282 msger.debug("Added %d extra blocks to %s to get to %d total blocks" % \
281 (extra_blocks, self.mountpoint, rootfs_size)) 283 (extra_blocks, self.mountpoint, rootfs_size))