summaryrefslogtreecommitdiffstats
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:36:09 +0100
commit5bcc423953754fd3bc0e971a1113a3e9aafef74f (patch)
treec1037e0aca9cb747b07730cf721df9c6eaae58bc
parent8313ceae261d626e6d172f6aad643e1abe2b2833 (diff)
downloadpoky-5bcc423953754fd3bc0e971a1113a3e9aafef74f.tar.gz
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. (From OE-Core rev: af37bb8ae71c4f932e2126bb620b3fb2b11cc466) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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):
262 def _write_script(self, type, cmds): 262 def _write_script(self, type, cmds):
263 tempdir = self.d.getVar('T', True) 263 tempdir = self.d.getVar('T', True)
264 script_name = os.path.join(tempdir, "create_image." + type) 264 script_name = os.path.join(tempdir, "create_image." + type)
265 rootfs_size = self._get_rootfs_size()
265 266
266 self.d.setVar('img_creation_func', '\n'.join(cmds)) 267 self.d.setVar('img_creation_func', '\n'.join(cmds))
267 self.d.setVarFlag('img_creation_func', 'func', 1) 268 self.d.setVarFlag('img_creation_func', 'func', 1)
268 self.d.setVarFlag('img_creation_func', 'fakeroot', 1) 269 self.d.setVarFlag('img_creation_func', 'fakeroot', 1)
270 self.d.setVar('ROOTFS_SIZE', str(rootfs_size))
269 271
270 with open(script_name, "w+") as script: 272 with open(script_name, "w+") as script:
271 script.write("%s" % bb.build.shell_trap_code()) 273 script.write("%s" % bb.build.shell_trap_code())
272 script.write("export ROOTFS_SIZE=%d\n" % self._get_rootfs_size()) 274 script.write("export ROOTFS_SIZE=%d\n" % rootfs_size)
273 bb.data.emit_func('img_creation_func', script, self.d) 275 bb.data.emit_func('img_creation_func', script, self.d)
274 script.write("img_creation_func\n") 276 script.write("img_creation_func\n")
275 277