[oe-commits] Ed Bartosh : image.py: set bitbake variable ROOTFS_SIZE

git at git.openembedded.org git at git.openembedded.org
Sun Aug 30 11:48:24 UTC 2015


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

Author: Ed Bartosh <ed.bartosh at linux.intel.com>
Date:   Wed Aug 19 23:21:58 2015 +0300

image.py: set bitbake variable ROOTFS_SIZE

This variable is going to be used by wic to set partition
size. Setting it in image.py makes it possible for wic to
use it without calculating it again.

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

Signed-off-by: Ross Burton <ross.burton at intel.com>

---

 meta/lib/oe/image.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 699c30f..d9121fc 100644
--- a/meta/lib/oe/image.py
+++ b/meta/lib/oe/image.py
@@ -262,14 +262,16 @@ class Image(ImageDepGraph):
     def _write_script(self, type, cmds):
         tempdir = self.d.getVar('T', True)
         script_name = os.path.join(tempdir, "create_image." + type)
+        rootfs_size = self._get_rootfs_size()
 
         self.d.setVar('img_creation_func', '\n'.join(cmds))
         self.d.setVarFlag('img_creation_func', 'func', 1)
         self.d.setVarFlag('img_creation_func', 'fakeroot', 1)
+        self.d.setVar('ROOTFS_SIZE', str(rootfs_size))
 
         with open(script_name, "w+") as script:
             script.write("%s" % bb.build.shell_trap_code())
-            script.write("export ROOTFS_SIZE=%d\n" % self._get_rootfs_size())
+            script.write("export ROOTFS_SIZE=%d\n" % rootfs_size)
             bb.data.emit_func('img_creation_func', script, self.d)
             script.write("img_creation_func\n")
 



More information about the Openembedded-commits mailing list