summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorLaurentiu Palcu <laurentiu.palcu@intel.com>2013-09-25 15:40:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-26 16:37:13 +0100
commit0623a0e1bd7cf0c405a0469e9f16779971c0c3b5 (patch)
treea4e28faf80f747d8bf5fa713897a6d6d450fc214 /meta/recipes-devtools
parent5acfced041477d8c272485196e87ad601a0ce5b4 (diff)
downloadopenembedded-core-0623a0e1bd7cf0c405a0469e9f16779971c0c3b5.tar.gz
openembedded-core-0623a0e1bd7cf0c405a0469e9f16779971c0c3b5.tar.bz2
openembedded-core-0623a0e1bd7cf0c405a0469e9f16779971c0c3b5.zip
adt-installer: add warning if MACHINE is not set in adt-installer.conf
Since the MACHINE can now be specified in adt-installer.conf, in order to install the proper toolchain and environment script for the given machine, add a sanity checking at the beginning to make sure MACHINE is set for the wanted architecture. Also: * uncomment the x86 target variables, in adt-installer.conf, in order to have qemux86 MACHINE set, by default, and also the sysroot installed (since it doesn't make much sense to install the toolchain without a target sysroot); * remove 'sudo' when creating relocate_sdk_tmp.py because the file is created in adt-installer directory; [YOCTO #5259] Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/adt_installer14
-rw-r--r--meta/recipes-devtools/installer/adt-installer/adt_installer.conf10
-rwxr-xr-xmeta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal4
3 files changed, 20 insertions, 8 deletions
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer b/meta/recipes-devtools/installer/adt-installer/adt_installer
index 76afcf36ed..f3c05185a1 100755
--- a/meta/recipes-devtools/installer/adt-installer/adt_installer
+++ b/meta/recipes-devtools/installer/adt-installer/adt_installer
@@ -67,6 +67,10 @@ validate_config()
for selected_arch_type in $YOCTOADT_TARGETS; do
found=0
+ select_machine_var="\$YOCTOADT_TARGET_MACHINE_$selected_arch_type"
+ select_machine=`eval echo $select_machine_var`
+ show_error_banner=0
+
for supported_arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
if [ "$selected_arch_type" == "$supported_arch_type" ]; then
found=1
@@ -75,10 +79,18 @@ validate_config()
done
if [ $found == 0 ]; then
echo_info "[ADT_INST] Error: YOCTADT_TARGETS in adt_installer.conf contains invalid entries: $YOCTOADT_TARGETS. Valid values are: $YOCTOADT_SUPPORTED_TARGETS"
+ show_error_banner=1
+ elif [ -z "$select_machine" ]; then
+ echo_info "[ADT_INST] Error: No MACHINE was defined for $selected_arch_type architecture! This is needed to install the toolchain and the correct environment settings."
+ echo_info "[ADT_INST] To do that, in adt-installer.conf, set the following variable: YOCTOADT_TARGET_MACHINE_$selected_arch_type"
+ show_error_banner=1
+ fi
+
+ if [ $show_error_banner == 1 ]; then
echo -e "\n#############################################################################"
echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
echo -e "#############################################################################\n"
- exit -1
+ exit -1
fi
done
diff --git a/meta/recipes-devtools/installer/adt-installer/adt_installer.conf b/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
index cc54acda19..9329a8d199 100644
--- a/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
+++ b/meta/recipes-devtools/installer/adt-installer/adt_installer.conf
@@ -51,11 +51,11 @@ YOCTOADT_TARGET_MACHINE_arm="qemuarm"
YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_arm"
-#Here's another example for setting up target arch of x86, by uncommenting it will trigger the installer to download and setup 2 sysroot environment for 2 target arches: arm and x86. If you want to add more target arch support, you can append more entries by following these samples
-#YOCTOADT_ROOTFS_x86="sato-sdk"
-#YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sato-sdk"
-#YOCTOADT_TARGET_MACHINE_x86="qemux86"
-#YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86"
+#Here's a template for setting up target arch of x86
+YOCTOADT_ROOTFS_x86="sato-sdk"
+YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sato-sdk"
+YOCTOADT_TARGET_MACHINE_x86="qemux86"
+YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/$YOCTOADT_TARGET_MACHINE_x86"
#Here's some template of other arches, which you need to change the value in ""
#YOCTOADT_ROOTFS_x86_64="sato-sdk"
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index ebfdf2a69b..2eb13a9044 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -195,8 +195,8 @@ escaped_sdkpath=$(echo $DEFAULT_INSTALL_FOLDER |sed -e "s:[\+\.]:\\\\\\\\\0:g")
# We don't change the script in-place since we may want the user to re-run
# adt-installer script
-$SUDO sh -c "sed -e '"s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:"' scripts/relocate_sdk.py > scripts/relocate_sdk_tmp.py"
-$SUDO chmod +x scripts/relocate_sdk_tmp.py
+sed -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" scripts/relocate_sdk.py > scripts/relocate_sdk_tmp.py
+chmod +x scripts/relocate_sdk_tmp.py
dl_path=$(find $OECORE_NATIVE_SYSROOT/lib -name "ld-linux*")
executable_files=$(find $OECORE_NATIVE_SYSROOT -type f -perm /111)