[OE-core] [PATCH 1/1] buildtools-tarball: unset OECORE_NATIVE_SYSROOT

Qi.Chen at windriver.com Qi.Chen at windriver.com
Tue Jul 30 01:50:04 UTC 2013


From: Chen Qi <Qi.Chen at windriver.com>

When building a qemu image inside the environment created by the
buildtools-tarball, the qemu image cannot be started, as the runqemu
script uses the tunctl binary which cannot be found inside the sysroot
directory of the buildtools-tarball.

The buildtools-tarball is inherently a tool set instead of a fully
functional SDK, so leaving the OECORE_NATIVE_SYSROOT variable in the
environment will mess things up.

However, we do need a line of 'OECORE_NATIVE_SYSROOT=xxx' in the environment
setup script so that the SDK can be extracted and relocated correctly.

That's why this patch unsets the variable instead of removing it from the
environment setup script.

[YOCTO #4939]

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
 meta/recipes-core/meta/buildtools-tarball.bb |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 9771497..1f8f142 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -59,7 +59,11 @@ create_sdk_files_append () {
 	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
 	touch $script
 	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+	# OECORE_NATIVE_SYSROOT variable needs to be in $script so that the
+	# relocate script can find the ld-linux.so.
 	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
-
+	# buildtools-tarball is inherently a tool set instead of a fully functional SDK.
+	# Leaving OECORE_NATIVE_SYSROOT in environment will mess things up.
+	echo 'unset OECORE_NATIVE_SYSROOT' >> $script
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 }
-- 
1.7.9.5




More information about the Openembedded-core mailing list