summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2020-08-06 16:44:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-10-06 14:15:21 +0100
commitd092baeef2ab6777a96dd4163dec017216dd99a3 (patch)
tree114bd5a6d58ba9f1f53196cf3dc0091532272923 /meta
parent5fb7913c5e337a16b07a1a45417ab91361e97360 (diff)
downloadpoky-d092baeef2ab6777a96dd4163dec017216dd99a3.tar.gz
buildtools: Handle generic environment setup injection
Currently buildtools has its own hacked environment setup. We added capability for generic script fragements but this code was never updated to use it even if several components it contains needs it. Remove a hardcoded variable in favour of the generic scripts to avoid bugs in this area in future. The others should probably be migrated to environment files in future too but there isn't such a file for those at present. (From OE-Core rev: b62ced32772d21c689998c5995f31550db51466d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit eb210cee4bd71614dd108027e6d5aa8f8d451b27) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/meta/buildtools-tarball.bb19
1 files changed, 11 insertions, 8 deletions
diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 77e1fa23cb..44d658687d 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -67,16 +67,19 @@ create_sdk_files_append () {
67 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}} 67 script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
68 touch $script 68 touch $script
69 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script 69 echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
70 # In order for the self-extraction script to correctly extract and set up things, 70 echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
71 # we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
72 # However, buildtools-tarball is inherently a tool set instead of a fully functional SDK,
73 # so instead of exporting the variable, we use a comment here.
74 echo '#OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
75 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
76
77 echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script 71 echo 'export GIT_SSL_CAINFO="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
78 echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script 72 echo 'export SSL_CERT_FILE="${SDKPATHNATIVE}${sysconfdir}/ssl/certs/ca-certificates.crt"' >>$script
79 echo 'export OPENSSL_CONF="${SDKPATHNATIVE}${sysconfdir}/ssl/openssl.cnf"' >>$script 73
74 toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
75
76 cat >> $script <<EOF
77if [ -d "\$OECORE_NATIVE_SYSROOT/environment-setup.d" ]; then
78 for envfile in \$OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh; do
79 . \$envfile
80 done
81fi
82EOF
80 83
81 mkdir -p ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/ 84 mkdir -p ${SDK_OUTPUT}/${SDKPATHNATIVE}${sysconfdir}/
82 echo '${SDKPATHNATIVE}${libdir} 85 echo '${SDKPATHNATIVE}${libdir}