summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Witt <randy.e.witt@intel.com>2014-08-27 15:51:09 -0700
committerRandy Witt <randy.e.witt@intel.com>2014-08-29 11:52:39 -0700
commit55c0c21692bc45900e6f97a7a45f13b6b2075bc3 (patch)
tree54d0de478690ee550c4abf5f051cb0b0be2ccc3e
parentc5a2ed20c4e18484e4cb20ad09a2c4189d0c67a1 (diff)
downloadopenembedded-core-contrib-rewitt/newsdk.tar.gz
openembedded-core-contrib-rewitt/newsdk.tar.bz2
openembedded-core-contrib-rewitt/newsdk.zip
sdktool.py: Remove hardcoded bitbake path.rewitt/newsdk
The layer that contains bitbake and the environment setup files is now injected during sdk creation using sed.
-rw-r--r--meta/recipes-core/meta/meta-newsdk.bb5
-rw-r--r--meta/recipes-core/meta/meta-newsdk/sdktool.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/meta/recipes-core/meta/meta-newsdk.bb b/meta/recipes-core/meta/meta-newsdk.bb
index f453410447..ea58e3a2a5 100644
--- a/meta/recipes-core/meta/meta-newsdk.bb
+++ b/meta/recipes-core/meta/meta-newsdk.bb
@@ -97,6 +97,8 @@ python copy_buildsystem () {
if layer != bitbakepath:
layerrelpath = os.path.relpath(layer, os.path.dirname(toplevel))
sdkbblayers.append(layerrelpath)
+ else:
+ d.setVar('BITBAKE_LAYER', os.path.basename(toplevel))
# Create a layer for new recipes / appends
bb.utils.mkdirhier(baseoutpath + '/workspace/conf')
@@ -173,6 +175,7 @@ python copy_buildsystem () {
install_sdktool() {
install -d ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}
install -m 0755 ${WORKDIR}/sdktool.py ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/sdktool
+ sed -i -e 's#BITBAKE_LAYER#${BITBAKE_LAYER}#g' ${SDK_OUTPUT}/${SDKPATHNATIVE}${bindir_nativesdk}/sdktool
}
toolchain_create_sdk_env_script () {
@@ -194,7 +197,7 @@ sdk_postinst() {
echo done
printf "Preparing build system..."
cd $target_sdk_dir
- sh -c ". layers/poky/oe-init-build-env . > /dev/null && bitbake ${SDK_TARGETS} > /dev/null"
+ sh -c ". layers/${BITBAKE_LAYER}/oe-init-build-env . > /dev/null && bitbake ${SDK_TARGETS} > /dev/null"
}
SDK_POST_INSTALL_COMMAND = "${sdk_postinst}"
diff --git a/meta/recipes-core/meta/meta-newsdk/sdktool.py b/meta/recipes-core/meta/meta-newsdk/sdktool.py
index 8ed48c6346..6c31e3e866 100644
--- a/meta/recipes-core/meta/meta-newsdk/sdktool.py
+++ b/meta/recipes-core/meta/meta-newsdk/sdktool.py
@@ -10,9 +10,8 @@ import sys
import os
import argparse
-# FIXME these should be written out when producing the SDK
-bitbake_subdir = 'layers/poky/bitbake'
-init_subdir = 'layers/poky'
+bitbake_subdir = 'layers/BITBAKE_LAYER/bitbake'
+init_subdir = 'layers/BITBAKE_LAYER'
init_script = 'oe-init-build-env'
basepath = os.path.abspath(__file__)