[OE-core] [PATCH 4/5] scripts/wic: explicitly set BUILDDIR within eSDK

rebecca.swee.fun.chang at intel.com rebecca.swee.fun.chang at intel.com
Thu Jan 11 05:41:14 UTC 2018


From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>

When we run wic within eSDK:
$ wic create mkefidisk -e core-image-minimal

ERROR: BUILDDIR not found, exiting. (Did you forget to source oe-init-build-env?)

In order to figure out variable values, one must have sourced
the OE build environment setup script. However, when we are in
within the eSDK environment which isn't initialised like the
normal OE build environment, we can't use wic utility with eSDK.

Reference:
https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#wic-requirements

While wic ought to be fixed to be able to run without bitbake
& native tools [YOCTO #11281], but this is a workaround to set
BUILDDIR in the environment so that bitbake environment is setup
for wic to build its required native tools.

Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang at intel.com>
---
 scripts/wic | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/wic b/scripts/wic
index d9bea22..b02d907 100755
--- a/scripts/wic
+++ b/scripts/wic
@@ -55,6 +55,8 @@ if os.environ.get('SDKTARGETSYSROOT'):
             # If found, initialize bitbake path for eSDK environment and append to PATH
             sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin')
             os.environ['PATH'] += ":" + sdkroot
+            # Set BUILDDIR for wic to work within eSDK
+            os.environ['BUILDDIR'] = sdkroot
             break
         sdkroot = os.path.dirname(sdkroot)
 
-- 
2.7.4




More information about the Openembedded-core mailing list