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 1 of 3

lore
Share & tools
lore
#0 lore raw

cover Consolidate adt-installer pull request

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.

#1 lore raw

PATCH 1/59 Add initial yocto adt installer script

Below patches are for installing Yocto Application Development Tools. opkg files include both 32 bit and 64 bit installation machine. Installer entry script file is yocto_installer. A hidden .config files are for holding parameters which are unlikely to be changed by end users

---
 scripts/adt-installer/.config                  |   35 ++++
 scripts/adt-installer/opkg-sdk-i586.conf       |   17 ++
 scripts/adt-installer/opkg-sdk-x86_64.conf     |   17 ++
 scripts/adt-installer/util                     |   70 +++++++
 scripts/adt-installer/yocto_installer          |  250 ++++++++++++++++++++++++
 scripts/adt-installer/yocto_installer.conf     |   32 +++
 scripts/adt-installer/yocto_installer_internal |  222 +++++++++++++++++++++
 7 files changed, 643 insertions(+), 0 deletions(-)
 create mode 100644 scripts/adt-installer/.config
 create mode 100644 scripts/adt-installer/opkg-sdk-i586.conf
 create mode 100644 scripts/adt-installer/opkg-sdk-x86_64.conf
 create mode 100644 scripts/adt-installer/util
 create mode 100755 scripts/adt-installer/yocto_installer
 create mode 100644 scripts/adt-installer/yocto_installer.conf
 create mode 100755 scripts/adt-installer/yocto_installer_internal
scripts/adt-installer/.config new file +35 -0
new file mode 100644
index 0000000..8c997c3
@@ -0,0 +1,35 @@
+# General yocto adt installation configuration,
+# normal user needn't change this section
+
+YOCTOADT_VERION="1.0"
+
+# 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-sdk-i586.conf"
+YOCTOADT_OPKG_CONF_FILE_64="opkg-sdk-x86_64.conf"
+
+# yocto adt installation log file
+YOCTOADT_INSTALL_LOG_FILE="yoctoadt_installer.log"
+
+# Target ROOTFS Download site Configuration, normally it will be
+# in the same repository with those ipks.
+YOCTOADT_ROOTFS_LOC="http://llu-piketon.sh.intel.com/rootfs"
+
+# Temp folders holding qemu/rootfs downloaded images
+# It will be put into the installation folder
+LOCAL_DOWNLOAD="./download_image"
+
+# following are for testing in my machine. it will be moved when
+# going into code repository
+export http_proxy=""
+export HTTP_PROXY=""
+export HTTPS_PROXY=""
+export https_proxy=""
+export ftp_proxy=""
+export FTP_PROXY=""
scripts/adt-installer/opkg-sdk-i586.conf new file +17 -0
new file mode 100644
index 0000000..b1d82fe
@@ -0,0 +1,17 @@
+arch all 1
+arch any 6
+arch noarch 11
+arch i586-nativesdk 16
+arch i586-i586-canadian 21
+arch i586-arm-canadian 26
+arch i586-powerpc-canadian 31
+arch i586-mips-canadian 36
+arch i586-x86_64-canadian 41
+src oe http://llu-piketon.sh.intel.com/ipk_sdk
+src oe-all http://llu-piketon.sh.intel.com/ipk_sdk/all
+src oe-i586-nativesdk http://llu-piketon.sh.intel.com/ipk_sdk/i586-nativesdk
+src oe-i586-i586-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-i586-canadian
+src oe-i586-arm-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-arm-canadian
+src oe-i586-powerpc-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-powerpc-canadian
+src oe-i586-mips-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-mips-canadian
+src oe-i586-x86_64-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-x86_64-canadian
scripts/adt-installer/opkg-sdk-x86_64.conf new file +17 -0
new file mode 100644
index 0000000..4e36c8a
@@ -0,0 +1,17 @@
+arch all 1
+arch any 6
+arch noarch 11
+arch x86_64-nativesdk 16
+arch x86_64-i586-canadian 21
+arch x86_64-arm-canadian 26
+arch x86_64-powerpc-canadian 31
+arch x86_64-mips-canadian 36
+arch x86_64-x86_64-canadian 41
+src oe http://llu-piketon.sh.intel.com/ipk_sdk
+src oe-all http://llu-piketon.sh.intel.com/ipk_sdk/all
+src oe-x86_64-nativesdk http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-nativesdk
+src oe-x86_64-i586-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-i586-canadian
+src oe-x86_64-arm-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-arm-canadian
+src oe-x86_64-powerpc-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-powerpc-canadian
+src oe-x86_64-mips-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-mips-canadian
+src oe-x86_64-x86_64-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-x86_64-canadian
scripts/adt-installer/util new file +70 -0

70 lines not on this page · raw message

scripts/adt-installer/yocto_installer new file +250 -0

250 lines not on this page · raw message

scripts/adt-installer/yocto_installer.conf new file +32 -0
new file mode 100644
index 0000000..162ae3a
@@ -0,0 +1,32 @@
+#Host Area
+YOCTOADT_TARGETS="powerpc mips arm x86 x86_64"
+YOCTOADT_QEMU="Y"
+YOCTOADT_NFS_UTIL="Y"
+YOCTOADT_BITBAKE="Y"
+YOCTOADT_METADATA="Y"
+
+#Target Area
+YOCTOADT_TARGET_arm="N"
+YOCTOADT_ROOTFS_arm="sato sdk"
+YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sato"
+YOCTOADT_TARGET_SYSROOT_arm="$HOME/test-yocto/arm"
+
+YOCTOADT_TARGET_x86="Y"
+YOCTOADT_ROOTFS_x86="sdk minimal"
+YOCTOADT_TARGET_SYSROOT_IMAGE_x86="sdk"
+YOCTOADT_TARGET_SYSROOT_x86="$HOME/test-yocto/x86"
+
+YOCTOADT_TARGET_powerpc="N"
+YOCTOADT_ROOTFS_powerpc="sdk sato minimal"
+YOCTOADT_TARGET_SYSROOT_IMAGE_powerpc="minimal"
+YOCTOADT_TARGET_SYSROOT_powerpc="$HOME/test-yocto/mips"
+
+YOCTOADT_TARGET_mips="N"
+YOCTOADT_ROOTFS_mips="sdk"
+YOCTOADT_TARGET_SYSROOT_IMAGE_mips="sdk"
+YOCTOADT_TARGET_SYSROOT_mips="$HOME/test-yocto/mips"
+
+
+
+
+
scripts/adt-installer/yocto_installer_internal new file +222 -0

222 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 3/59 Correct messages, fix bug for parsing YOCTOADT_TARGET_ARCH variable correctly

In reply to Jessica Zhang
---
 scripts/adt-installer/util                     |   10 ++++++----
 scripts/adt-installer/yocto_installer          |   20 +++++++++-----------
 scripts/adt-installer/yocto_installer_internal |    6 +++---
 3 files changed, 18 insertions(+), 18 deletions(-)
scripts/adt-installer/util +6 -4
index 9176625..92261a8 100644
@@ -28,7 +28,7 @@ confirm_install()
 # some prompts
 
 while true; do
-  echo_info "[ADT_INST] Do you want to go on installing? Please enter Y/N:"
+  echo_info "[ADT_INST] Do you want to continue installation? Please enter Y/N:"
   read YOCTOADT_INSTALL
   YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
   if [ "$YOCTOADT_INSTALL" == "Y" ]; then
@@ -62,7 +62,9 @@ check_result()
 {
   result="$?"
   if [ ! "$result" == "0" ]; then
-    echo_info "Error: Terminate installation process due to errors!"
+     echo_info "\n############################################################"
+     echo_info "# Meet error(s) when installing Yocto ADT. "
+     echo_info "############################################################\n"
     exit -1
   fi
 }
@@ -71,7 +73,7 @@ config_file="yocto_installer.conf"
 if [ ! -f "$config_file" ]; then
   echo_info "[ADT_INST] user installation configuration file is not found!\n"
   echo_info "\n############################################################"
-  echo_info "# Meet error when installing Yocto ADT. "
+  echo_info "# Meet error(s) when installing Yocto ADT. "
   echo_info "############################################################\n"
   exit -1
 fi
@@ -90,7 +92,7 @@ YOCTOADT_SUPPORTED_TARGETS="x86 x86_64 arm powerpc mips"
 YOCTOADT_OPKG_CONF_FILE_32="opkg-sdk-i586.conf"
 YOCTOADT_OPKG_CONF_FILE_64="opkg-sdk-x86_64.conf"
 # yocto adt installation log file
-YOCTOADT_INSTALL_LOG_FILE="yoctoadt_installer.log"
+YOCTOADT_INSTALL_LOG_FILE="yocto_installer.log"
 # Temp folders holding qemu/rootfs downloaded images
 # It will be put into the installation folder
 LOCAL_DOWNLOAD="./download_image"
scripts/adt-installer/yocto_installer +9 -11
index 4f792b8..7bfc988 100755
@@ -62,8 +62,7 @@ validate_config()
       fi
     done
     if [ $found == 0 ]; then
-      echo_info "[ADT_INST] Error: selected archs defined in Host Area Item: YOCTOADT_TARGETS is not valid!"
-      echo_info "[ADT_INST] support ARCHS includes [ $YOCTOADT_SUPPORTED_TARGETS ]"
+       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
@@ -73,7 +72,7 @@ validate_config()
     select_target_var="\$YOCTOADT_TARGET_$arch_type"
     select_target=`eval echo $select_target_var`
 
-    if [ "$select_target" == "" ]; then
+    if [ "$select_target" != "Y" ] || [ "$selected_target" != "y" ]; then
       continue;
     fi
 
@@ -95,8 +94,7 @@ validate_config()
       done
       if [ $found == 0 ]; then
 #the rootfs type listed for downloading is not valid
-        echo_info "[ADT_INST] Error: Selected rootfs type: $image_type defined in Item: YOCTOADT_ROOTFS_$arch_type is not valid!"
-        echo_info "[ADT_INST] supported ROOTFS includes [ $YOCTOADT_SUPPORTED_ROOTFS ]"
+        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
@@ -111,7 +109,7 @@ validate_config()
     done
 # the rootfs image to be extracted is not selected
     if [ $found == 0 ]; then
-      echo_info "[ADT_INST] Error: ROOTFS image YOCTOADT_TARGET_SYSROOT_IMAGE_$arch_type to be extracted is not selected in item: YOCTOADT_ROOTFS_$arch_type"
+      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
@@ -161,7 +159,6 @@ fi
 #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()
 {
-  echo_info "[ADT_INST] Downloading selected qemu binary for ARCH_$1 ..."
   if [ "$1" == "x86" ]; then
     qemu_kernel="$YOCTOADT_ROOTFS_LOC/bzImage-qemu$1.bin"
   elif [ "$1" == "arm" ]; then
@@ -170,11 +167,12 @@ get_qemu_image()
     qemu_kernel="$YOCTOADT_ROOTFS_LOC/zImage-qemu$1.bin"
   fi
 
+  echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
   wget $qemu_kernel -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
   check_result
   
   for image_type in $2; do
-    echo_info "[ADT_INST] Downloading selected rootfs for ARCH_$1, rootfs_$2"
+    echo_info "[ADT_INST] Downloading rootfs file: poky-image-$2-qemu$1.tar.bz2"
     wget "$YOCTOADT_ROOTFS_LOC/poky-image-$2-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
     check_result
   done
@@ -220,9 +218,9 @@ run_path=`dirname $0`
 cd $run_path
 
 if [ ! -f "util" ]; then
-  echo -e "[ADT_INST] Error: script file $script_file is not found!\n"
+  echo -e "[ADT_INST] Error: Script file $script_file can't be found under $run_path!\n"
   echo -e "\n############################################################"
-  echo -e "# Meet error when installing Yocto ADT. "
+  echo -e "# Meet error(s) when installing Yocto ADT. "
   echo -e "############################################################\n"
   exit -1
 fi
@@ -265,7 +263,7 @@ echo_info "\n############################################################"
 if [ "$result" == "0" ]; then
   echo_info "# Yocto ADT has been successfully installed."
 else
-  echo_info "# Meet error during installing Yocto ADT. "
+  echo_info "# Meet error(s) during installing Yocto ADT. "
 
 fi
 echo_info "############################################################\n"
scripts/adt-installer/yocto_installer_internal +3 -3
index 61d59e1..63e3992 100755
@@ -83,13 +83,13 @@ check_result
 OPKG_INSTALL_CMD="./opkg/bin/opkg-cl --force-overwrite"
 OPKG_INSTALL_NATIVE_CMD="$OPKG_INSTALL_CMD  -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR install"
 
-echo_info "[ADT_INST] Install pseudo nativesdk ...\n"
+echo_info "[ADT_INST] Installing pseudo nativesdk ...\n"
 $OPKG_INSTALL_NATIVE_CMD pseudo-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
 check_result
-echo_info "[ADT_INST] Install opkg nativesdk ...\n"
+echo_info "[ADT_INST] Installing opkg nativesdk ...\n"
 $OPKG_INSTALL_NATIVE_CMD opkg-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
 check_result
-echo_info "[ADT_INST] Install pkgconfig nativesdk ...\n"
+echo_info "[ADT_INST] Installing pkgconfig nativesdk ...\n"
 $OPKG_INSTALL_NATIVE_CMD pkgconfig-nativesdk &>> $YOCTOADT_INSTALL_LOG_FILE
 check_result
 
Signature · 1 line
1.7.0.4
#3 lore raw

PATCH 4/59 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

In reply to Jessica Zhang
---
 scripts/adt-installer/util                     |   16 +++---
 scripts/adt-installer/yocto_installer          |   75 ++++++++++++++----------
 scripts/adt-installer/yocto_installer_internal |   59 ++++++++++--------
 3 files changed, 84 insertions(+), 66 deletions(-)
scripts/adt-installer/util +8 -8
index 92261a8..b041a08 100644
@@ -35,7 +35,7 @@ while true; do
     break
   elif [ "$YOCTOADT_INSTALL" == "N" ]; then
     echo_info "\n############################################################"
-    echo_info "# User Cancelled installation!"
+    echo_info "# User cancelled installation!"
     echo_info "############################################################\n"
     exit -1
   fi
@@ -62,19 +62,19 @@ check_result()
 {
   result="$?"
   if [ ! "$result" == "0" ]; then
-     echo_info "\n############################################################"
-     echo_info "# Meet error(s) when installing Yocto ADT. "
-     echo_info "############################################################\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
 }
 
 config_file="yocto_installer.conf"
 if [ ! -f "$config_file" ]; then
-  echo_info "[ADT_INST] user installation configuration file is not found!\n"
-  echo_info "\n############################################################"
-  echo_info "# Meet error(s) when installing Yocto ADT. "
-  echo_info "############################################################\n"
+  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/adt-installer/yocto_installer +43 -32

145 lines not on this page · raw message

scripts/adt-installer/yocto_installer_internal +33 -26

132 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#4 lore raw

PATCH 2/59 New version of installer script

In reply to Jessica Zhang
---
 scripts/adt-installer/.config                  |   35 ---------------
 scripts/adt-installer/opkg-0.1.8.tar.gz        |  Bin 0 -> 437009 bytes
 scripts/adt-installer/opkg-sdk-i586.conf       |   16 +------
 scripts/adt-installer/opkg-sdk-x86_64.conf     |   16 +------
 scripts/adt-installer/util                     |   30 +++++++++++++
 scripts/adt-installer/yocto_installer          |   54 ++++++++++++++++-------
 scripts/adt-installer/yocto_installer.conf     |   11 +++-
 scripts/adt-installer/yocto_installer_internal |   56 ++++++++++++-----------
 8 files changed, 111 insertions(+), 107 deletions(-)
 delete mode 100644 scripts/adt-installer/.config
 create mode 100644 scripts/adt-installer/opkg-0.1.8.tar.gz
scripts/adt-installer/.config deleted +0 -35
deleted file mode 100644
index 8c997c3..0000000
@@ -1,35 +0,0 @@
-# General yocto adt installation configuration,
-# normal user needn't change this section
-
-YOCTOADT_VERION="1.0"
-
-# 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-sdk-i586.conf"
-YOCTOADT_OPKG_CONF_FILE_64="opkg-sdk-x86_64.conf"
-
-# yocto adt installation log file
-YOCTOADT_INSTALL_LOG_FILE="yoctoadt_installer.log"
-
-# Target ROOTFS Download site Configuration, normally it will be
-# in the same repository with those ipks.
-YOCTOADT_ROOTFS_LOC="http://llu-piketon.sh.intel.com/rootfs"
-
-# Temp folders holding qemu/rootfs downloaded images
-# It will be put into the installation folder
-LOCAL_DOWNLOAD="./download_image"
-
-# following are for testing in my machine. it will be moved when
-# going into code repository
-export http_proxy=""
-export HTTP_PROXY=""
-export HTTPS_PROXY=""
-export https_proxy=""
-export ftp_proxy=""
-export FTP_PROXY=""
scripts/adt-installer/opkg-0.1.8.tar.gz new file binary +0 -0
new file mode 100644
index 0000000000000000000000000000000000000000..eb16094bd564ac07a78ff00de86174036f241372
GIT binary patch
scripts/adt-installer/opkg-sdk-i586.conf +3 -13
index b1d82fe..21ab4d2 100644
@@ -2,16 +2,6 @@ arch all 1
 arch any 6
 arch noarch 11
 arch i586-nativesdk 16
-arch i586-i586-canadian 21
-arch i586-arm-canadian 26
-arch i586-powerpc-canadian 31
-arch i586-mips-canadian 36
-arch i586-x86_64-canadian 41
-src oe http://llu-piketon.sh.intel.com/ipk_sdk
-src oe-all http://llu-piketon.sh.intel.com/ipk_sdk/all
-src oe-i586-nativesdk http://llu-piketon.sh.intel.com/ipk_sdk/i586-nativesdk
-src oe-i586-i586-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-i586-canadian
-src oe-i586-arm-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-arm-canadian
-src oe-i586-powerpc-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-powerpc-canadian
-src oe-i586-mips-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-mips-canadian
-src oe-i586-x86_64-canadian http://llu-piketon.sh.intel.com/ipk_sdk/i586-x86_64-canadian
+src oe http://llu-piketon.sh.intel.com/ipk_sdknew
+src oe-all http://llu-piketon.sh.intel.com/ipk_sdknew/all
+src oe-i586-nativesdk http://llu-piketon.sh.intel.com/ipk_sdknew/i586-nativesdk
scripts/adt-installer/opkg-sdk-x86_64.conf +3 -13
index 4e36c8a..a6eee7d 100644
@@ -2,16 +2,6 @@ arch all 1
 arch any 6
 arch noarch 11
 arch x86_64-nativesdk 16
-arch x86_64-i586-canadian 21
-arch x86_64-arm-canadian 26
-arch x86_64-powerpc-canadian 31
-arch x86_64-mips-canadian 36
-arch x86_64-x86_64-canadian 41
-src oe http://llu-piketon.sh.intel.com/ipk_sdk
-src oe-all http://llu-piketon.sh.intel.com/ipk_sdk/all
-src oe-x86_64-nativesdk http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-nativesdk
-src oe-x86_64-i586-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-i586-canadian
-src oe-x86_64-arm-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-arm-canadian
-src oe-x86_64-powerpc-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-powerpc-canadian
-src oe-x86_64-mips-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-mips-canadian
-src oe-x86_64-x86_64-canadian http://llu-piketon.sh.intel.com/ipk_sdk/x86_64-x86_64-canadian
+src oe http://llu-piketon.sh.intel.com/ipk_sdknew
+src oe-all http://llu-piketon.sh.intel.com/ipk_sdknew/all
+src oe-x86_64-nativesdk http://llu-piketon.sh.intel.com/ipk_sdknew/x86_64-nativesdk
scripts/adt-installer/util +30 -0
index 612f574..9176625 100644
@@ -34,6 +34,9 @@ while true; do
   if [ "$YOCTOADT_INSTALL" == "Y" ]; then
     break
   elif [ "$YOCTOADT_INSTALL" == "N" ]; then
+    echo_info "\n############################################################"
+    echo_info "# User Cancelled installation!"
+    echo_info "############################################################\n"
     exit -1
   fi
 done
@@ -64,7 +67,34 @@ check_result()
   fi
 }
 
+config_file="yocto_installer.conf"
+if [ ! -f "$config_file" ]; then
+  echo_info "[ADT_INST] user installation configuration file is not found!\n"
+  echo_info "\n############################################################"
+  echo_info "# Meet error when installing Yocto ADT. "
+  echo_info "############################################################\n"
+  exit -1
+fi
 
+source $config_file
 
 LOCAL_OPKG_LOC="./opkg"
 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-sdk-i586.conf"
+YOCTOADT_OPKG_CONF_FILE_64="opkg-sdk-x86_64.conf"
+# yocto adt installation log file
+YOCTOADT_INSTALL_LOG_FILE="yoctoadt_installer.log"
+# Temp folders holding qemu/rootfs downloaded images
+# It will be put into the installation folder
+LOCAL_DOWNLOAD="./download_image"
+INSTALL_FOLDER=/opt/poky/$YOCTOADT_VERSION
+
+
+
scripts/adt-installer/yocto_installer +38 -16

131 lines not on this page · raw message

scripts/adt-installer/yocto_installer.conf +8 -3
index 162ae3a..78bd392 100644
@@ -1,3 +1,8 @@
+# Target ROOTFS Download site Configuration, normally it will be
+# in the same repository with those ipks.
+YOCTOADT_ROOTFS_LOC="http://llu-piketon.sh.intel.com/rootfs"
+YOCTOADT_VERSION="0.9-post"
+
 #Host Area
 YOCTOADT_TARGETS="powerpc mips arm x86 x86_64"
 YOCTOADT_QEMU="Y"
@@ -6,9 +11,9 @@ YOCTOADT_BITBAKE="Y"
 YOCTOADT_METADATA="Y"
 
 #Target Area
-YOCTOADT_TARGET_arm="N"
-YOCTOADT_ROOTFS_arm="sato sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sato"
+YOCTOADT_TARGET_arm="Y"
+YOCTOADT_ROOTFS_arm="sdk"
+YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sdk"
 YOCTOADT_TARGET_SYSROOT_arm="$HOME/test-yocto/arm"
 
 YOCTOADT_TARGET_x86="Y"
scripts/adt-installer/yocto_installer_internal +29 -27

155 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#5 lore raw

PATCH 5/59 Redirect downloading information to both screen and log file

In reply to Jessica Zhang

Since now wget output all information to stderr, and we need to redirect to stdout and then use "tee" to redirect it to both stdout and logfile.

---
 scripts/adt-installer/yocto_installer |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/adt-installer/yocto_installer +2 -2
index f7ac2db..39e57fd 100755
@@ -167,12 +167,12 @@ get_qemu_image()
   fi
 
   echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
+  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
   check_result
   
   for image_type in $select_rootfs; do
     echo_info "[ADT_INST] Downloading rootfs file: poky-image-$image_type-qemu$1.tar.bz2"
-    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD &>> $YOCTOADT_INSTALL_LOG_FILE
+    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
     check_result
   done
 }
Signature · 1 line
1.7.0.4
#6 lore raw

PATCH 6/59 Change sdk version in configuration file to 0.9+snapshot

In reply to Jessica Zhang

Change sdk version in configuration files for testing

---
 scripts/adt-installer/yocto_installer.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/adt-installer/yocto_installer.conf +1 -1
index 78bd392..da2449a 100644
@@ -1,7 +1,7 @@
 # Target ROOTFS Download site Configuration, normally it will be
 # in the same repository with those ipks.
 YOCTOADT_ROOTFS_LOC="http://llu-piketon.sh.intel.com/rootfs"
-YOCTOADT_VERSION="0.9-post"
+YOCTOADT_VERSION="0.9+snapshot"
 
 #Host Area
 YOCTOADT_TARGETS="powerpc mips arm x86 x86_64"
Signature · 1 line
1.7.0.4
#7 lore raw

PATCH 7/59 Change qemu kernel downloading output info to be noverbose

In reply to Jessica Zhang

Since this image is small, no need to output downloading percentage.

---
 scripts/adt-installer/yocto_installer |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
scripts/adt-installer/yocto_installer +1 -1
index 39e57fd..b97d70d 100755
@@ -167,7 +167,7 @@ get_qemu_image()
   fi
 
   echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
+  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD -nv 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
   check_result
   
   for image_type in $select_rootfs; do
Signature · 1 line
1.7.0.4
#8 lore raw

PATCH 8/59 Make bar viewing for showing download progress instead of dot view

In reply to Jessica Zhang

After redirect stderr to stdout, the dot view is used. It is quite boring for users. So I make it to bar view by force.

---
 scripts/adt-installer/yocto_installer |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/adt-installer/yocto_installer +2 -2
index b97d70d..ba6e054 100755
@@ -167,12 +167,12 @@ get_qemu_image()
   fi
 
   echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD -nv 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
+  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
   check_result
   
   for image_type in $select_rootfs; do
     echo_info "[ADT_INST] Downloading rootfs file: poky-image-$image_type-qemu$1.tar.bz2"
-    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
+    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
     check_result
   done
 }
Signature · 1 line
1.7.0.4
#9 lore raw

PATCH 9/59 Update user configuration file for testing

In reply to Jessica Zhang

Add minial and sato images for testing since they're now in repository

---
 scripts/adt-installer/yocto_installer.conf |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
scripts/adt-installer/yocto_installer.conf +2 -2
index da2449a..3d17764 100644
@@ -12,8 +12,8 @@ YOCTOADT_METADATA="Y"
 
 #Target Area
 YOCTOADT_TARGET_arm="Y"
-YOCTOADT_ROOTFS_arm="sdk"
-YOCTOADT_TARGET_SYSROOT_IMAGE_arm="sdk"
+YOCTOADT_ROOTFS_arm="minimal sato"
+YOCTOADT_TARGET_SYSROOT_IMAGE_arm="minimal"
 YOCTOADT_TARGET_SYSROOT_arm="$HOME/test-yocto/arm"
 
 YOCTOADT_TARGET_x86="Y"
Signature · 1 line
1.7.0.4
#10 lore raw

PATCH 10/59 If qemu file already exists, user can choose download new or keep the old

In reply to Jessica Zhang

If user has downloaded qemu image before, the installer could let user chooose whether to download the new qemu image or keep the old one. It's useful if users are reinstalling the adt.

---
 scripts/adt-installer/util            |   31 +++++++++++++++++++++++--------
 scripts/adt-installer/yocto_installer |   10 +++-------
 2 files changed, 26 insertions(+), 15 deletions(-)
scripts/adt-installer/util +23 -8
index b041a08..7065d6d 100644
@@ -42,12 +42,22 @@ while true; do
 done
 }
 
-
-confirm_install_v2()
+check_result()
 {
+  result="$?"
+  if [ ! "$result" == "0" ]; then
+     echo_info "\n#############################################################################"
+     echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+     echo_info "#############################################################################\n"
+    exit -1
+  fi
+}
 
+confirm_download()
+{
 while true; do
-  echo_info -e "[ADT_INST] Do you want to go on extracting rootfs? Please enter Y/N:"
+  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:"
   read YOCTOADT_INSTALL
   YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
   if [ "$YOCTOADT_INSTALL" == "Y" ]; then
@@ -58,17 +68,22 @@ while true; do
 done
 }
 
-check_result()
+download_file()
 {
+if [ -f "$LOCAL_DOWNLOAD/$1" ]; then
+  confirm_download $1
   result="$?"
   if [ ! "$result" == "0" ]; then
-     echo_info "\n#############################################################################"
-     echo_info "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
-     echo_info "#############################################################################\n"
-    exit -1
+    return
+  else
+    echo "[ADT_INST] Removing old existing file [$1]"
+    rm -rf "$LOCAL_DOWNLOAD/$1" 
   fi
+fi
+wget "$YOCTOADT_ROOTFS_LOC/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
 }
 
+
 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"
scripts/adt-installer/yocto_installer +3 -7
index ba6e054..bad590c 100755
@@ -167,12 +167,13 @@ get_qemu_image()
   fi
 
   echo_info "[ADT_INST] Downloading qemu kernel binary: $qemu_kernel"
-  wget "$YOCTOADT_ROOTFS_LOC/$qemu_kernel" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
+  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"
-    wget "$YOCTOADT_ROOTFS_LOC/poky-image-$image_type-qemu$1.tar.bz2" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
+    filename="poky-image-$image_type-qemu$1.tar.bz2"
+    download_file $filename
     check_result
   done
 }
@@ -248,11 +249,6 @@ install_opkg
 if [ ! -d "$LOCAL_DOWNLOAD" ]; then
   echo_info "[ADT_INST] Creating new images downloading folder: $LOCAL_DOWNLOAD ..."
   mkdir -p $LOCAL_DOWNLOAD
-else
-  echo_info "[ADT_INST] Images downloading folder: $LOCAL_DOWNLOAD, already exists! Continue installation will override its contents!"
-  confirm_install
-  rm -rf $LOCAL_DOWNLOAD
-  mkdir -p $LOCAL_DOWNLOAD
 fi
 
 #downloading required qemu images/rootfs
Signature · 1 line
1.7.0.4
#11 lore raw

PATCH 11/59 Modify folders per Josh's suggestion

In reply to Jessica Zhang
---
 scripts/adt-installer/opkg-0.1.8.tar.gz            |  Bin 437009 -> 0 bytes
 .../{ => opkg/conf}/opkg-sdk-i586.conf             |    0
 .../{ => opkg/conf}/opkg-sdk-x86_64.conf           |    0
 scripts/adt-installer/{ => scripts}/util           |    8 +++--
 .../{ => scripts}/yocto_installer_internal         |    8 +++--
 scripts/adt-installer/yocto_installer              |   34 ++++++++++---------
 scripts/adt-installer/yocto_installer.conf         |    6 +++
 7 files changed, 34 insertions(+), 22 deletions(-)
 delete mode 100644 scripts/adt-installer/opkg-0.1.8.tar.gz
 rename scripts/adt-installer/{ => opkg/conf}/opkg-sdk-i586.conf (100%)
 rename scripts/adt-installer/{ => opkg/conf}/opkg-sdk-x86_64.conf (100%)
 rename scripts/adt-installer/{ => scripts}/util (93%)
 rename scripts/adt-installer/{ => scripts}/yocto_installer_internal (97%)
scripts/adt-installer/opkg-0.1.8.tar.gz deleted binary +0 -0
deleted file mode 100644
index eb16094bd564ac07a78ff00de86174036f241372..0000000000000000000000000000000000000000
GIT binary patch
scripts/adt-installer/opkg/conf/opkg-sdk-i586.conf renamed from scripts/adt-installer/opkg-sdk-i586.conf +0 -0
similarity index 100%
rename from scripts/adt-installer/opkg-sdk-i586.conf
rename to scripts/adt-installer/opkg/conf/opkg-sdk-i586.conf
scripts/adt-installer/opkg/conf/opkg-sdk-x86_64.conf renamed from scripts/adt-installer/opkg-sdk-x86_64.conf +0 -0
similarity index 100%
rename from scripts/adt-installer/opkg-sdk-x86_64.conf
rename to scripts/adt-installer/opkg/conf/opkg-sdk-x86_64.conf
scripts/adt-installer/scripts/util renamed from scripts/adt-installer/util +5 -3
similarity index 93%
rename from scripts/adt-installer/util
rename to scripts/adt-installer/scripts/util
index 7065d6d..530cf73 100644
@@ -95,7 +95,9 @@ fi
 
 source $config_file
 
-LOCAL_OPKG_LOC="./opkg"
+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,
@@ -104,8 +106,8 @@ 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-sdk-i586.conf"
-YOCTOADT_OPKG_CONF_FILE_64="opkg-sdk-x86_64.conf"
+YOCTOADT_OPKG_CONF_FILE_32="./opkg/conf/opkg-sdk-i586.conf"
+YOCTOADT_OPKG_CONF_FILE_64="./opkg/conf/opkg-sdk-x86_64.conf"
 # yocto adt installation log file
 YOCTOADT_INSTALL_LOG_FILE="yocto_installer.log"
 # Temp folders holding qemu/rootfs downloaded images
scripts/adt-installer/scripts/yocto_installer_internal renamed from scripts/adt-installer/yocto_installer_internal +5 -3
similarity index 97%
rename from scripts/adt-installer/yocto_installer_internal
rename to scripts/adt-installer/scripts/yocto_installer_internal
index c395e1b..68548ff 100755
@@ -73,13 +73,15 @@ else
 fi
 
 #first update repository
+OPKG_CMD=$LOCAL_OPKG_LOC/bin/opkg-cl
+
 echo_info "[ADT_INST] Updateing opkg..."
-./opkg/bin/opkg-cl -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR update &>> $YOCTOADT_INSTALL_LOG_FILE
+$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR update &>> $YOCTOADT_INSTALL_LOG_FILE
 #echo_info "[ADT_INST] opkg update process ended..."
 check_result
 
 #install below must sdk-host packages
-OPKG_INSTALL_CMD="./opkg/bin/opkg-cl --force-overwrite"
+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 "[ADT_INST] Installing pseudo nativesdk ...\n"
@@ -216,7 +218,7 @@ fi
 
 
 #Main part
-. util
+. scripts/util
 
 parse_config
 
scripts/adt-installer/yocto_installer +18 -16
index bad590c..f85a773 100755
@@ -124,31 +124,37 @@ 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 opkg-*.gz ]; then
+
+  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
+  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"  
-  tar zvfx opkg-*.gz &>> $YOCTOADT_INSTALL_LOG_FILE
+  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
   cd opkg-*
   echo_info "[ADT_INST] Configure opkg ...\n"
-  ./configure --prefix=${PWD}/../$LOCAL_OPKG_LOC --with-opkglibdir=$OPKG_LIBDIR --disable-curl --disable-ssl-curl --disable-gpg --disable-shave >> $YOCTOADT_INSTALL_LOG_FILE
+  ./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 "[ADT_INST] Make opkg ...\n"
-  make &>> $YOCTOADT_INSTALL_LOG_FILE
+  make &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
   check_result
   echo_info "[ADT_INST] Make Install opkg ...\n"
-  make install &>> $YOCTOADT_INSTALL_LOG_FILE
+  make install &>> $parent_folder/$YOCTOADT_INSTALL_LOG_FILE
   #if meet error when installing opkg, cancel the installation
   check_result
-  cd ..
+  cd $parent_folder
+
   echo_info "[ADT_INST] Successfully installed OPKG.\n"
 fi
 }
@@ -217,7 +223,7 @@ clear
 run_path=`dirname $0`
 cd $run_path
 
-if [ ! -f "util" ]; then
+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. "
@@ -225,7 +231,7 @@ if [ ! -f "util" ]; then
   exit -1
 fi
 
-if [ ! -f "yocto_installer_internal" ]; then
+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. "
@@ -233,7 +239,7 @@ if [ ! -f "yocto_installer_internal" ]; then
   exit -1
 fi
 
-. util
+. scripts/util
 
 if [ -f "$YOCTOADT_INSTALL_LOG_FILE" ]; then
   rm $YOCTOADT_INSTALL_LOG_FILE
@@ -261,7 +267,7 @@ echo_info "[ADT_INST] Continuing installation requires sudo password ..."
 
 username=`id -nu`
 groupname=`id -ng`
-sudo ./yocto_installer_internal $username $groupname
+sudo scripts/yocto_installer_internal $username $groupname
 
 result="$?"
 #echo_info "\n############################################################"
@@ -269,9 +275,5 @@ if [ "$result" == "0" ]; then
   echo_info "\n############################################################"
   echo_info "# Yocto ADT has been successfully installed."
   echo_info "############################################################\n"
-#else
-#  echo_info "# Meet error(s) during installing Yocto ADT! Please  "
-
 fi
-#echo_info "############################################################\n"
 
scripts/adt-installer/yocto_installer.conf +6 -0
index 3d17764..b88a57f 100644
@@ -31,6 +31,12 @@ YOCTOADT_ROOTFS_mips="sdk"
 YOCTOADT_TARGET_SYSROOT_IMAGE_mips="sdk"
 YOCTOADT_TARGET_SYSROOT_mips="$HOME/test-yocto/mips"
 
+YOCTOADT_TARGET_x86_64="N"
+YOCTOADT_ROOTFS_x86_64="sdk minimal"
+YOCTOADT_TARGET_SYSROOT_IMAGE_x86_64="sdk"
+YOCTOADT_TARGET_SYSROOT_x86_64="$HOME/test-yocto/x86_64"
+
+
 
 
 
Signature · 1 line
1.7.0.4
#12 lore raw

PATCH 12/59 sudo is controlled in smaller granularity.

In reply to Jessica Zhang

Now parsing configuration file is not under sudo environment.

---
 scripts/adt-installer/scripts/util                 |   57 ----------------
 .../adt-installer/scripts/yocto_installer_internal |   69 ++++++--------------
 scripts/adt-installer/yocto_installer              |   56 ++++++++++++++--
 3 files changed, 70 insertions(+), 112 deletions(-)
scripts/adt-installer/scripts/util +0 -57
index 530cf73..99ce7e2 100644
@@ -53,67 +53,10 @@ check_result()
   fi
 }
 
-confirm_download()
-{
-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:"
-  read YOCTOADT_INSTALL
-  YOCTOADT_INSTALL=`tr '[a-z]' '[A-Z]'<<<"$YOCTOADT_INSTALL"`
-  if [ "$YOCTOADT_INSTALL" == "Y" ]; then
-    return 0
-  elif [ "$YOCTOADT_INSTALL" == "N" ]; then
-    return 1
-  fi
-done
-}
-
-download_file()
-{
-if [ -f "$LOCAL_DOWNLOAD/$1" ]; then
-  confirm_download $1
-  result="$?"
-  if [ ! "$result" == "0" ]; then
-    return
-  else
-    echo "[ADT_INST] Removing old existing file [$1]"
-    rm -rf "$LOCAL_DOWNLOAD/$1" 
-  fi
-fi
-wget "$YOCTOADT_ROOTFS_LOC/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
-}
-
-
-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
-
-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"
 # yocto adt installation log file
 YOCTOADT_INSTALL_LOG_FILE="yocto_installer.log"
 # Temp folders holding qemu/rootfs downloaded images
 # It will be put into the installation folder
 LOCAL_DOWNLOAD="./download_image"
-INSTALL_FOLDER=/opt/poky/$YOCTOADT_VERSION
-
 
 
scripts/adt-installer/scripts/yocto_installer_internal +20 -49

115 lines not on this page · raw message

scripts/adt-installer/yocto_installer +50 -6

93 lines not on this page · raw message

Signature · 1 line
1.7.0.4
#13 lore raw

PATCH 13/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
#14 lore raw

PATCH 14/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
#15 lore raw

PATCH 15/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
#16 lore raw

PATCH 16/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