diff options
author | Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> | 2018-01-11 22:55:22 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-13 10:15:20 +0000 |
commit | 422e16fae3a6fa475d663bb8e4fab475900c7a65 (patch) | |
tree | e5f8b2dbd6e71536bfeccc0d91bdf8728f559d49 | |
parent | 1d52d1a46a92f5689ac6f37ed6672ba0cb98bc2a (diff) | |
download | poky-422e16fae3a6fa475d663bb8e4fab475900c7a65.tar.gz |
scripts/wic: explicitly set BUILDDIR within eSDK
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.
(From OE-Core rev: 03fa13a269d2887cc5d13fd474fb39a2be037f2c)
Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | scripts/wic | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/wic b/scripts/wic index d9bea228ad..7392bc4e7f 100755 --- a/scripts/wic +++ b/scripts/wic | |||
@@ -51,6 +51,8 @@ sdkroot = scripts_path | |||
51 | if os.environ.get('SDKTARGETSYSROOT'): | 51 | if os.environ.get('SDKTARGETSYSROOT'): |
52 | while sdkroot != '' and sdkroot != os.sep: | 52 | while sdkroot != '' and sdkroot != os.sep: |
53 | if os.path.exists(os.path.join(sdkroot, '.devtoolbase')): | 53 | if os.path.exists(os.path.join(sdkroot, '.devtoolbase')): |
54 | # Set BUILDDIR for wic to work within eSDK | ||
55 | os.environ['BUILDDIR'] = sdkroot | ||
54 | # .devtoolbase only exists within eSDK | 56 | # .devtoolbase only exists within eSDK |
55 | # If found, initialize bitbake path for eSDK environment and append to PATH | 57 | # If found, initialize bitbake path for eSDK environment and append to PATH |
56 | sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin') | 58 | sdkroot = os.path.join(os.path.dirname(scripts_path), 'bitbake', 'bin') |