summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-09-10 15:38:03 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-23 09:52:54 +0100
commitdd7726f0bcd994b709d10c878fc4b9fa719752c4 (patch)
tree5e234d637db79c5ac3451fd3d7ba5acc79472e1a
parent219d73a6fa0d0b71a411400a3d40c8d22a0a667b (diff)
downloadpoky-dd7726f0bcd994b709d10c878fc4b9fa719752c4.tar.gz
wic: fix partition size calculation
It was wrongly assumed that part.size is meagured in Mb. In fact it's in Kb, so there is no need to convert bitbake variable ROOTFS_SIZE as it's also in Kb. (From OE-Core rev: 3703ecb4aa5267e6d7330e7978cc7c3bb2250ead) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--scripts/lib/wic/imager/direct.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 146a0d1535..d5603fa915 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -241,8 +241,7 @@ class DirectImageCreator(BaseImageCreator):
241 # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE 241 # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE
242 rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name) 242 rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name)
243 if rsize_bb: 243 if rsize_bb:
244 # convert from Kb to Mb 244 part.size = int(round(float(rsize_bb)))
245 part.size = int(round(float(rsize_bb) / 1024.))
246 # need to create the filesystems in order to get their 245 # need to create the filesystems in order to get their
247 # sizes before we can add them and do the layout. 246 # sizes before we can add them and do the layout.
248 # Image.create() actually calls __format_disks() to create 247 # Image.create() actually calls __format_disks() to create