[oe-commits] Laurentiu Palcu : populate_sdk_base.bbclass: check installation machine before installing SDK
git at git.openembedded.org
git at git.openembedded.org
Fri Nov 2 16:19:02 UTC 2012
Module: openembedded-core.git
Branch: master
Commit: 1f78e2c97f978f0f02e884870e7c495751f0802c
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=1f78e2c97f978f0f02e884870e7c495751f0802c
Author: Laurentiu Palcu <laurentiu.palcu at intel.com>
Date: Thu Nov 1 15:23:02 2012 +0200
populate_sdk_base.bbclass: check installation machine before installing SDK
Do not allow installer to continue if the installation machine architecture
does not match the intended SDK machine architecture.
[YOCTO: #3269]
Signed-off-by: Laurentiu Palcu <laurentiu.palcu at intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/classes/populate_sdk_base.bbclass | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index a3ac757..dc715c4 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -118,6 +118,14 @@ fakeroot create_shar() {
cat << "EOF" > ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
#!/bin/bash
+INST_ARCH=$(uname -m | sed -e "s/i[3-6]86/ix86/" -e "s/x86[-_]64/x86_64/")
+SDKMACHINE=$(echo ${SDKMACHINE} | sed -e "s/i[5-6]86/ix86/")
+
+if [ "$INST_ARCH" != "$SDKMACHINE" ]; then
+ echo "Error: Installation machine not supported!"
+ exit -1
+fi
+
DEFAULT_INSTALL_DIR="${SDKPATH}"
COMPONENTS_LEN=$(echo ".${SDKPATH}" | sed "s/\// /g" | wc -w)
More information about the Openembedded-commits
mailing list