Skip to contentSkip to conversation

Consolidate adt-installer pull request

PATCH In review Jessica Zhang 3 participants 61 messages Jan 3, 2011 – Jan 4, 2011 Page 3 of 3

lore
Share & tools
lore
#39 lore raw

PATCH 39/59 Add opkg source tarball for testing.

In reply to Jessica Zhang
---
 scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz |  Bin 0 -> 437009 bytes
 1 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz
scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..eb16094bd564ac07a78ff00de86174036f241372
GIT binary patch
Signature · 1 line
1.7.0.4
#41 lore raw

PATCH 41/59 Remove the param passing for readability

In reply to Jessica Zhang
---
 .../adt-installer/scripts/yocto_installer_internal |    5 ++++-
 scripts/adt-installer/yocto_installer              |    2 --
 2 files changed, 4 insertions(+), 3 deletions(-)
scripts/adt-installer/scripts/yocto_installer_internal +4 -1
index 151d8f4..15d6ea3 100755
@@ -196,8 +196,11 @@ parse_config
 #secondly we will start to install native tools
 install_native_sdk
 
+username=`id -nu`
+groupname=`id -ng`
+
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  install_target $arch_type $1 $2
+  install_target $arch_type $username $groupname
   check_result
 done
 
scripts/adt-installer/yocto_installer +0 -2
index 975befc..2038ecd 100755
@@ -309,8 +309,6 @@ for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
   download_images $arch_type
 done
 
-username=`id -nu`
-groupname=`id -ng`
 scripts/yocto_installer_internal $username $groupname
 
 result="$?"
Signature · 1 line
1.7.0.4
#40 lore raw

PATCH 40/59 Add split include script file

In reply to Jessica Zhang
---
 scripts/adt-installer/scripts/data_define    |   36 ++++++++++++++++
 scripts/adt-installer/scripts/extract_rootfs |   59 ++++++++++++++++++++++++++
 2 files changed, 95 insertions(+), 0 deletions(-)
 create mode 100644 scripts/adt-installer/scripts/data_define
 create mode 100755 scripts/adt-installer/scripts/extract_rootfs
scripts/adt-installer/scripts/data_define new file +36 -0
new file mode 100644
index 0000000..0f8e48b
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+# Yocto ADT Installer
+#
+# Copyright (C) 2010 Intel Corp.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+config_file="yocto_installer.conf"
+source $config_file
+
+LOCAL_OPKG_LOC="./opkg/build/opkg"
+LOCAL_OPKG_FOLDER="./opkg/build"
+LOCAL_OPKG_SOURCE_FILE="$LOCAL_OPKG_FOLDER/opkg-*.tar.gz"
+OPKG_LIBDIR="/var/lib"
+
+# List all supported root fs types and target types,
+# it will be used in user configuration validity checking
+YOCTOADT_SUPPORTED_ROOTFS="minimal sato sdk lsb"
+YOCTOADT_SUPPORTED_TARGETS="x86 x86_64 arm powerpc mips"
+# Different host (32 bit or 64 bit) will have different opkg
+# configuration files
+YOCTOADT_OPKG_CONF_FILE_32="./opkg/conf/opkg-sdk-i586.conf"
+YOCTOADT_OPKG_CONF_FILE_64="./opkg/conf/opkg-sdk-x86_64.conf"
+INSTALL_FOLDER=/opt/poky/$YOCTOADT_VERSION
scripts/adt-installer/scripts/extract_rootfs new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#42 lore raw

PATCH 42/59 Remove redundant prompts

In reply to Jessica Zhang
---
 scripts/adt-installer/yocto_installer |   21 +++++++++++++++------
 1 files changed, 15 insertions(+), 6 deletions(-)
scripts/adt-installer/yocto_installer +15 -6
index 2038ecd..0e35576 100755
@@ -167,14 +167,25 @@ fi
 
 confirm_download()
 {
+
+#avoid repeated reminding
+if [ "$override_oldfile" == 1 ]; then
+  return $pre_result
+else
+  override_oldfile=1
+fi
+
 while true; do
-  echo_info "[ADT_INST] File [ $1 ] to be downloaded already exists."
-  echo_info "[ADT_INST] Do you want to continue downloading? If yes, old file will be removed. Please enter Y/N:"
+  echo_info "[ADT_INST] Files [$1] already exists. If you continue downloading, old files will be overrided."
+  echo_info "[ADT_INST] Further prompts will not be given if there're more existing files to be downloaded."
+  echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
   read YOCTOADT_INSTALL
   YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
   if [ "$YOCTOADT_INSTALL" == "Y" ]; then
+    pre_result=0
     return 0
   elif [ "$YOCTOADT_INSTALL" == "N" ]; then
+    pre_result=1
     return 1
   fi
 done
@@ -234,7 +245,7 @@ download_images()
     select_sysroot=`eval echo $select_sysroot_var`
 
     echo_info "\n############################################################################"
-    echo_info "# Please confirm below installation configurations from yocto_installer.conf"
+    echo_info "# To be downloaded rootfs image details defined in yocto_installer.conf"
     echo_info "############################################################################"
     echo_info "# Target architecture:\t\t$1"
     echo_info "# Root_fs images:\t\t$select_rootfs"
@@ -242,9 +253,6 @@ download_images()
     echo_info "# Target sysroot dir:\t\t$select_sysroot"
     echo_info "############################################################################\n"
 
-    confirm_install
-
-
     get_qemu_image $1 $select_rootfs
   fi
 }
@@ -305,6 +313,7 @@ if [ ! -d "$LOCAL_DOWNLOAD" ]; then
 fi
 
 #downloading required qemu images/rootfs
+override_oldfile=0
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
   download_images $arch_type
 done
Signature · 1 line
1.7.0.4
#44 lore raw

PATCH 44/59 Add new folder under installer for conforming bb file path conventions

In reply to Jessica Zhang
---
 .../adt-installer/opkg/conf/opkg-sdk-i586.conf     |    0
 .../adt-installer/opkg/conf/opkg-sdk-x86_64.conf   |    0
 .../adt-installer/scripts/data_define              |    0
 .../adt-installer/scripts/extract_rootfs           |    0
 .../{ => installer}/adt-installer/scripts/util     |    0
 .../adt-installer/scripts/yocto_installer_internal |    0
 .../{ => installer}/adt-installer/yocto_installer  |    0
 .../adt-installer/yocto_installer.conf             |    0
 8 files changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-devtools/{ => installer}/adt-installer/opkg/conf/opkg-sdk-i586.conf (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/opkg/conf/opkg-sdk-x86_64.conf (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/scripts/data_define (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/scripts/extract_rootfs (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/scripts/util (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/scripts/yocto_installer_internal (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/yocto_installer (100%)
 rename meta/recipes-devtools/{ => installer}/adt-installer/yocto_installer.conf (100%)
meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i586.conf renamed from meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-i586.conf +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-i586.conf
rename to meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-i586.conf
meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf renamed from meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-x86_64.conf +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
rename to meta/recipes-devtools/installer/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
meta/recipes-devtools/installer/adt-installer/scripts/data_define renamed from meta/recipes-devtools/adt-installer/scripts/data_define +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/scripts/data_define
rename to meta/recipes-devtools/installer/adt-installer/scripts/data_define
meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs renamed from meta/recipes-devtools/adt-installer/scripts/extract_rootfs +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/scripts/extract_rootfs
rename to meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs
meta/recipes-devtools/installer/adt-installer/scripts/util renamed from meta/recipes-devtools/adt-installer/scripts/util +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/scripts/util
rename to meta/recipes-devtools/installer/adt-installer/scripts/util
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal renamed from meta/recipes-devtools/adt-installer/scripts/yocto_installer_internal +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/scripts/yocto_installer_internal
rename to meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal
meta/recipes-devtools/installer/adt-installer/yocto_installer renamed from meta/recipes-devtools/adt-installer/yocto_installer +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/yocto_installer
rename to meta/recipes-devtools/installer/adt-installer/yocto_installer
meta/recipes-devtools/installer/adt-installer/yocto_installer.conf renamed from meta/recipes-devtools/adt-installer/yocto_installer.conf +0 -0
similarity index 100%
rename from meta/recipes-devtools/adt-installer/yocto_installer.conf
rename to meta/recipes-devtools/installer/adt-installer/yocto_installer.conf
Signature · 1 line
1.7.0.4
#45 lore raw

PATCH 45/59 Add installer scripts tarball generating bb file

In reply to Jessica Zhang
---
 .../installer/adt-installer_1.0.bb                 |   60 ++++++++++++++++++++
 1 files changed, 60 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/installer/adt-installer_1.0.bb
meta/recipes-devtools/installer/adt-installer_1.0.bb new file +60 -0
new file mode 100644
index 0000000..fa10be3
@@ -0,0 +1,60 @@
+DESCRIPTION = "Meta package for creating sdk installer tarball"
+LIC_FILES_CHKSUM = "file://${POKYBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
+                    file://${POKYBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+LICENSE = "MIT"
+
+ALLOW_EMPTY = "1"
+
+PACKAGES = ""
+PACKAGE_ARCH = "all"
+
+PR = "r0"
+
+ADT_DEPLOY = "${TMPDIR}/deploy/sdk/"
+ADT_DIR = "${WORKDIR}/adt-installer/"
+
+S = "${WORKDIR}"
+
+inherit deploy
+
+SRC_URI = "http://opkg.googlecode.com/files/opkg-0.1.8.tar.gz \
+           file://yocto_installer \
+           file://scripts/yocto_installer_internal \
+           file://scripts/util \
+           file://scripts/data_define \
+           file://scripts/extract_rootfs \
+           file://yocto_installer.conf \
+           file://opkg/conf/opkg-sdk-x86_64.conf \
+           file://opkg/conf/opkg-sdk-i586.conf \
+	  "
+SRC_URI[md5sum] = "5e888dd46a252cc22686b732fbe486b3"
+SRC_URI[sha256sum] = "ded8f16f55a641672fe1344842998def5f5163d7ebbd5d58ab15c54b04927660"
+
+fakeroot do_deploy () {
+	mkdir -p ${ADT_DEPLOY}
+	rm -f ${ADT_DEPLOY}/adt-installer.tar.bz2
+	rm -rf ${ADT_DIR}
+	mkdir -p ${ADT_DIR}
+	mkdir -p ${WORKDIR}/opkg/conf
+	mkdir -p ${WORKDIR}/opkg/build
+	mkdir -p ${WORKDIR}/scripts
+	mkdir -p ${WORKDIR}/build
+	cp -r ${WORKDIR}/opkg ${ADT_DIR}/
+	cp -r ${WORKDIR}/opkg-0.1.8 ${ADT_DIR}/opkg/build
+	cp -r ${WORKDIR}/scripts ${ADT_DIR}/
+	cp yocto_installer ${ADT_DIR}
+	cp yocto_installer.conf ${ADT_DIR}
+	tar cfj ${WORKDIR}/adt_installer.tar.bz2 adt-installer
+	cp adt_installer.tar.bz2 ${ADT_DEPLOY}
+}
+
+do_patch[noexec] = "1"
+do_configure[noexec] = "1"
+do_compile[noexec] = "1"
+do_package[noexec] = "1"
+do_package_write[noexec] = "1"
+do_package_write_ipk[noexec] = "1"
+do_package_write_rpm[noexec] = "1"
+do_package_write_deb[noexec] = "1"
+
+addtask deploy before do_populate_sysroot after do_install
Signature · 1 line
1.7.0.4
#43 lore raw

PATCH 43/59 Move installer scripts to the decided folders

In reply to Jessica Zhang

We finally decided to move installer scripts under meta/recipe-devtools/

---
 .../adt-installer/opkg/conf/opkg-sdk-i586.conf     |    0
 .../adt-installer/opkg/conf/opkg-sdk-x86_64.conf   |    0
 .../adt-installer/scripts/data_define              |    0
 .../adt-installer/scripts/extract_rootfs           |    0
 .../recipes-devtools}/adt-installer/scripts/util   |    0
 .../adt-installer/scripts/yocto_installer_internal |    0
 .../adt-installer/yocto_installer                  |    0
 .../adt-installer/yocto_installer.conf             |    0
 scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz |  Bin 437009 -> 0 bytes
 9 files changed, 0 insertions(+), 0 deletions(-)
 rename {scripts => meta/recipes-devtools}/adt-installer/opkg/conf/opkg-sdk-i586.conf (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/opkg/conf/opkg-sdk-x86_64.conf (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/scripts/data_define (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/scripts/extract_rootfs (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/scripts/util (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/scripts/yocto_installer_internal (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/yocto_installer (100%)
 rename {scripts => meta/recipes-devtools}/adt-installer/yocto_installer.conf (100%)
 delete mode 100644 scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz
meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-i586.conf renamed from scripts/adt-installer/opkg/conf/opkg-sdk-i586.conf +0 -0
similarity index 100%
rename from scripts/adt-installer/opkg/conf/opkg-sdk-i586.conf
rename to meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-i586.conf
meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-x86_64.conf renamed from scripts/adt-installer/opkg/conf/opkg-sdk-x86_64.conf +0 -0
similarity index 100%
rename from scripts/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
rename to meta/recipes-devtools/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
meta/recipes-devtools/adt-installer/scripts/data_define renamed from scripts/adt-installer/scripts/data_define +0 -0
similarity index 100%
rename from scripts/adt-installer/scripts/data_define
rename to meta/recipes-devtools/adt-installer/scripts/data_define
meta/recipes-devtools/adt-installer/scripts/extract_rootfs renamed from scripts/adt-installer/scripts/extract_rootfs +0 -0
similarity index 100%
rename from scripts/adt-installer/scripts/extract_rootfs
rename to meta/recipes-devtools/adt-installer/scripts/extract_rootfs
meta/recipes-devtools/adt-installer/scripts/util renamed from scripts/adt-installer/scripts/util +0 -0
similarity index 100%
rename from scripts/adt-installer/scripts/util
rename to meta/recipes-devtools/adt-installer/scripts/util
meta/recipes-devtools/adt-installer/scripts/yocto_installer_internal renamed from scripts/adt-installer/scripts/yocto_installer_internal +0 -0
similarity index 100%
rename from scripts/adt-installer/scripts/yocto_installer_internal
rename to meta/recipes-devtools/adt-installer/scripts/yocto_installer_internal
meta/recipes-devtools/adt-installer/yocto_installer renamed from scripts/adt-installer/yocto_installer +0 -0
similarity index 100%
rename from scripts/adt-installer/yocto_installer
rename to meta/recipes-devtools/adt-installer/yocto_installer
meta/recipes-devtools/adt-installer/yocto_installer.conf renamed from scripts/adt-installer/yocto_installer.conf +0 -0
similarity index 100%
rename from scripts/adt-installer/yocto_installer.conf
rename to meta/recipes-devtools/adt-installer/yocto_installer.conf
scripts/adt-installer/opkg/build/opkg-0.1.8.tar.gz deleted binary +0 -0
deleted file mode 100644
index eb16094bd564ac07a78ff00de86174036f241372..0000000000000000000000000000000000000000
GIT binary patch
Signature · 1 line
1.7.0.4
#46 lore raw

PATCH 46/59 Add just installer scripts code according to bb file logic

In reply to Jessica Zhang

in bb file, do_unpack will help us to untar the tarball so no need to repeat the task again in installer script.

---
 .../installer/adt-installer/scripts/data_define    |    1 -
 .../installer/adt-installer/yocto_installer        |   19 ++++++++-----------
 .../installer/adt-installer_1.0.bb                 |    3 ++-
 3 files changed, 10 insertions(+), 13 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/data_define +0 -1
index 0f8e48b..0650383 100644
@@ -22,7 +22,6 @@ source $config_file
 
 LOCAL_OPKG_LOC="./opkg/build/opkg"
 LOCAL_OPKG_FOLDER="./opkg/build"
-LOCAL_OPKG_SOURCE_FILE="$LOCAL_OPKG_FOLDER/opkg-*.tar.gz"
 OPKG_LIBDIR="/var/lib"
 
 # List all supported root fs types and target types,
meta/recipes-devtools/installer/adt-installer/yocto_installer +8 -11
index 0e35576..3faacce 100755
@@ -125,26 +125,23 @@ install_opkg()
 if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg-cl" ]; then
   echo_info "[ADT_INST]  OPKG is not setup, setting up opkg in local, which is required for installing yocto ADT...\n"
 
-  if [ ! -f $LOCAL_OPKG_SOURCE_FILE ]; then
-    echo_info "[ADT_INST] Error: OPKG source tarball is not found!"
-    exit -1
-  fi
-
   if [ -d $LOCAL_OPKG_LOC ]; then
     echo_info "[ADT_INST] Deleting old OPKG folder, which doesn't contain executables... "
     rm -rf $LOCAL_OPKG_LOC
   fi
 
-  echo_info "[ADT_INST] Untar opkg source tarball ...\n"
-
   parent_folder=`eval echo $PWD`
   cd $LOCAL_OPKG_FOLDER
-
-  tar zvfx opkg-*.gz &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
   check_result
 
-  opkg_untar_dir=`ls -d opkg-*`
-  cd $opkg_untar_dir
+  opkg_source_dir=`ls -d opkg-*`
+
+  if [ $opkg_source_dir == "" ]; then
+    echo_info "[ADT_INST] Error: OPKG source directory is not found!"
+    exit -1
+  fi
+
+  cd $opkg_source_dir
   check_result
 
   echo_info "[ADT_INST] Configure opkg ...\n"
meta/recipes-devtools/installer/adt-installer_1.0.bb +2 -1
index fa10be3..00c199c 100644
@@ -49,6 +49,7 @@ fakeroot do_deploy () {
 }
 
 do_patch[noexec] = "1"
+do_install[noexec] = "1"
 do_configure[noexec] = "1"
 do_compile[noexec] = "1"
 do_package[noexec] = "1"
@@ -57,4 +58,4 @@ do_package_write_ipk[noexec] = "1"
 do_package_write_rpm[noexec] = "1"
 do_package_write_deb[noexec] = "1"
 
-addtask deploy before do_populate_sysroot after do_install
+addtask deploy before do_populate_sysroot after do_unpack
Signature · 1 line
1.7.0.4
#47 lore raw

PATCH 47/59 Make Silent installation as another option for avoiding bothering users.

In reply to Jessica Zhang
---
 .../installer/adt-installer/scripts/extract_rootfs |    8 ++--
 .../installer/adt-installer/scripts/util           |   34 ++++++++++++++++++++
 .../adt-installer/scripts/yocto_installer_internal |   11 +++---
 .../installer/adt-installer/yocto_installer        |   18 ++++++++--
 .../installer/adt-installer_1.0.bb                 |    1 +
 5 files changed, 59 insertions(+), 13 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs +4 -4
index 5bb8506..d0687cb 100755
@@ -32,7 +32,7 @@ extract_rootfs()
 
   if [ -d "$2" ]; then
     echo_info "[ADT_INST] Target sysroot location: $2, already exists! If you continue installation, this folder will be re-created."
-    confirm_install
+    confirm_install $4
     rm -rf "$2"
   fi
 
@@ -52,8 +52,8 @@ extract_rootfs()
 . scripts/util
 
 #Parameter detail is listed below:
-#Param 5: POKY_NATIVE_SYSROOT
-#Param 3 4: user and group
+#Param 4: Silent install or customize install
+#Param 3: POKY_NATIVE_SYSROOT
 #Param 2: user defined rootfs extraction directory
 #param 1: sysroot image name
-extract_rootfs $1 $2 $3
+extract_rootfs $1 $2 $3 $4
meta/recipes-devtools/installer/adt-installer/scripts/util +34 -0
index 99ce7e2..7ccd87e 100644
@@ -22,11 +22,45 @@ echo_info()
   echo -e $1 | tee -a $YOCTOADT_INSTALL_LOG_FILE
 }
 
+select_install_type()
+{
+# If choosing silent install, all older installation data will be
+# overriden without user's interaction
+while true; do
+  echo_info "[ADT_INST] Silent install means overrides all existing older"
+  echo_info "[ADT_INST] data and the installation needs least user interaction"
+  echo_info "[ADT_INST] If you want to use silent installation, please enter S:"
+  echo_info "[ADT_INST] If you want to customize installation, please enter C:"
+  echo_info "[ADT_INST} If you want to exit current installation, please enter X:"
+  echo_info "[ADT_INST] Please enter your selections here:"
+  read YOCTOADT_SEL
+  YOCTOADT_SEL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_SEL"`
+  if [ "$YOCTOADT_SEL" == "S" ]; then
+    return "0"
+  elif [ "$YOCTOADT_SEL" == "C" ]; then
+    return "1"
+  elif [ "$YOCTOADT_SEL" == "X" ]; then
+    echo_info "\n############################################################"
+    echo_info "# User cancelled installation!"
+    echo_info "############################################################\n"
+    exit -1
+  fi
+done
+
+
+}
+
 confirm_install()
 {
 # below are prompt, make sure user still want to install even meet
 # some prompts
 
+#User likes to enjoy silent installation, we will not break his
+#installation process here
+if [ "$1" == "0" ]; then
+  return
+fi
+
 while true; do
   echo_info "[ADT_INST] Do you want to continue installation? Please enter Y/N:"
   read YOCTOADT_INSTALL
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal +6 -5
index 15d6ea3..b1560dd 100755
@@ -53,7 +53,7 @@ NATIVE_INSTALL_DIR="/"
 
 if [ -d "$INSTALL_FOLDER" ]; then
   echo_info "[ADT_INST] Native ADT installation directory \"$INSTALL_FOLDER\" already exists! Continue installation will override its contents!"
-  confirm_install
+  confirm_install $1
 fi
 
 #Now begin to install native sdk and extract qemu rootfs which needs privilege rights
@@ -67,7 +67,7 @@ if [ ! -d "$OPKG_LOCK_DIR" ]; then
 #if user delete /opt/poky, while dangling folders there, report error
 elif [ ! -d "$INSTALL_FOLDER" ]; then
   echo_info "[ADT_INST] Dangling opkg cache folder $OPKG_LOCK_DIR detected. Continue installation will remove the folder!"
-  confirm_install
+  confirm_install $1
   sudo rm -rf $OPKG_LOCK_DIR
   sudo mkdir -p $OPKG_LOCK_DIR
 #if user are updating installing, just let him/her go, give her/him prompt
@@ -161,7 +161,7 @@ if [ "$select_target" == "Y" ]; then
     sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
     echo_info "[ADT_INST] Extracting rootfs: $sysroot_image_name, using pseudo..."
 
-    sudo scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT
+    sudo scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
     # Fill $target_sysroot into /opt/poky/$YOCTOADT_VERION/environment-setup-(arch)-poky-linux-gnueabi
     check_result
     echo_info "[ADT_INST] change owner for rootfs directory $target_sysroot to $2:$3"
@@ -194,13 +194,14 @@ fi
 parse_config
 
 #secondly we will start to install native tools
-install_native_sdk
+user_inst_type=$1
+install_native_sdk $user_inst_type
 
 username=`id -nu`
 groupname=`id -ng`
 
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  install_target $arch_type $username $groupname
+  install_target $arch_type $username $groupname $user_inst_type
   check_result
 done
 
meta/recipes-devtools/installer/adt-installer/yocto_installer +14 -4
index 3faacce..fc08245 100755
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -x
 # Yocto ADT Installer
 #
 # Copyright (C) 2010 Intel Corp.
@@ -47,7 +47,7 @@ usage ()
   #echo_info "# Install poky metadata:\t$YOCTOADT_METADATA"
   echo_info "############################################################################\n"
 
-  confirm_install
+  select_install_type
 }
 
 validate_config()
@@ -297,7 +297,12 @@ if [ -f "$YOCTOADT_INSTALL_LOG_FILE" ]; then
   rm $YOCTOADT_INSTALL_LOG_FILE
 fi
 
+
 usage
+
+user_inst_type="$?"
+echo "$user_inst_type"
+
 validate_config
 check_result
 #firstly we need to install opkg host
@@ -310,12 +315,17 @@ if [ ! -d "$LOCAL_DOWNLOAD" ]; then
 fi
 
 #downloading required qemu images/rootfs
-override_oldfile=0
+if [ "$user_inst_type" == "0" ]; then
+  override_oldfile=1
+else
+  override_oldfile=0
+fi
+
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
   download_images $arch_type
 done
 
-scripts/yocto_installer_internal $username $groupname
+scripts/yocto_installer_internal $user_inst_type
 
 result="$?"
 #echo_info "\n############################################################"
meta/recipes-devtools/installer/adt-installer_1.0.bb +1 -0
index 00c199c..e55cad1 100644
@@ -57,5 +57,6 @@ do_package_write[noexec] = "1"
 do_package_write_ipk[noexec] = "1"
 do_package_write_rpm[noexec] = "1"
 do_package_write_deb[noexec] = "1"
+do_poplulate_sysroot[noexec] = "1"
 
 addtask deploy before do_populate_sysroot after do_unpack
Signature · 1 line
1.7.0.4
#48 lore raw

PATCH 48/59 Removde Debug options from installer script

In reply to Jessica Zhang
---
 .../installer/adt-installer/yocto_installer        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
meta/recipes-devtools/installer/adt-installer/yocto_installer +1 -1
index fc08245..d15d2f7 100755
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/bin/bash
 # Yocto ADT Installer
 #
 # Copyright (C) 2010 Intel Corp.
Signature · 1 line
1.7.0.4
#49 lore raw

PATCH 49/59 Remove unneccessary folder creation in do_deploy

In reply to Jessica Zhang
---
 .../installer/adt-installer_1.0.bb                 |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
meta/recipes-devtools/installer/adt-installer_1.0.bb +1 -5
index e55cad1..975dfa9 100644
@@ -34,11 +34,7 @@ fakeroot do_deploy () {
 	mkdir -p ${ADT_DEPLOY}
 	rm -f ${ADT_DEPLOY}/adt-installer.tar.bz2
 	rm -rf ${ADT_DIR}
-	mkdir -p ${ADT_DIR}
-	mkdir -p ${WORKDIR}/opkg/conf
-	mkdir -p ${WORKDIR}/opkg/build
-	mkdir -p ${WORKDIR}/scripts
-	mkdir -p ${WORKDIR}/build
+	mkdir -p ${ADT_DIR}/opkg/build
 	cp -r ${WORKDIR}/opkg ${ADT_DIR}/
 	cp -r ${WORKDIR}/opkg-0.1.8 ${ADT_DIR}/opkg/build
 	cp -r ${WORKDIR}/scripts ${ADT_DIR}/
Signature · 1 line
1.7.0.4
#52 lore raw

PATCH 51/59 Link ld.so.cache file into the host filesystem

In reply to Jessica Zhang
---
 .../adt-installer/scripts/yocto_installer_internal |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal +5 -0
index eec6f5f..9cad757 100755
@@ -116,6 +116,11 @@ for native_target_type in $YOCTOADT_TARGETS; do
 
 done
 
+# Link the ld.so.cache file into the hosts filesystem
+echo_info "[ADT_INST] Link the ld.so.cache file into the host filesystem"
+sudo ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache
+check_result
+
 if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" = "y" ]; then
   echo_info "\n[ADT_INST] Installing qemu native ..."
   $OPKG_INSTALL_NATIVE_CMD qemu-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
Signature · 1 line
1.7.0.4
#50 lore raw

PATCH 50/59 Store pseudo database in target rootfs

In reply to Jessica Zhang

When extracting and SDK image tarball using pseudo, we need to store the pseudo database in var/pseudo with the target rootfs instead of native sysroot. And then we have no need of using root priviledge to create target sysroot.

---
 .../installer/adt-installer/scripts/extract_rootfs |   27 +++++++++++---------
 .../adt-installer/scripts/yocto_installer_internal |   16 +++--------
 2 files changed, 20 insertions(+), 23 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs +15 -12
index d0687cb..8567db7 100755
@@ -21,28 +21,31 @@
 extract_rootfs()
 {
 
-  PSEUDO_LOCALSTATEDIR="$3/var/pseudo"
-  PSEUDO_COMMAND="$3/usr/bin/pseudo"
-  PSEUDO_OPTS="-P $3/usr"
+  native_sysroot=$3
+  target_sysroot=$2
+  PSEUDO_COMMAND="$native_sysroot/usr/bin/pseudo"
+  PSEUDO_OPTS="-P $natvie_sysroot/usr"
   TAR_OPTS="-xjf"
-  PSEUDO_OPTS="-P $3/usr"
+  PSEUDO_OPTS="-P $native_sysroot/usr"
 
 
   rm -rf $PSEUDO_LOCALSTATEDIR
 
-  if [ -d "$2" ]; then
-    echo_info "[ADT_INST] Target sysroot location: $2, already exists! If you continue installation, this folder will be re-created."
+  if [ -d "$target_sysroot" ]; then
+    echo_info "[ADT_INST] Target sysroot location: $target_sysroot, already exists! If you continue installation, this folder will be re-created."
     confirm_install $4
-    rm -rf "$2"
+    rm -rf "$target_sysroot"
   fi
 
-  if [ ! -d "$2" ]; then
-    echo_info "[ADT_INST] Creating directory $2..."
-    mkdir -p "$2"
+  if [ ! -d "$target_sysroot" ]; then
+    echo_info "[ADT_INST] Creating directory $target_sysroot..."
+    mkdir -p "$target_sysroot"
   fi
 
-  mkdir -p "$PSEUDO_LOCALSTATEDIR"
-  touch "$PSEUDO_LOCALSTATEDIR/pseudo.pid"
+  mkdir -p "$target_sysroot/var/pseudo"
+  touch "$target_sysroot/var/pseudo/pseudo.pid"
+  PSEUDO_LOCALSTATEDIR="$target_sysroot/var/pseudo"
+  export PSEUDO_LOCALSTATEDIR
 
   $PSEUDO_COMMAND $PSEUDO_OPTS tar -C $2 "$TAR_OPTS" $LOCAL_DOWNLOAD/$1 &>> $YOCTOADT_INSTALL_LOG_FILE
   check_result
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal +5 -11
index b1560dd..eec6f5f 100755
@@ -133,7 +133,8 @@ fi
 echo_info "\n[ADT_INST] Successfully installed selected native ADT!"
 }
 
-#Need three input params, $1 -- arch_type(arm powerpc x86 mips) $2:$3 user:group info
+#Need three input params, $1 -- arch_type(arm powerpc x86 mips) #2 -- user installation type
+#customer or scilent
 
 install_target()
 {
@@ -161,13 +162,9 @@ if [ "$select_target" == "Y" ]; then
     sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
     echo_info "[ADT_INST] Extracting rootfs: $sysroot_image_name, using pseudo..."
 
-    sudo scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
-    # Fill $target_sysroot into /opt/poky/$YOCTOADT_VERION/environment-setup-(arch)-poky-linux-gnueabi
+    scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
     check_result
-    echo_info "[ADT_INST] change owner for rootfs directory $target_sysroot to $2:$3"
-    sudo chown -R $2:$3 $target_sysroot
-    check_result
- 
+
     echo_info "[ADT_INST] Updating environment script with target sysroot location."
     if [ "$1" == "x86"  ]; then
       env_filename=`ls $INSTALL_FOLDER/environment-setup-i586*`
@@ -197,11 +194,8 @@ parse_config
 user_inst_type=$1
 install_native_sdk $user_inst_type
 
-username=`id -nu`
-groupname=`id -ng`
-
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  install_target $arch_type $username $groupname $user_inst_type
+  install_target $arch_type
   check_result
 done
 
Signature · 1 line
1.7.0.4
#51 lore raw

PATCH 52/59 Clean messaging, prompt consolidation and bug fixes

In reply to Jessica Zhang
---
 .../installer/adt-installer/scripts/extract_rootfs |    2 +-
 .../installer/adt-installer/scripts/util           |   13 ++--
 .../adt-installer/scripts/yocto_installer_internal |   60 +++++++++++---------
 .../installer/adt-installer/yocto_installer        |   56 +++++++++++-------
 4 files changed, 76 insertions(+), 55 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs +1 -1
index 8567db7..976565d 100755
@@ -38,7 +38,7 @@ extract_rootfs()
   fi
 
   if [ ! -d "$target_sysroot" ]; then
-    echo_info "[ADT_INST] Creating directory $target_sysroot..."
+    echo_info "Creating directory $target_sysroot..."
     mkdir -p "$target_sysroot"
   fi
 
meta/recipes-devtools/installer/adt-installer/scripts/util +7 -6
index 7ccd87e..ecd7b20 100644
@@ -27,17 +27,18 @@ select_install_type()
 # If choosing silent install, all older installation data will be
 # overriden without user's interaction
 while true; do
-  echo_info "[ADT_INST] Silent install means overrides all existing older"
-  echo_info "[ADT_INST] data and the installation needs least user interaction"
-  echo_info "[ADT_INST] If you want to use silent installation, please enter S:"
-  echo_info "[ADT_INST] If you want to customize installation, please enter C:"
-  echo_info "[ADT_INST} If you want to exit current installation, please enter X:"
+  #echo_info "[ADT_INST] Silent install means overrides all existing older"
+  #echo_info "[ADT_INST] data and the installation needs least user interaction"
+  #echo_info "[ADT_INST] If you want to use silent installation, please enter S:"
+  #echo_info "[ADT_INST] If you want to customize installation, please enter C:"
+  #echo_info "[ADT_INST} If you want to exit current installation, please enter X:"
+  echo_info "[ADT_INST] There're two ways you can do installation: silent mode or interactive mode. To choose silent mode, which means you're opt the system to override the existing data under the specified installation directory structures if they exist without further prompt for your confirmation.  Please be cautious with this selection which may trigger your lose data that you may still need.  With the interactive mode, you have to closely monitor the installation process, since it will prompt you each step it need to override some existing data.  To choose silent mode, please enter [S], for interactive mode, please enter [I] or [X] to exit the installation."
   echo_info "[ADT_INST] Please enter your selections here:"
   read YOCTOADT_SEL
   YOCTOADT_SEL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_SEL"`
   if [ "$YOCTOADT_SEL" == "S" ]; then
     return "0"
-  elif [ "$YOCTOADT_SEL" == "C" ]; then
+  elif [ "$YOCTOADT_SEL" == "I" ]; then
     return "1"
   elif [ "$YOCTOADT_SEL" == "X" ]; then
     echo_info "\n############################################################"
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal +34 -26

140 lines not on this page · raw message

meta/recipes-devtools/installer/adt-installer/yocto_installer +34 -22

144 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#53 lore raw

PATCH 55/59 Remove old unused renamed files

In reply to Jessica Zhang
---
 .../adt-installer/scripts/yocto_installer_internal |  215 --------------------
 .../installer/adt-installer/yocto_installer.conf   |   43 ----
 2 files changed, 0 insertions(+), 258 deletions(-)
 delete mode 100755 meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal
 delete mode 100644 meta/recipes-devtools/installer/adt-installer/yocto_installer.conf
meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal deleted +0 -215
deleted file mode 100755
index 87e9e54..0000000
@@ -1,215 +0,0 @@
-#!/bin/bash
-
-# Yocto ADT Installer
-#
-# Copyright (C) 2010 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-
-
-parse_config()
-{
-  INST_ARCH=`uname -m`
-
-  case $INST_ARCH in 
-  i[3-6]86)
-    OPKG_CONFIG_FILE=$YOCTOADT_OPKG_CONF_FILE_32
-    POKY_NATIVE_SYSROOT="$INSTALL_FOLDER/sysroots/i586-pokysdk-linux/"
-    ;;
-  x86_64)
-    OPKG_CONFIG_FILE=$YOCTOADT_OPKG_CONF_FILE_64
-    POKY_NATIVE_SYSROOT="$INSTALL_FOLDER/sysroots/x86_64-pokysdk-linux/"
-    ;;
-  *)
-    echo_info "[ADT_INST] Error: Installation Machine is not supported!"
-    exit -1
-    ;;
-  esac
-}
-
-
-#let us install a qemu-native firstly
-#installation step 2
-install_native_sdk()
-{
-
-echo_info "\nStart installing selected native ADT for archs: $YOCTOADT_TARGETS..."
-
-# where the packages are installed. Currently only / is supported
-NATIVE_INSTALL_DIR="/"
-
-if [ -d "$INSTALL_FOLDER" ]; then
-  echo_info "[ADT_INST] Native ADT installation directory \"$INSTALL_FOLDER\" already exists! Continue installation will override its contents!"
-  confirm_install $1
-fi
-
-#Now begin to install native sdk and extract qemu rootfs which needs privilege rights
-echo_info "#######################################################################"
-echo_info "Please note from this point on installation requires sudo password ..."
-echo_info "#######################################################################"
-username='id -nu'
-#we need to make this directory firstly since opkg need to use it.
-OPKG_LOCK_DIR="$NATIVE_INSTALL_DIR/$OPKG_LIBDIR/opkg"
-if [ ! -d "$OPKG_LOCK_DIR" ]; then
-  #sudo mkdir -p $OPKG_LOCK_DIR
-  su -c "mkdir -p $OPKG_LOCK_DIR" $username
-  echo_info "Successfully create directory $OPKG_LOCK_DIR. "
-#if user delete /opt/poky, while dangling folders there, report error
-elif [ ! -d "$INSTALL_FOLDER" ]; then
-  echo_info "[ADT_INST] Dangling opkg cache folder $OPKG_LOCK_DIR detected. Continue installation will remove the folder!"
-  confirm_install $1
-  #sudo rm -rf $OPKG_LOCK_DIR
-  su -c "rm -rf $OPKG_LOCK_DIR" $username
-  #sudo mkdir -p $OPKG_LOCK_DIR
-  su -c "mkdir -p $OPKG_LOCK_DIR" $username
-#if user are updating installing, just let him/her go, give her/him prompt
-else
-  echo_info "ADT has already been installed. Will update its contents..."
-fi
-
-#first update repository
-OPKG_CMD="sudo $LOCAL_OPKG_LOC/bin/opkg-cl"
-
-echo_info "Updating opkg..."
-$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR update &>> $YOCTOADT_INSTALL_LOG_FILE
-echo_info "opkg update process ended..."
-check_result
-
-#install below must sdk-host packages
-OPKG_INSTALL_CMD="$OPKG_CMD --force-overwrite"
-OPKG_INSTALL_NATIVE_CMD="$OPKG_INSTALL_CMD  -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR install"
-
-echo_info "Installing pseudo nativesdk ...\n"
-$OPKG_INSTALL_NATIVE_CMD pseudo-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-check_result
-echo_info "Installing opkg nativesdk ...\n"
-$OPKG_INSTALL_NATIVE_CMD opkg-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-check_result
-echo_info "Installing pkgconfig nativesdk ...\n"
-$OPKG_INSTALL_NATIVE_CMD pkgconfig-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-check_result
-
-for native_target_type in $YOCTOADT_TARGETS; do
-  native_target_type=`echo "$native_target_type" | sed -e 's/x86_64/x86-64/' -e 's/x86$/i586/'`
-  echo_info "Installing cross toolchain for $native_target_type ..."
-  echo_info "Installing binutils for $native_target_type ..."
-  $OPKG_INSTALL_NATIVE_CMD binutils-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-  echo_info "Installing gcc for $native_target_type ..."
-  $OPKG_INSTALL_NATIVE_CMD gcc-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-  echo_info "Installing gdb for $native_target_type ..."
-  $OPKG_INSTALL_NATIVE_CMD gdb-cross-canadian-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  echo_info "Installing envrionement file for $native_target_type ..."
-  $OPKG_INSTALL_NATIVE_CMD meta-environment-$native_target_type &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-done
-
-# Link the ld.so.cache file into the hosts filesystem
-if [ ! -f "$POKY_NATIVE_SYSROOT/etc/ld.so.cache" ]; then 
-echo_info "Link the ld.so.cache file into the host filesystem"
-#sudo ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache
-su -c " ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache" $username
-check_result
-fi
-
-if [ "$YOCTOADT_QEMU" == "Y" ] || [ "$YOCTOADT_QEMU" = "y" ]; then
-  echo_info "\nInstalling qemu native ..."
-  $OPKG_INSTALL_NATIVE_CMD qemu-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-  $OPKG_INSTALL_NATIVE_CMD qemu-helper-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-fi
-
-if [ "$YOCTOADT_NFS_UTIL" == "Y" ] || [ "$YOCTOADT_NFS_UTIL" == "y" ]; then
-  echo_info "\nInstalling unfs ..."
-  $OPKG_INSTALL_NATIVE_CMD unfs-server-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
-  check_result
-fi
-
-echo_info "\nSuccessfully installed selected native ADT!"
-}
-
-#Need three input params, $1 -- arch_type(arm powerpc x86 mips) #2 -- user installation type
-#customer or scilent
-
-install_target()
-{
-
-select_target_var="\$YOCTOADT_TARGET_$1"
-select_target=`eval echo $select_target_var`
-
-if [ "$select_target" == "Y" ]; then
-
-  # rootfs extraction directory
-  target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_$1"
-  target_sysroot=`eval echo $target_sysroot_var`
-
-  target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-  target_sysroot_image=`eval echo $target_sysroot_image_var`
-  if [ "$target_sysroot" == "" ]; then
-     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_$1 selection is empty, failed to create target sysroot!"
-     return 1
-  elif [ "$target_sysroot_image" == "" ]; then
-     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$1 selection is empty, failed to create target sysroot!"
-     return 1
-  else
-    echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
-
-    sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
-    echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
-
-    scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
-    check_result
-
-    echo_info "Updating environment script with target sysroot location."
-    if [ "$1" == "x86"  ]; then
-      env_filename=`ls $INSTALL_FOLDER/environment-setup-i586*`
-    else
-      env_filename=`ls $INSTALL_FOLDER/environment-setup-$1*`
-    fi
-    if [ ! -z "$env_filename" ]; then
-      sudo sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_filename
-    else
-      echo_info "[ADT_INST] Error: Failed to find environment script for arch: $1"
-      return 1 
-    fi
-
-  fi
-fi
-
-}
-
-
-#Main part
-. scripts/data_define
-. scripts/util
-
-parse_config
-
-#secondly we will start to install native tools
-user_inst_type=$1
-install_native_sdk $user_inst_type
-
-for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  install_target $arch_type
-  check_result
-done
-
-
meta/recipes-devtools/installer/adt-installer/yocto_installer.conf deleted +0 -43

43 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#54 lore raw

PATCH 56/59 Remove unused rename file

In reply to Jessica Zhang
---
 .../installer/adt-installer/yocto_installer        |  349 --------------------
 1 files changed, 0 insertions(+), 349 deletions(-)
 delete mode 100755 meta/recipes-devtools/installer/adt-installer/yocto_installer
meta/recipes-devtools/installer/adt-installer/yocto_installer deleted +0 -349
deleted file mode 100755
index c5c4920..0000000
@@ -1,349 +0,0 @@
-#/bin/bash
-# Yocto ADT Installer
-#
-# Copyright (C) 2010 Intel Corp.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-
-
-usage ()
-{
-
-  INST_ARCH=`uname -m`
-  INST_OS=`uname -o| tr '[A-Z]' '[a-z]'`
-  INST_KR=`uname -r| tr '[A-Z]' '[a-z]'`
-
-  echo_info "#########################################################################"
-  echo_info "# Welcome to Yocto Application Developement Tools (ADT) Installer"
-  echo_info "# "
-  echo_info "# Host Machine:\t\t\t\t"$INST_ARCH
-  echo_info "# OS info:\t\t\t\t$INST_KR"  
-  echo_info "# Yocto ADT version to be installed:\t$YOCTOADT_VERSION"
-  echo_info "# supported target architectures:\t$YOCTOADT_SUPPORTED_TARGETS"
-  echo_info "# supported target root_fs images:\t$YOCTOADT_SUPPORTED_ROOTFS"
-  echo_info "#########################################################################\n"
-
-  echo_info "Systemwide installation. Installation will occur under $INSTALL_FOLDER\n"
-  echo_info "############################################################################"
-  echo_info "# Your system installation configurations from yocto_installer.conf"
-  echo_info "############################################################################"
-
-  echo_info "# Cross toolchains:\t\t$YOCTOADT_TARGETS"
-  echo_info "# Install Qemu:\t\t\t$YOCTOADT_QEMU"
-  echo_info "# Install NFS utilities:\t$YOCTOADT_NFS_UTIL"
-  #echo_info "# Install bitbake + UI:\t\t$YOCTOADT_BITBAKE"
-  #echo_info "# Install poky metadata:\t$YOCTOADT_METADATA"
-  #echo_info "############################################################################\n"
-
-    echo_info "\n##############################################################################"
-    echo_info "# Your rootfs image(s) and target sysroot selections from yocto_installer.conf"
-    echo_info "##############################################################################"
-prompt=1
-for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  download_images $arch_type $prompt
-done
-    echo_info "############################################################################\n"
-  select_install_type
-}
-
-validate_config()
-{
-
-  for selected_arch_type in $YOCTOADT_TARGETS; do
-    found=0
-    for supported_arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-      if [ "$selected_arch_type" == "$supported_arch_type" ]; then
-        found=1
-        break
-      fi
-    done
-    if [ $found == 0 ]; then
-       echo_info "[ADT_INST] Error: YOCTADT_TARGETS in yocto_installer.conf contains invalid entries: $YOCTOADT_TARGETS. Valid values are: $YOCTOADT_SUPPORTED_TARGETS"
-      return 1
-    fi
-  done
-
-  for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-
-    select_target_var="\$YOCTOADT_TARGET_$arch_type"
-    select_target=`eval echo $select_target_var`
-
-    if [ "$select_target" != "Y" ] || [ "$selected_target" != "y" ]; then
-      continue;
-    fi
-
-    target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type"
-    target_sysroot_image=`eval echo $target_sysroot_image_var`
-
-
-    select_rootfs_var="\$YOCTOADT_ROOTFS_$arch_type"
-    select_rootfs=`eval echo $select_rootfs_var`
-
-    for image_type in $select_rootfs; do
-#validate rootfs type defined in YOCTOADT_ROOTFS_{ARCH} is valid and in YOCTOADT_SUPPORTED_ROOTFS
-      found=0
-      for supported_rootfs_type in $YOCTOADT_SUPPORTED_ROOTFS; do
-        if [ "$image_type" == "$supported_rootfs_type" ]; then
-          found=1
-          break
-        fi
-      done
-      if [ $found == 0 ]; then
-#the rootfs type listed for downloading is not valid
-        echo_info "[ADT_INST] Error: Selected YOCTOADT_ROOTFS_$arch_type value: $image_type, is not valid! Valid values are: $YOCTOADT_SUPPORTED_ROOTFS "
-        return 1
-      fi
-    done
-
-    found=0
-    for image_type in $select_rootfs; do
-#validate that rootfs to be extracted must be in the item: YOCTOADT_ROOTFS_${ARCH}
-      if [ "$target_sysroot_image" == "$image_type" ]; then
-        found=1
-        break
-      fi
-    done
-# the rootfs image to be extracted is not selected
-    if [ $found == 0 ]; then
-      echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type selection: $target_sysroot_image is not included in YOCTOADT_ROOTFS_$arch_type selections: $select_rootfs"
-      return 1
-    fi
-  done
-
-  return 0
-}
-
-
-#detect opkg installed or not, for installing sdk, we will use
-#this installed local opkg
-install_opkg()
-{
-if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg-cl" ]; then
-  echo_info "OPKG is not setup, setting up opkg in local, which is required for installing yocto ADT...\n"
-
-  if [ -d $LOCAL_OPKG_LOC ]; then
-    echo_info "Deleting old OPKG folder, which doesn't contain executables... "
-    rm -rf $LOCAL_OPKG_LOC
-  fi
-
-  parent_folder=`eval echo $PWD`
-  cd $LOCAL_OPKG_FOLDER
-  check_result
-
-  opkg_source_dir=`ls -d opkg-*`
-
-  if [ $opkg_source_dir == "" ]; then
-    echo_info "[ADT_INST] Error: OPKG source directory is not found!"
-    exit -1
-  fi
-
-  cd $opkg_source_dir
-  check_result
-
-  echo_info "Configure opkg ...\n"
-  ./configure --prefix=$parent_folder/$LOCAL_OPKG_LOC --with-opkglibdir=$OPKG_LIBDIR --disable-curl --disable-ssl-curl --disable-gpg --disable-shave >> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  echo_info "Make opkg ...\n"
-  make &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  check_result
-
-  echo_info "Make Install opkg ...\n"
-  make install &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
-  #if meet error when installing opkg, cancel the installation
-  check_result
-
-  cd $parent_folder
-  echo_info "Successfully installed OPKG.\n"
-fi
-}
-
-confirm_download()
-{
-#avoid repeated reminding
-if [ "$override_oldfile" == 1 ]; then
-  return $pre_result
-else
-  override_oldfile=1
-fi
-
-while true; do
-  #echo_info "[ADT_INST] Files [$1] already exists. If you continue downloading, old files will be overrided."
-  #echo_info "[ADT_INST] Further prompts will not be given if there're more existing files to be downloaded."
-  #echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
-  echo_info "[ADT_INST] File [$1] already exists, which means you've downloaded the qemu kernel and rootfs file(s) for the architecture before.  If you continue downloading, old files will be overridden.  Do you want to continue downloading? Please enter Y/N:"
-  read YOCTOADT_INSTALL
-  YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
-  if [ "$YOCTOADT_INSTALL" == "Y" ]; then
-    pre_result=0
-    return 0
-  elif [ "$YOCTOADT_INSTALL" == "N" ]; then
-    pre_result=1
-    return 1
-  fi
-done
-}
-
-download_file()
-{
-if [ -f "$LOCAL_DOWNLOAD/$1" ]; then
-  confirm_download $1
-  result="$?"
-  if [ ! "$result" == "0" ]; then
-    return
-  else
-    echo "Removing old existing file [$1]"
-    rm -rf "$LOCAL_DOWNLOAD/$1" 
-  fi
-fi
-echo_info "Downloading file: $1..."
-wget "$YOCTOADT_ROOTFS_LOC/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
-}
-
-
-
-#Need two input params, $1 -- arch_type(arm powerpc x86 mips) $2 rootfs_image_type (a list of sdk sato minimal lsb)
-get_qemu_image()
-{
-  if [ "$1" == "x86" ]; then
-    qemu_kernel="bzImage-qemu$1.bin"
-  elif [ "$1" == "arm" ]; then
-    qemu_kernel="zImage-qemu$1.bin"
-  else
-    qemu_kernel="zImage-qemu$1.bin"
-  fi
-
-  #echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  download_file $qemu_kernel
-  check_result
-  
-  for image_type in $select_rootfs; do
-    #echo_info "[ADT_INST] Downloading rootfs file: poky-image-$image_type-qemu$1.tar.bz2"
-    filename="poky-image-$image_type-qemu$1.tar.bz2"
-    download_file $filename
-    check_result
-  done
-}
-
-download_images()
-{
-  select_target_var="\$YOCTOADT_TARGET_$1"
-  select_target=`eval echo $select_target_var`
-
-  if [ "$select_target" == "Y" ]; then
-    select_rootfs_var="\$YOCTOADT_ROOTFS_$1"
-    select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-    select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_$1"
-    select_rootfs=`eval echo $select_rootfs_var`
-    select_sysroot_image=`eval echo $select_sysroot_image_var`
-    select_sysroot=`eval echo $select_sysroot_var`
-
-    if [ $2 ]; then
-    #echo_info "\n############################################################################"
-    #echo_info "# To be downloaded rootfs image details defined in yocto_installer.conf"
-    #echo_info "############################################################################"
-    echo_info "# Target architecture:\t\t$1"
-    echo_info "# Root_fs images:\t\t$select_rootfs"
-    echo_info "# Target sysroot image:\t\t$select_sysroot_image"
-    echo_info "# Target sysroot dir:\t\t$select_sysroot"
-    echo_info "\n"
-    #echo_info "############################################################################\n"
-    else
-    get_qemu_image $1 $select_rootfs
-    fi
-  fi
-}
-
-
-
-
-#Main body of installer
-
-clear
-
-run_path=`dirname $0`
-cd $run_path
-
-if [ ! -f "scripts/util" ]; then
-  echo -e "[ADT_INST] Error: Script file: util, can't be found under: $run_path!"
-  echo -e "\n#############################################################################"
-  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-  echo -e "#############################################################################\n"
-  exit -1
-fi
-
-if [ ! -f "scripts/yocto_installer_internal" ]; then
-  echo -e "[ADT_INST] Error: Script file: yocto_installer_internal, can't be found under: $run_path!"
-  echo -e "\n#############################################################################"
-  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-  echo -e "#############################################################################\n"
-  exit -1
-fi
-
-config_file="yocto_installer.conf"
-if [ ! -f "$config_file" ]; then
-  echo_info "[ADT_INST] Error: Installation configuration file: yocto_installer.conf is not found!\n"
-  echo_info "\n##################################################################################"
-  echo_info "# Meet error(s) when installing Yocto ADT. Please check log file for details. "
-  echo_info "##################################################################################\n"
-  exit -1
-fi
-
-. scripts/data_define
-. scripts/util
-
-
-if [ -f "$YOCTOADT_INSTALL_LOG_FILE" ]; then
-  rm $YOCTOADT_INSTALL_LOG_FILE
-fi
-
-
-usage
-
-user_inst_type="$?"
-echo "$user_inst_type"
-
-validate_config
-check_result
-#firstly we need to install opkg host
-install_opkg
-
-#Create folders for holding rootfs/qemu images
-if [ ! -d "$LOCAL_DOWNLOAD" ]; then
-  echo_info "Creating new images downloading folder: $LOCAL_DOWNLOAD ..."
-  mkdir -p $LOCAL_DOWNLOAD
-fi
-
-#downloading required qemu images/rootfs
-if [ "$user_inst_type" == "0" ]; then
-  override_oldfile=1
-else
-  override_oldfile=0
-fi
-
-for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
-  download_images $arch_type
-done
-
-scripts/yocto_installer_internal $user_inst_type
-
-result="$?"
-#echo_info "\n############################################################"
-if [ "$result" == "0" ]; then
-  echo_info "\n############################################################"
-  echo_info "# Yocto ADT has been successfully installed."
-  echo_info "############################################################\n"
-fi
-
Signature · 1 line
1.7.0.4
#55 lore raw

PATCH 57/59 Fix several defects: sdk_version, relative path

In reply to Jessica Zhang

This patch fix several bugs, including opkg file chksum number changing problem, sdk_version automatically generating now, and we should cd to ${WORKDIR} before do_deploy

---
 .../installer/adt-installer/adt_installer.conf     |    1 -
 .../installer/adt-installer_1.0.bb                 |   29 ++++++++++---------
 2 files changed, 15 insertions(+), 15 deletions(-)
meta/recipes-devtools/installer/adt-installer/adt_installer.conf +0 -1
index 5dc9261..4b9213c 100644
@@ -1,7 +1,6 @@
 # Your yocto distro repository, this should include IPKG based packages and root filesystem files where the installation is based on
 
 YOCTOADT_IPKG_REPO="http://llu-piketon.sh.intel.com/rootfs"
-YOCTOADT_VERSION="0.9+snapshot"
 
 # The following are for system wide setup
 # Target architectures that you want to setup host cross dev environment for
meta/recipes-devtools/installer/adt-installer_1.0.bb +15 -14
index 975dfa9..d8d87b7 100644
@@ -12,36 +12,37 @@ PR = "r0"
 
 ADT_DEPLOY = "${TMPDIR}/deploy/sdk/"
 ADT_DIR = "${WORKDIR}/adt-installer/"
-
-S = "${WORKDIR}"
+YOCTOADT_VERSION = "${SDK_VERSION}"
 
 inherit deploy
 
 SRC_URI = "http://opkg.googlecode.com/files/opkg-0.1.8.tar.gz \
-           file://yocto_installer \
-           file://scripts/yocto_installer_internal \
+           file://adt_installer \
+           file://scripts/adt_installer_internal \
            file://scripts/util \
            file://scripts/data_define \
            file://scripts/extract_rootfs \
-           file://yocto_installer.conf \
+           file://adt_installer.conf \
            file://opkg/conf/opkg-sdk-x86_64.conf \
            file://opkg/conf/opkg-sdk-i586.conf \
 	  "
-SRC_URI[md5sum] = "5e888dd46a252cc22686b732fbe486b3"
-SRC_URI[sha256sum] = "ded8f16f55a641672fe1344842998def5f5163d7ebbd5d58ab15c54b04927660"
+SRC_URI[md5sum] = "c714ce0e4863bf1315e3b6913ffe3299"
+SRC_URI[sha256sum] = "ff94bf30bd662d49c4b5057e3a0818d062731adaa555d59abd677ec32a3c1c60"
 
 fakeroot do_deploy () {
+	cd ${WORKDIR}
 	mkdir -p ${ADT_DEPLOY}
 	rm -f ${ADT_DEPLOY}/adt-installer.tar.bz2
 	rm -rf ${ADT_DIR}
 	mkdir -p ${ADT_DIR}/opkg/build
-	cp -r ${WORKDIR}/opkg ${ADT_DIR}/
-	cp -r ${WORKDIR}/opkg-0.1.8 ${ADT_DIR}/opkg/build
-	cp -r ${WORKDIR}/scripts ${ADT_DIR}/
-	cp yocto_installer ${ADT_DIR}
-	cp yocto_installer.conf ${ADT_DIR}
-	tar cfj ${WORKDIR}/adt_installer.tar.bz2 adt-installer
-	cp adt_installer.tar.bz2 ${ADT_DEPLOY}
+	cp -r opkg ${ADT_DIR}/
+	cp -r opkg-0.1.8 ${ADT_DIR}/opkg/build/
+	cp -r scripts ${ADT_DIR}/
+	cp adt_installer ${ADT_DIR}
+	cp adt_installer.conf ${ADT_DIR}
+	echo 'YOCTOADT_VERSION=${SDK_VERSION}' >> ${ADT_DIR}/adt_installer.conf
+	tar cfj adt_installer.tar.bz2 adt-installer
+	cp ${WORKDIR}/adt_installer.tar.bz2 ${ADT_DEPLOY}
 }
 
 do_patch[noexec] = "1"
Signature · 1 line
1.7.0.4
#56 lore raw

PATCH 53/59 change file names, more clean up of messaging, add comments and simplify config file entries, change code support new config file

In reply to Jessica Zhang
---
 .../{yocto_installer => adt_installer}             |   86 +++++++++++--------
 .../installer/adt-installer/adt_installer.conf     |   30 +++++++
 ...o_installer_internal => adt_installer_internal} |   23 +++---
 .../installer/adt-installer/yocto_installer.conf   |   43 ----------
 4 files changed, 90 insertions(+), 92 deletions(-)
 rename meta/recipes-devtools/installer/adt-installer/{yocto_installer => adt_installer} (76%)
 create mode 100644 meta/recipes-devtools/installer/adt-installer/adt_installer.conf
 rename meta/recipes-devtools/installer/adt-installer/scripts/{yocto_installer_internal => adt_installer_internal} (88%)
 delete mode 100644 meta/recipes-devtools/installer/adt-installer/yocto_installer.conf
meta/recipes-devtools/installer/adt-installer/adt_installer renamed from meta/recipes-devtools/installer/adt-installer/yocto_installer +50 -36
similarity index 76%
rename from meta/recipes-devtools/installer/adt-installer/yocto_installer
rename to meta/recipes-devtools/installer/adt-installer/adt_installer
index c5c4920..9ccb9cb 100755
@@ -37,7 +37,7 @@ usage ()
 
   echo_info "Systemwide installation. Installation will occur under $INSTALL_FOLDER\n"
   echo_info "############################################################################"
-  echo_info "# Your system installation configurations from yocto_installer.conf"
+  echo_info "# Your system installation configurations from adt_installer.conf"
   echo_info "############################################################################"
 
   echo_info "# Cross toolchains:\t\t$YOCTOADT_TARGETS"
@@ -48,7 +48,7 @@ usage ()
   #echo_info "############################################################################\n"
 
     echo_info "\n##############################################################################"
-    echo_info "# Your rootfs image(s) and target sysroot selections from yocto_installer.conf"
+    echo_info "# Your rootfs image(s) and target sysroot selections from adt_installer.conf"
     echo_info "##############################################################################"
 prompt=1
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
@@ -70,19 +70,21 @@ validate_config()
       fi
     done
     if [ $found == 0 ]; then
-       echo_info "[ADT_INST] Error: YOCTADT_TARGETS in yocto_installer.conf contains invalid entries: $YOCTOADT_TARGETS. Valid values are: $YOCTOADT_SUPPORTED_TARGETS"
-      return 1
+       echo_info "[ADT_INST] Error: YOCTADT_TARGETS in adt_installer.conf contains invalid entries: $YOCTOADT_TARGETS. Valid values are: $YOCTOADT_SUPPORTED_TARGETS"
+       echo -e "\n#############################################################################"
+       echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+       echo -e "#############################################################################\n"
+      exit -1
     fi
   done
 
   for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
+    #select_target_var="\$YOCTOADT_TARGET_$arch_type"
+    #select_target=`eval echo $select_target_var`
 
-    select_target_var="\$YOCTOADT_TARGET_$arch_type"
-    select_target=`eval echo $select_target_var`
-
-    if [ "$select_target" != "Y" ] || [ "$selected_target" != "y" ]; then
-      continue;
-    fi
+    #if [ "$select_target" != "Y" ] || [ "$selected_target" != "y" ]; then
+    #  continue;
+    #fi
 
     target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type"
     target_sysroot_image=`eval echo $target_sysroot_image_var`
@@ -91,6 +93,10 @@ validate_config()
     select_rootfs_var="\$YOCTOADT_ROOTFS_$arch_type"
     select_rootfs=`eval echo $select_rootfs_var`
 
+    if [ "$select_rootfs" == "" ] && [ "$target_sysroot_image" == "" ]; then
+       continue;
+    fi
+
     for image_type in $select_rootfs; do
 #validate rootfs type defined in YOCTOADT_ROOTFS_{ARCH} is valid and in YOCTOADT_SUPPORTED_ROOTFS
       found=0
@@ -103,7 +109,10 @@ validate_config()
       if [ $found == 0 ]; then
 #the rootfs type listed for downloading is not valid
         echo_info "[ADT_INST] Error: Selected YOCTOADT_ROOTFS_$arch_type value: $image_type, is not valid! Valid values are: $YOCTOADT_SUPPORTED_ROOTFS "
-        return 1
+       echo -e "\n#############################################################################"
+       echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+       echo -e "#############################################################################\n"
+        exit -1
       fi
     done
 
@@ -118,11 +127,12 @@ validate_config()
 # the rootfs image to be extracted is not selected
     if [ $found == 0 ]; then
       echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type selection: $target_sysroot_image is not included in YOCTOADT_ROOTFS_$arch_type selections: $select_rootfs"
-      return 1
+      echo -e "\n#############################################################################"
+      echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+      echo -e "#############################################################################\n"
+      exit -1
     fi
   done
-
-  return 0
 }
 
 
@@ -146,6 +156,9 @@ if [ ! -x "$LOCAL_OPKG_LOC/bin/opkg-cl" ]; then
 
   if [ $opkg_source_dir == "" ]; then
     echo_info "[ADT_INST] Error: OPKG source directory is not found!"
+    echo -e "\n#############################################################################"
+    echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+    echo -e "#############################################################################\n"
     exit -1
   fi
 
@@ -183,7 +196,8 @@ while true; do
   #echo_info "[ADT_INST] Files [$1] already exists. If you continue downloading, old files will be overrided."
   #echo_info "[ADT_INST] Further prompts will not be given if there're more existing files to be downloaded."
   #echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
-  echo_info "[ADT_INST] File [$1] already exists, which means you've downloaded the qemu kernel and rootfs file(s) for the architecture before.  If you continue downloading, old files will be overridden.  Do you want to continue downloading? Please enter Y/N:"
+  echo_info "\nFile [$1] already exists, which means you've downloaded the qemu kernel and rootfs file(s) before.  If you choose continue downloading, old files will be overridden."
+  echo_info "[ADT_INST] Do you want to continue downloading? Please enter Y/N:"
   read YOCTOADT_INSTALL
   YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
   if [ "$YOCTOADT_INSTALL" == "Y" ]; then
@@ -204,12 +218,12 @@ if [ -f "$LOCAL_DOWNLOAD/$1" ]; then
   if [ ! "$result" == "0" ]; then
     return
   else
-    echo "Removing old existing file [$1]"
+    echo "Removing old file [$1]"
     rm -rf "$LOCAL_DOWNLOAD/$1" 
   fi
 fi
 echo_info "Downloading file: $1..."
-wget "$YOCTOADT_ROOTFS_LOC/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
+wget "$YOCTOADT_IPKG_REPO/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
 }
 
 
@@ -239,25 +253,26 @@ get_qemu_image()
 
 download_images()
 {
-  select_target_var="\$YOCTOADT_TARGET_$1"
-  select_target=`eval echo $select_target_var`
-
-  if [ "$select_target" == "Y" ]; then
-    select_rootfs_var="\$YOCTOADT_ROOTFS_$1"
-    select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-    select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_$1"
-    select_rootfs=`eval echo $select_rootfs_var`
-    select_sysroot_image=`eval echo $select_sysroot_image_var`
-    select_sysroot=`eval echo $select_sysroot_var`
-
+  #select_target_var="\$YOCTOADT_TARGET_$1"
+  #select_target=`eval echo $select_target_var`
+
+  #if [ "$select_target" == "Y" ]; then
+  select_rootfs_var="\$YOCTOADT_ROOTFS_$1"
+  select_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
+  select_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
+  select_rootfs=`eval echo $select_rootfs_var`
+  select_sysroot_image=`eval echo $select_sysroot_image_var`
+  select_sysroot=`eval echo $select_sysroot_var`
+
+  if [ "$select_rootfs" != "" ]; then
     if [ $2 ]; then
     #echo_info "\n############################################################################"
-    #echo_info "# To be downloaded rootfs image details defined in yocto_installer.conf"
+    #echo_info "# To be downloaded rootfs image details defined in adt_installer.conf"
     #echo_info "############################################################################"
     echo_info "# Target architecture:\t\t$1"
     echo_info "# Root_fs images:\t\t$select_rootfs"
     echo_info "# Target sysroot image:\t\t$select_sysroot_image"
-    echo_info "# Target sysroot dir:\t\t$select_sysroot"
+    echo_info "# Target sysroot loc:\t\t$select_sysroot"
     echo_info "\n"
     #echo_info "############################################################################\n"
     else
@@ -284,17 +299,17 @@ if [ ! -f "scripts/util" ]; then
   exit -1
 fi
 
-if [ ! -f "scripts/yocto_installer_internal" ]; then
-  echo -e "[ADT_INST] Error: Script file: yocto_installer_internal, can't be found under: $run_path!"
+if [ ! -f "scripts/adt_installer_internal" ]; then
+  echo -e "[ADT_INST] Error: Script file: adt_installer_internal, can't be found under: $run_path!"
   echo -e "\n#############################################################################"
   echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
   echo -e "#############################################################################\n"
   exit -1
 fi
 
-config_file="yocto_installer.conf"
+config_file="adt_installer.conf"
 if [ ! -f "$config_file" ]; then
-  echo_info "[ADT_INST] Error: Installation configuration file: yocto_installer.conf is not found!\n"
+  echo_info "[ADT_INST] Error: Installation configuration file: adt_installer.conf is not found!\n"
   echo_info "\n##################################################################################"
   echo_info "# Meet error(s) when installing Yocto ADT. Please check log file for details. "
   echo_info "##################################################################################\n"
@@ -313,7 +328,6 @@ fi
 usage
 
 user_inst_type="$?"
-echo "$user_inst_type"
 
 validate_config
 check_result
@@ -337,7 +351,7 @@ for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
   download_images $arch_type
 done
 
-scripts/yocto_installer_internal $user_inst_type
+scripts/adt_installer_internal $user_inst_type
 
 result="$?"
 #echo_info "\n############################################################"
meta/recipes-devtools/installer/adt-installer/adt_installer.conf new file +30 -0
new file mode 100644
index 0000000..5dc9261
@@ -0,0 +1,30 @@
+# Your yocto distro repository, this should include IPKG based packages and root filesystem files where the installation is based on
+
+YOCTOADT_IPKG_REPO="http://llu-piketon.sh.intel.com/rootfs"
+YOCTOADT_VERSION="0.9+snapshot"
+
+# The following are for system wide setup
+# Target architectures that you want to setup host cross dev environment for
+# valid values are: powerpc, mips, arm, x86, x86_64 with space separation between entries
+YOCTOADT_TARGETS="arm x86"
+# Whether install qemu or not, valid entries are: Y/N
+YOCTOADT_QEMU="Y"
+# Whether install user-mode nfs or not, valid entries are: Y/N.  If you want to use Yocto Eclipse plug-in as your dev IDE, you need to select both qemu and NFS
+YOCTOADT_NFS_UTIL="Y"
+
+# These 2 values will be supported in the furture installer
+#YOCTOADT_BITBAKE="Y"
+#YOCTOADT_METADATA="Y"
+
+#The followings are for setting up specific target architecture
+#YOCTOADT_ROOTFS_$arch is for specifying what root filesystem image files you want to download from the repository. The valid values to replace $arch are: arm, x86, x86_64, powerpc, mips.  The valid image files are: minimal, sato, sdk and lsb.  If you want to download multiple images, the entries are space separated
+YOCTOADT_ROOTFS_arm="minimal sato"
+#Specify which root filesystem file to use to extract as target sysroot.  Please ensure the entry is in the list of downloaded root filesystem files that specified above in YOCTOADT_ROOTFS_$arch
+YOCTOADT_TARGET_SYSROOT_IMAGE_arm="minimal"
+#The location where the target sysroot will be setup
+YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/arm"
+
+#Here's another example for setting up target arch of x86, but 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="sdk"
+#YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sdk"
+#YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/x86"
meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal renamed from meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal +10 -13
similarity index 88%
rename from meta/recipes-devtools/installer/adt-installer/scripts/yocto_installer_internal
rename to meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 87e9e54..e1b9e01 100755
@@ -52,7 +52,7 @@ echo_info "\nStart installing selected native ADT for archs: $YOCTOADT_TARGETS..
 NATIVE_INSTALL_DIR="/"
 
 if [ -d "$INSTALL_FOLDER" ]; then
-  echo_info "[ADT_INST] Native ADT installation directory \"$INSTALL_FOLDER\" already exists! Continue installation will override its contents!"
+  echo_info "\nNative ADT installation directory \"$INSTALL_FOLDER\" already exists! Continue installation will override its contents!"
   confirm_install $1
 fi
 
@@ -64,17 +64,14 @@ username='id -nu'
 #we need to make this directory firstly since opkg need to use it.
 OPKG_LOCK_DIR="$NATIVE_INSTALL_DIR/$OPKG_LIBDIR/opkg"
 if [ ! -d "$OPKG_LOCK_DIR" ]; then
-  #sudo mkdir -p $OPKG_LOCK_DIR
-  su -c "mkdir -p $OPKG_LOCK_DIR" $username
+  sudo mkdir -p $OPKG_LOCK_DIR
   echo_info "Successfully create directory $OPKG_LOCK_DIR. "
 #if user delete /opt/poky, while dangling folders there, report error
 elif [ ! -d "$INSTALL_FOLDER" ]; then
-  echo_info "[ADT_INST] Dangling opkg cache folder $OPKG_LOCK_DIR detected. Continue installation will remove the folder!"
+  echo_info "\nDangling opkg cache folder $OPKG_LOCK_DIR detected. Continue installation will remove the folder!"
   confirm_install $1
-  #sudo rm -rf $OPKG_LOCK_DIR
-  su -c "rm -rf $OPKG_LOCK_DIR" $username
-  #sudo mkdir -p $OPKG_LOCK_DIR
-  su -c "mkdir -p $OPKG_LOCK_DIR" $username
+  sudo rm -rf $OPKG_LOCK_DIR
+  sudo mkdir -p $OPKG_LOCK_DIR
 #if user are updating installing, just let him/her go, give her/him prompt
 else
   echo_info "ADT has already been installed. Will update its contents..."
@@ -124,8 +121,7 @@ done
 # Link the ld.so.cache file into the hosts filesystem
 if [ ! -f "$POKY_NATIVE_SYSROOT/etc/ld.so.cache" ]; then 
 echo_info "Link the ld.so.cache file into the host filesystem"
-#sudo ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache
-su -c " ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache" $username
+sudo ln -s /etc/ld.so.cache $POKY_NATIVE_SYSROOT/etc/ld.so.cache
 check_result
 fi
 
@@ -158,13 +154,13 @@ select_target=`eval echo $select_target_var`
 if [ "$select_target" == "Y" ]; then
 
   # rootfs extraction directory
-  target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_$1"
+  target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
   target_sysroot=`eval echo $target_sysroot_var`
 
   target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
   target_sysroot_image=`eval echo $target_sysroot_image_var`
   if [ "$target_sysroot" == "" ]; then
-     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_$1 selection is empty, failed to create target sysroot!"
+     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT__LOC_$1 selection is empty, failed to create target sysroot!"
      return 1
   elif [ "$target_sysroot_image" == "" ]; then
      echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$1 selection is empty, failed to create target sysroot!"
@@ -173,7 +169,7 @@ if [ "$select_target" == "Y" ]; then
     echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
 
     sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
-    echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
+    #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
 
     scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
     check_result
@@ -206,6 +202,7 @@ parse_config
 #secondly we will start to install native tools
 user_inst_type=$1
 install_native_sdk $user_inst_type
+check_result
 
 for arch_type in $YOCTOADT_SUPPORTED_TARGETS; do
   install_target $arch_type
meta/recipes-devtools/installer/adt-installer/yocto_installer.conf deleted +0 -43

43 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#57 lore raw

PATCH 54/59 missing files for change file names, more clean up of messaging, add comments and simplify config file entries, change code support new config file

In reply to Jessica Zhang
---
 .../installer/adt-installer/scripts/data_define    |    2 +-
 .../installer/adt-installer/scripts/extract_rootfs |    3 ++-
 .../installer/adt-installer/scripts/util           |   12 +++++++-----
 3 files changed, 10 insertions(+), 7 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/data_define +1 -1
index 0650383..f446811 100644
@@ -17,7 +17,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-config_file="yocto_installer.conf"
+config_file="adt_installer.conf"
 source $config_file
 
 LOCAL_OPKG_LOC="./opkg/build/opkg"
meta/recipes-devtools/installer/adt-installer/scripts/extract_rootfs +2 -1
index 976565d..0266283 100755
@@ -32,7 +32,7 @@ extract_rootfs()
   rm -rf $PSEUDO_LOCALSTATEDIR
 
   if [ -d "$target_sysroot" ]; then
-    echo_info "[ADT_INST] Target sysroot location: $target_sysroot, already exists! If you continue installation, this folder will be re-created."
+    echo_info "\nTarget sysroot location: $target_sysroot, already exists! If you continue installation, this folder will be re-created."
     confirm_install $4
     rm -rf "$target_sysroot"
   fi
@@ -47,6 +47,7 @@ extract_rootfs()
   PSEUDO_LOCALSTATEDIR="$target_sysroot/var/pseudo"
   export PSEUDO_LOCALSTATEDIR
 
+  echo_info "Extracting rootfs: $1, using pseudo..."
   $PSEUDO_COMMAND $PSEUDO_OPTS tar -C $2 "$TAR_OPTS" $LOCAL_DOWNLOAD/$1 &>> $YOCTOADT_INSTALL_LOG_FILE
   check_result
 }
meta/recipes-devtools/installer/adt-installer/scripts/util +7 -5
index ecd7b20..9db1242 100644
@@ -32,7 +32,7 @@ while true; do
   #echo_info "[ADT_INST] If you want to use silent installation, please enter S:"
   #echo_info "[ADT_INST] If you want to customize installation, please enter C:"
   #echo_info "[ADT_INST} If you want to exit current installation, please enter X:"
-  echo_info "[ADT_INST] There're two ways you can do installation: silent mode or interactive mode. To choose silent mode, which means you're opt the system to override the existing data under the specified installation directory structures if they exist without further prompt for your confirmation.  Please be cautious with this selection which may trigger your lose data that you may still need.  With the interactive mode, you have to closely monitor the installation process, since it will prompt you each step it need to override some existing data.  To choose silent mode, please enter [S], for interactive mode, please enter [I] or [X] to exit the installation."
+  echo_info "There're two ways you can do installation: silent mode or interactive mode. To choose silent mode, which means you opt for the system to override the existing data under the specified installation directories without prompting for your confirmation.  Please be cautious with this selection which may trigger your losing data.  With the interactive mode, you have to closely monitor the installation process, since it will prompt you each step it needs to override some existing data.  To choose silent mode, please enter [S], for interactive mode, please enter [I] or [X] to exit the installation."
   echo_info "[ADT_INST] Please enter your selections here:"
   read YOCTOADT_SEL
   YOCTOADT_SEL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_SEL"`
@@ -44,7 +44,7 @@ while true; do
     echo_info "\n############################################################"
     echo_info "# User cancelled installation!"
     echo_info "############################################################\n"
-    exit -1
+    exit 1
   fi
 done
 
@@ -72,7 +72,7 @@ while true; do
     echo_info "\n############################################################"
     echo_info "# User cancelled installation!"
     echo_info "############################################################\n"
-    exit -1
+    exit 1
   fi
 done
 }
@@ -80,16 +80,18 @@ done
 check_result()
 {
   result="$?"
-  if [ ! "$result" == "0" ]; then
+  if [  "$result" == "-1" ]; then
      echo_info "\n#############################################################################"
      echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
      echo_info "#############################################################################\n"
     exit -1
+  elif [ "$result" == "1" ]; then
+    exit -1
   fi
 }
 
 # yocto adt installation log file
-YOCTOADT_INSTALL_LOG_FILE="yocto_installer.log"
+YOCTOADT_INSTALL_LOG_FILE="adt_installer.log"
 # Temp folders holding qemu/rootfs downloaded images
 # It will be put into the installation folder
 LOCAL_DOWNLOAD="./download_image"
Signature · 1 line
1.7.0.4
#58 lore raw

PATCH 58/59 Adjust the code according to installation configuration file changes.

In reply to Jessica Zhang

Now no "Y" marks represent whether to install the target or not, the corresponding code needs to be changed too.

---
 .../adt-installer/scripts/adt_installer_internal   |   71 +++++++++-----------
 1 files changed, 33 insertions(+), 38 deletions(-)
meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal +33 -38
index e1b9e01..13e89e6 100755
@@ -148,47 +148,42 @@ echo_info "\nSuccessfully installed selected native ADT!"
 install_target()
 {
 
-select_target_var="\$YOCTOADT_TARGET_$1"
-select_target=`eval echo $select_target_var`
-
-if [ "$select_target" == "Y" ]; then
-
-  # rootfs extraction directory
-  target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
-  target_sysroot=`eval echo $target_sysroot_var`
-
-  target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
-  target_sysroot_image=`eval echo $target_sysroot_image_var`
-  if [ "$target_sysroot" == "" ]; then
-     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT__LOC_$1 selection is empty, failed to create target sysroot!"
-     return 1
-  elif [ "$target_sysroot_image" == "" ]; then
-     echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$1 selection is empty, failed to create target sysroot!"
-     return 1
-  else
-    echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
-
-    sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
+# rootfs extraction directory
+target_sysroot_var="\$YOCTOADT_TARGET_SYSROOT_LOC_$1"
+target_sysroot=`eval echo $target_sysroot_var`
+
+if [ "$target_sysroot" == "" ]; then
+  return 0
+fi
+
+target_sysroot_image_var="\$YOCTOADT_TARGET_SYSROOT_IMAGE_$1"
+target_sysroot_image=`eval echo $target_sysroot_image_var`
+if [ "$target_sysroot_image" == "" ]; then
+  echo_info "[ADT_INST] Error: YOCTOADT_TARGET_SYSROOT_IMAGE_$1 selection is empty, failed to create target sysroot!"
+  return 1
+fi
+
+echo_info "Installing target sysroot for arch: $1, rootfs type: $target_sysroot_image, location: $target_sysroot"
+
+sysroot_image_name="poky-image-$target_sysroot_image-qemu$1.tar.bz2"
     #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
 
-    scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
-    check_result
-
-    echo_info "Updating environment script with target sysroot location."
-    if [ "$1" == "x86"  ]; then
-      env_filename=`ls $INSTALL_FOLDER/environment-setup-i586*`
-    else
-      env_filename=`ls $INSTALL_FOLDER/environment-setup-$1*`
-    fi
-    if [ ! -z "$env_filename" ]; then
-      sudo sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_filename
-    else
-      echo_info "[ADT_INST] Error: Failed to find environment script for arch: $1"
-      return 1 
-    fi
-
-  fi
+scripts/extract_rootfs $sysroot_image_name $target_sysroot $POKY_NATIVE_SYSROOT $user_inst_type
+check_result
+
+echo_info "Updating environment script with target sysroot location."
+if [ "$1" == "x86"  ]; then
+  env_filename=`ls $INSTALL_FOLDER/environment-setup-i586*`
+else
+  env_filename=`ls $INSTALL_FOLDER/environment-setup-$1*`
 fi
+if [ ! -z "$env_filename" ]; then
+  sudo sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_filename
+else
+  echo_info "[ADT_INST] Error: Failed to find environment script for arch: $1"
+  return 1 
+fi
+
 
 }
 
Signature · 1 line
1.7.0.4
#59 lore raw

PATCH 59/59 Move version info to the beginning of conf file and fix a minor typo in adt_installer.conf

In reply to Jessica Zhang
---
 .../installer/adt-installer/adt_installer.conf     |    2 +-
 .../installer/adt-installer_1.0.bb                 |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/installer/adt-installer/adt_installer.conf +1 -1
index 4b9213c..b65fe5d 100644
@@ -23,7 +23,7 @@ YOCTOADT_TARGET_SYSROOT_IMAGE_arm="minimal"
 #The location where the target sysroot will be setup
 YOCTOADT_TARGET_SYSROOT_LOC_arm="$HOME/test-yocto/arm"
 
-#Here's another example for setting up target arch of x86, but 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
+#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="sdk"
 #YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sdk"
 #YOCTOADT_TARGET_SYSROOT_LOC_x86="$HOME/test-yocto/x86"
meta/recipes-devtools/installer/adt-installer_1.0.bb +3 -1
index d8d87b7..23eb4ec 100644
@@ -40,7 +40,9 @@ fakeroot do_deploy () {
 	cp -r scripts ${ADT_DIR}/
 	cp adt_installer ${ADT_DIR}
 	cp adt_installer.conf ${ADT_DIR}
-	echo 'YOCTOADT_VERSION=${SDK_VERSION}' >> ${ADT_DIR}/adt_installer.conf
+	echo 'YOCTOADT_VERSION=${SDK_VERSION}' > ${ADT_DIR}/temp.conf
+        cat ${ADT_DIR}/adt_installer.conf >> ${ADT_DIR}/temp.conf
+        mv ${ADT_DIR}/temp.conf ${ADT_DIR}/adt_installer.conf
 	tar cfj adt_installer.tar.bz2 adt-installer
 	cp ${WORKDIR}/adt_installer.tar.bz2 ${ADT_DEPLOY}
 }
Signature · 1 line
1.7.0.4
#60 lore raw
In reply to Jessica Zhang

Hi, Jessica,

Since this is for the 1st checkin of a new feature, it's better to clean it up into a single patch, or a series of patches which are split based on functionality. Current series are more like a working branch, and difficult for people to understand those commits. :-)

Thanks
Kevin

Quoted 100 lines

From: Jessica Zhang
Sent: Tuesday, January 04, 2011 8:04 AM

This is the consolidated pull request that contains all the changes for adt_installer work, including the bitbake recipe file for creating the installer tar file under /tmp/deploy/sdk, after untar, run the adt-installer to install adt cross-toolchain and target sysroots.

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: jzhang/adt-installer
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jzhang/adt-installer

Thanks,
Jessica Zhang <[email protected]>
---

Jessica Zhang (9):
Correct messages, fix bug for parsing YOCTOADT_TARGET_ARCH variable
correctly
more messages cleanup, fix issues: 1) download all the specified
rootfs fiels, 2) add check for yocto_installer_internal, 3) error out when sysroot image file or sysroot location are empty
Clean messaging, prompt consolidation and bug fixes Correct messages, fix bug for parsing YOCTOADT_TARGET_ARCH variable
correctly
more messages cleanup, fix issues: 1) download all the specified
rootfs fiels, 2) add check for yocto_installer_internal, 3) error out when sysroot image file or sysroot location are empty
Clean messaging, prompt consolidation and bug fixes change file names, more clean up of messaging, add comments and
simplify config file entries, change code support new config file
missing files for change file names, more clean up of messaging, add
comments and simplify config file entries, change code support new config file
Move version info to the beginning of conf file and fix a minor typo
in adt_installer.conf

Liping Ke (50):
Add initial yocto adt installer script
New version of installer script
Redirect downloading information to both screen and log file Change sdk version in configuration file to 0.9+snapshot Change qemu kernel downloading output info to be noverbose Make bar viewing for showing download progress instead of dot view Update user configuration file for testing
If qemu file already exists, user can choose download new or keep the
old
Modify folders per Josh's suggestion
sudo is controlled in smaller granularity.
Add opkg source tarball for testing.
Add split include script file
Remove the param passing for readability
Remove redundant prompts
Move installer scripts to the decided folders
Add new folder under installer for conforming bb file path
conventions
Add installer scripts tarball generating bb file
Add just installer scripts code according to bb file logic Make Silent installation as another option for avoiding bothering
users.
Removde Debug options from installer script
Remove unneccessary folder creation in do_deploy
Store pseudo database in target rootfs
Link ld.so.cache file into the host filesystem
Add initial yocto adt installer script
New version of installer script
Redirect downloading information to both screen and log file Change sdk version in configuration file to 0.9+snapshot Change qemu kernel downloading output info to be noverbose Make bar viewing for showing download progress instead of dot view Update user configuration file for testing
If qemu file already exists, user can choose download new or keep the
old
Modify folders per Josh's suggestion
sudo is controlled in smaller granularity.
Add opkg source tarball for testing.
Add split include script file
Remove the param passing for readability
Remove redundant prompts
Move installer scripts to the decided folders
Add new folder under installer for conforming bb file path
conventions
Add installer scripts tarball generating bb file
Add just installer scripts code according to bb file logic Make Silent installation as another option for avoiding bothering
users.
Removde Debug options from installer script
Remove unneccessary folder creation in do_deploy
Store pseudo database in target rootfs
Link ld.so.cache file into the host filesystem
Remove old unused renamed files
Remove unused rename file
Fix several defects: sdk_version, relative path
Adjust the code according to installation configuration file changes.

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky