summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2015-10-19 17:33:09 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-10-20 10:12:01 +0100
commit9a81ba764c31ae8e5af08c2bd672b2fbca46d497 (patch)
tree7e4f4325064cf9a785e5966a2971ddd0148555ad /meta/classes
parentec5ec35f12e9ce4ab70602c0a941968e851f0ecd (diff)
downloadpoky-9a81ba764c31ae8e5af08c2bd672b2fbca46d497.tar.gz
classes/populate_sdk_ext: prevent image construction from executing on install
In order to prepare the build system within the extensible SDK, we actually go ahead and build the targets specified by SDK_TARGETS (by default the image the SDK was built for). Assuming that's an image, we don't actually need to build the image itself - we just need to have everything done up to the point before building the image, so that we have everything needed in the sysroot. In order to do this, create temporary bbappends for each of the targets in the workspace layer that stub out do_rootfs and related tasks if they exist. This is a little bit of a hack but is the least intrusive fix at this point. To make things a bit tidier, I have split out the preparation commands into a separate script so we can run that in the appropriate environment rather than all the commands separately. Fixes [YOCTO #7590]. (From OE-Core rev: d2a2962897b89731a5705b0cbc7c6f36aa53dcc8) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/populate_sdk_ext.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass
index 90033bab5a..0feb3b20c5 100644
--- a/meta/classes/populate_sdk_ext.bbclass
+++ b/meta/classes/populate_sdk_ext.bbclass
@@ -203,6 +203,8 @@ install_tools() {
203 install $buildtools_path ${SDK_OUTPUT}/${SDKPATH} 203 install $buildtools_path ${SDK_OUTPUT}/${SDKPATH}
204 204
205 install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH} 205 install ${SDK_DEPLOY}/${BUILD_ARCH}-nativesdk-libc.tar.bz2 ${SDK_OUTPUT}/${SDKPATH}
206
207 install -m 0755 ${COREBASE}/meta/files/ext-sdk-prepare.sh ${SDK_OUTPUT}/${SDKPATH}
206} 208}
207 209
208# Since bitbake won't run as root it doesn't make sense to try and install 210# Since bitbake won't run as root it doesn't make sense to try and install
@@ -242,8 +244,9 @@ sdk_ext_postinst() {
242 # dash which is /bin/sh on Ubuntu will not preserve the 244 # dash which is /bin/sh on Ubuntu will not preserve the
243 # current working directory when first ran, nor will it set $1 when 245 # current working directory when first ran, nor will it set $1 when
244 # sourcing a script. That is why this has to look so ugly. 246 # sourcing a script. That is why this has to look so ugly.
245 sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && bitbake ${SDK_TARGETS} >> preparing_build_system.log" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; } 247 sh -c ". buildtools/environment-setup* > preparing_build_system.log && cd $target_sdk_dir/`dirname ${oe_init_build_env_path}` && set $target_sdk_dir && . $target_sdk_dir/${oe_init_build_env_path} $target_sdk_dir >> preparing_build_system.log && $target_sdk_dir/ext-sdk-prepare.sh $target_sdk_dir '${SDK_TARGETS}' >> preparing_build_system.log 2>&1" || { echo "SDK preparation failed: see `pwd`/preparing_build_system.log" ; exit 1 ; }
246 fi 248 fi
249 rm -f $target_sdk_dir/ext-sdk-prepare.sh
247 echo done 250 echo done
248} 251}
249 252