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')
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 () {
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}"
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__)