summaryrefslogtreecommitdiffstats
path: root/meta/files
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/files
parentec5ec35f12e9ce4ab70602c0a941968e851f0ecd (diff)
downloadopenembedded-core-contrib-9a81ba764c31ae8e5af08c2bd672b2fbca46d497.tar.gz
openembedded-core-contrib-9a81ba764c31ae8e5af08c2bd672b2fbca46d497.tar.bz2
openembedded-core-contrib-9a81ba764c31ae8e5af08c2bd672b2fbca46d497.zip
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/files')
-rw-r--r--meta/files/ext-sdk-prepare.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/meta/files/ext-sdk-prepare.sh b/meta/files/ext-sdk-prepare.sh
new file mode 100644
index 0000000000..160c71e97c
--- /dev/null
+++ b/meta/files/ext-sdk-prepare.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+# Prepare the build system within the extensible SDK
+
+target_sdk_dir="$1"
+sdk_targets="$2"
+
+# Avoid actually building images during this phase, but still
+# ensure all dependencies are extracted from sstate
+# This is a hack, to be sure, but we really don't need to do this here
+for sdktarget in $sdk_targets ; do
+ bbappend=`recipetool newappend $target_sdk_dir/workspace $sdktarget`
+ printf 'python do_rootfs_forcevariable () {\n bb.utils.mkdirhier(d.getVar("IMAGE_ROOTFS", True))\n}\n' > $bbappend
+ printf 'python do_bootimg () {\n pass\n}\n' >> $bbappend
+ printf 'python do_bootdirectdisk () {\n pass\n}\n' >> $bbappend
+ printf 'python do_vmimg () {\n pass\n}\n' >> $bbappend
+ printf "Created bbappend %s\n" "$bbappend"
+done
+bitbake $sdk_targets || exit 1
+rm -rf $target_sdk_dir/workspace/appends/*