aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic/engine.py
diff options
context:
space:
mode:
authorEd Bartosh <ed.bartosh@linux.intel.com>2016-05-18 15:34:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-19 08:39:26 +0100
commitd64c7b37c40b052510419b4d6629b83319c833e4 (patch)
treec9c53bfbc5537e2b98fe1cfea5fc7d1161fe4b6f /scripts/lib/wic/engine.py
parent4684ac5f4d823a6afedc57aad0aa417bb17ba950 (diff)
downloadopenembedded-core-contrib-d64c7b37c40b052510419b4d6629b83319c833e4.tar.gz
wic: implement --bmap option
This option enables generation of <image>.bmap file for the result image using native bmaptool. [YOCTO #9413] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic/engine.py')
-rw-r--r--scripts/lib/wic/engine.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/lib/wic/engine.py b/scripts/lib/wic/engine.py
index 5d35c46b32..5b104631ca 100644
--- a/scripts/lib/wic/engine.py
+++ b/scripts/lib/wic/engine.py
@@ -145,7 +145,7 @@ def list_source_plugins():
def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
native_sysroot, scripts_path, image_output_dir,
- compressor, debug):
+ compressor, bmap, debug):
"""Create image
wks_file - user-defined OE kickstart file
@@ -156,6 +156,7 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
scripts_path - absolute path to /scripts dir
image_output_dir - dirname to create for image
compressor - compressor utility to compress the image
+ bmap - enable generation of .bmap
Normally, the values for the build artifacts values are determined
by 'wic -e' from the output of the 'bitbake -e' command given an
@@ -186,8 +187,12 @@ def wic_create(wks_file, rootfs_dir, bootimg_dir, kernel_dir,
crobj = creator.Creator()
- crobj.main(["direct", native_sysroot, kernel_dir, bootimg_dir, rootfs_dir,
- wks_file, image_output_dir, oe_builddir, compressor or ""])
+ cmdline = ["direct", native_sysroot, kernel_dir, bootimg_dir, rootfs_dir,
+ wks_file, image_output_dir, oe_builddir, compressor or ""]
+ if bmap:
+ cmdline.append('--bmap')
+
+ crobj.main(cmdline)
print("\nThe image(s) were created using OE kickstart file:\n %s" % wks_file)