Skip to content

Instantly share code, notes, and snippets.

@bartosh
Created January 19, 2017 13:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bartosh/cb20e293fdcbe733ef3c1cf66b99d3f3 to your computer and use it in GitHub Desktop.
Save bartosh/cb20e293fdcbe733ef3c1cf66b99d3f3 to your computer and use it in GitHub Desktop.
diff --git a/meta/recipes-core/meta/wic-tools.bb b/meta/recipes-core/meta/wic-tools.bb
index 325179f..404507c 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -13,3 +13,15 @@ python do_build_sysroot () {
bb.build.exec_func("extend_recipe_sysroot", d)
}
addtask do_build_sysroot after do_prepare_recipe_sysroot before do_build
+
+#
+# Write environment variable used by wic
+# to tmp/sysroots/<machine>/imgdata/wictools.env
+#
+python do_write_wicenv () {
+ outdir = os.path.join(d.getVar('STAGING_DIR'), 'imgdata')
+ bb.utils.mkdirhier(outdir)
+ with open(os.path.join(outdir, "wic-tools.env"), 'w') as envf:
+ envf.write('RECIPE_SYSROOT_NATIVE="%s"\n' % d.getVar('RECIPE_SYSROOT_NATIVE').strip())
+}
+addtask do_write_wicenv before do_build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment