[V2,1/1] buildtools-tarball: do not export OECORE_NATIVE_SYSROOT

Submitted by Qi.Chen@windriver.com on Aug. 2, 2013, 3:37 a.m. | Patch ID: 54949


Message ID 2743307e4802ce4564558a9dd9da55b039247040.1375414558.git.Qi.Chen@windriver.com
State Accepted
Commit d4a4c764a844a7e61f866af9361f139684037336
Headers show

Commit Message

Qi.Chen@windriver.com Aug. 2, 2013, 3:37 a.m.
From: Chen Qi <Qi.Chen@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.
Thus, instead of exporting OECORE_NATIVE_SYSROOT, we use a comment here.

[YOCTO #4939]

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

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/meta/buildtools-tarball.bb b/meta/recipes-core/meta/buildtools-tarball.bb
index 9771497..1e46308 100644
--- a/meta/recipes-core/meta/buildtools-tarball.bb
+++ b/meta/recipes-core/meta/buildtools-tarball.bb
@@ -59,7 +59,10 @@  create_sdk_files_append () {
 	touch $script
 	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
-	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+	# In order for the self-extraction script to correctly extract and set up things,
+	# we need a 'OECORE_NATIVE_SYSROOT=xxx' line in environment setup script.
+	# However, buildtools-tarball is inherently a tool set instead of a fully functional SDK,
+	# so instead of exporting the variable, we use a comment here.
 	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}