Skip to contentSkip to conversation

buildtools-tarball: Change the way the SDK is sanitized

PATCH In review Mark Hatle 2 participants 3 messages Jun 24, 2013

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

PATCH 1/1 buildtools-tarball: Change the way the SDK is sanitized

The previous method of shrinking down the scale of the environment-setup file would not work properly when the target is configured with multilibs.

In addition, the configured machine name and similar settings could leak into the SDK naming. This was resolved by clearing the SDK generated files and generating our own custom files.

Note, the name of the environment-setup now is suffixed with the SDK_SYS.

---
 meta/recipes-core/meta/buildtools-tarball.bb | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
meta/recipes-core/meta/buildtools-tarball.bb +11 -4
index f8024f9..8b68f71 100644
@@ -49,8 +49,15 @@ inherit meta
 inherit populate_sdk
 
 create_sdk_files_append () {
-	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config*
-	
-	cat ${SDK_OUTPUT}/${SDKPATH}/environment-setup* | grep " PATH=\|OECORE_NATIVE_SYSROOT" > ${WORKDIR}/envtmp
-	mv ${WORKDIR}/envtmp ${SDK_OUTPUT}/${SDKPATH}/environment-setup*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/site-config-*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/environment-setup-*
+	rm -f ${SDK_OUTPUT}/${SDKPATH}/version-*
+
+	# Generate new (mini) sdk-environment-setup file
+	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}
+	touch $script
+	echo 'export PATH=${SDKPATHNATIVE}${bindir_nativesdk}:$PATH' >> $script
+	echo 'export OECORE_NATIVE_SYSROOT="${SDKPATHNATIVE}"' >> $script
+
+	toolchain_create_sdk_version ${SDK_OUTPUT}/${SDKPATH}/version-${SDK_SYS}
 }
Signature · 1 line
1.8.3.1
#1 lore raw

meta/recipes-core/meta/buildtools-tarball.bb inherit meta · line 57

Quoted 1 line · On Monday 24 June 2013 09:47:15 Mark Hatle wrote:
meta/recipes-core/meta/buildtools-tarball.bb +1 -0
+	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}

I could be wrong but I think this may be a bashism...

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 4 lines · On Monday 24 June 2013 16:31:13 Paul Eggleton wrote:

meta/recipes-core/meta/buildtools-tarball.bb inherit meta · line 57

Quoted 1 line · On Monday 24 June 2013 09:47:15 Mark Hatle wrote:
meta/recipes-core/meta/buildtools-tarball.bb +1 -0
+	script=${1:-${SDK_OUTPUT}/${SDKPATH}/environment-setup-${SDK_SYS}}

I could be wrong but I think this may be a bashism...

Actually, I spoke too soon, it isn't. Ignore me...

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre