summaryrefslogtreecommitdiff
path: root/meta/lib/oe/image.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2015-08-19 23:21:58 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-08-30 12:34:36 +0100
commitaf37bb8ae71c4f932e2126bb620b3fb2b11cc466 (patch)
treed9e1238957e9d4984dd9b7b0133956cc8d905257 /meta/lib/oe/image.py
parentd401a8518fb4b0e8adeb34be8948fa780299870c (diff)
downloadopenembedded-core-af37bb8ae71c4f932e2126bb620b3fb2b11cc466.tar.gz
openembedded-core-af37bb8ae71c4f932e2126bb620b3fb2b11cc466.tar.bz2
openembedded-core-af37bb8ae71c4f932e2126bb620b3fb2b11cc466.zip
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@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/lib/oe/image.py')
-rw-r--r--meta/lib/oe/image.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oe/image.py b/meta/lib/oe/image.py
index 699c30fa2b..d9121fc907 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")