]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
wic: fix partition size calculation
authorEd Bartosh <ed.bartosh@linux.intel.com>
Thu, 10 Sep 2015 12:38:03 +0000 (15:38 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 21 Sep 2015 14:20:08 +0000 (15:20 +0100)
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.

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
scripts/lib/wic/imager/direct.py

index 146a0d1535dcf8cb61ceb60f6835f87555b3458c..d5603fa9153589e6c1685ef931805c4583e5ec46 100644 (file)
@@ -241,8 +241,7 @@ class DirectImageCreator(BaseImageCreator):
                     # IMAGE_OVERHEAD_FACTOR and IMAGE_ROOTFS_EXTRA_SPACE
                     rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name)
                     if rsize_bb:
-                        # convert from Kb to Mb
-                        part.size = int(round(float(rsize_bb) / 1024.))
+                        part.size = int(round(float(rsize_bb)))
             # need to create the filesystems in order to get their
             # sizes before we can add them and do the layout.
             # Image.create() actually calls __format_disks() to create