diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/populate_sdk_ext.bbclass | 5 | ||||
-rw-r--r-- | meta/files/ext-sdk-prepare.sh | 20 |
2 files changed, 24 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 | ||
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 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # Prepare the build system within the extensible SDK | ||
4 | |||
5 | target_sdk_dir="$1" | ||
6 | sdk_targets="$2" | ||
7 | |||
8 | # Avoid actually building images during this phase, but still | ||
9 | # ensure all dependencies are extracted from sstate | ||
10 | # This is a hack, to be sure, but we really don't need to do this here | ||
11 | for sdktarget in $sdk_targets ; do | ||
12 | bbappend=`recipetool newappend $target_sdk_dir/workspace $sdktarget` | ||
13 | printf 'python do_rootfs_forcevariable () {\n bb.utils.mkdirhier(d.getVar("IMAGE_ROOTFS", True))\n}\n' > $bbappend | ||
14 | printf 'python do_bootimg () {\n pass\n}\n' >> $bbappend | ||
15 | printf 'python do_bootdirectdisk () {\n pass\n}\n' >> $bbappend | ||
16 | printf 'python do_vmimg () {\n pass\n}\n' >> $bbappend | ||
17 | printf "Created bbappend %s\n" "$bbappend" | ||
18 | done | ||
19 | bitbake $sdk_targets || exit 1 | ||
20 | rm -rf $target_sdk_dir/workspace/appends/* | ||