[oe-commits] Ed Bartosh : wic: fix partition size calculation

git at git.openembedded.org git at git.openembedded.org
Wed Sep 23 08:55:59 UTC 2015


Module: openembedded-core.git
Branch: master
Commit: 3703ecb4aa5267e6d7330e7978cc7c3bb2250ead
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=3703ecb4aa5267e6d7330e7978cc7c3bb2250ead

Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date:   Thu Sep 10 15:38:03 2015 +0300

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.

Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>

---

 scripts/lib/wic/imager/direct.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/lib/wic/imager/direct.py b/scripts/lib/wic/imager/direct.py
index 146a0d1..d5603fa 100644
--- a/scripts/lib/wic/imager/direct.py
+++ b/scripts/lib/wic/imager/direct.py
@@ -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



More information about the Openembedded-commits mailing list