Subject: Re: [tisdk-build-scripts][PATCH 05/10] Remove support for generating installer SDK To: meta-arago@lists.yoctoproject.org From: "Jonathan Humphreys" X-Originating-Location: US (192.228.67.13) X-Originating-Platform: Windows Chrome 96 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Mon, 29 Nov 2021 15:15:29 -0800 References: <1637640060-31733-18-git-send-email-denis@denix.org> In-Reply-To: <1637640060-31733-18-git-send-email-denis@denix.org> Message-ID: <32437.1638227729621148490@lists.yoctoproject.org> Content-Type: multipart/alternative; boundary="ZYemNER8KOOUpgFfAgPN" --ZYemNER8KOOUpgFfAgPN Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2021 at 08:01 PM, Denys Dmytriyenko wrote: >=20 > From: Denys Dmytriyenko >=20 > Signed-off-by: Denys Dmytriyenko Reviewed-by: Jonathan Humphreys >=20 > --- > lib/oesdk/package-sdks | 496 --------------------------------------- > lib/oesdk/ti-sdk-host-install.sh | 227 ------------------ > 2 files changed, 723 deletions(-) > delete mode 100644 lib/oesdk/package-sdks > delete mode 100755 lib/oesdk/ti-sdk-host-install.sh >=20 > diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks > deleted file mode 100644 > index 2316d40..0000000 > --- a/lib/oesdk/package-sdks > +++ /dev/null > @@ -1,496 +0,0 @@ > -#!/bin/bash > - > -# This script is intended to be called only from the top-level > build-oesdk.sh > -# script which parses the configuration file and sets necessary > variables. > -# So check if it is being called from any other context and if so exit. > -if [ "`basename $0`" !=3D "build-oesdk.sh" ] > -then > - log $error_log echo "This is a helper script and should not be run > directly" > - exit 1 > -fi > - > -create_sd_card_content() { > - # Set m for logging purposes > - m=3D"$1" > - > - package_root=3D"$PACKAGE_ROOT/$m" > - > - # Make the machine specific SD card directory > - sd_card_root=3D"$DEPLOY_ROOT/$m/$BUILD_ID/sd_card_contents" > - > - if [ -d $sd_card_root ] > - then > - rm -rf $sd_card_root > - fi > - mkdir -p $sd_card_root > - > - # Create the boot_partition tarball. Some of the files such as the > - # prebuilt images were already staged here during the build/test phase > - # and just need to be renamed. Others should be copied from the > - # SD_CARD_CONTENT directory > - cd $package_root/boot_partition > - > - # Rename the pre-built image files > - if [ -e u-boot-$m.img ] > - then > - mv u-boot-$m.img u-boot.img > - fi > - > - # For machines that use older u-boots that do not use .img files > - if [ -e u-boot-$m.bin ] > - then > - mv u-boot-$m.bin u-boot.bin > - fi > - > - # Remove this binary since it wouldn't be used in the boot partition > - if [ -e u-boot-spl.bin-$m ] > - then > - rm u-boot-spl.bin-$m > - fi > - > - # For some devices the uImage/zImage and dtb files are read > - # from the /boot directory of the rootfs. In this case do > - # not package the uImage/zImage and device tree files into > - # the boot partition as it will cause confusion. > - if [ "$PACKAGE_BOOT_KERNEL_FILES" =3D "true" ] > - then > - if [ -e [uz]Image-$m.bin ] > - then > - kernel_image=3D`ls [uz]Image-$m.bin | grep -o [uz]Image` > - mv [uz]Image-$m.bin $kernel_image > - fi > - else > - rm -f [uz]Image* > - rm -f *.dtb > - fi > - > - # Copy the MLO if it exists for the device > - if [ -e MLO-$m ] > - then > - mv MLO-$m MLO > - fi > - > - # If there are any extra SD card content files for the boot partition > - # copy them with the -L to resolve symlinks > - if [ -d "$SD_CARD_CONTENT/$m/boot" ] > - then > - cp -rLf $SD_CARD_CONTENT/$m/boot/* . > - fi > - > - # Now tar up the boot_partition.tar.xz file > - tar cJf $sd_card_root/boot_partition.tar.xz * > - > - if [ "$?" !=3D "0" ] > - then > - echo "Could not create boot_partition.tar.xz" > - echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt > - return 1 > - fi > - > - # Move the rootfs tarball we already had to the sd_card_root directory > - cd $package_root/root_partition > - mv rootfs_partition.$FS_IMAGE_TYPE $sd_card_root/ > - > - if [ "$?" !=3D "0" ] > - then > - echo "Could not mv rootfs_partition.tar.xz" > - echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt > - return 1 > - fi > - > - # Lastly let's package the start_here partition tarball > - start_here_root=3D"$package_root/start_here_partition" > - if [ -d "$start_here_root" ] > - then > - rm -rf $start_here_root > - fi > - mkdir -p $start_here_root > - > - cd $start_here_root > - > - # Copy the installer > - cp $DEPLOY_ROOT/$m/$BUILD_ID/${INSTALLER_PREFIX}-$m* $start_here_root/ > - > - if [ "$?" !=3D "0" ] > - then > - echo "Could not copy installer to start_here" > - echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt > - return 1 > - fi > - > - # Copy the rest of the start_here content from the SD_CARD_CONTENT > - # directory. This usually contains: > - # - CCS installer > - # - quickstart guides > - # - START_HERE.sh scripts (if needed) > - if [ -d "$SD_CARD_CONTENT/$m/start_here" ] > - then > - cp -rLf $SD_CARD_CONTENT/$m/start_here/* . > - fi > - > - # Now tar up the start_here_partition.tar.xz file > - tar cJf $sd_card_root/start_here_partition.tar.xz * > - > - if [ "$?" !=3D "0" ] > - then > - echo "Could not create start_here_partition.tar.xz" > - echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt > - return 1 > - fi > - > - # Lastly copy the create-sdcard.sh script for the extracted SDK > - # directory to the sd_card_root > - cp $TEST_ROOT/$m-test/temp/bin/create-sdcard.sh $sd_card_root/ > - chmod +x $sd_card_root/create-sdcard.sh > - > - # Mark this step as PASSED since we got here > - echo "PASSED" > $LOG_DIR/$m-build-sdcard.txt > -} > - > -create_sdk_installer() { > - # Set m for logging purposes > - m=3D"$1" > - > - # Make the machine specific installer root > - installer_root=3D"$INSTALLER_ROOT/$m" > - > - if [ -d $installer_root ] > - then > - rm -rf $installer_root > - fi > - mkdir -p $installer_root > - > - # Copy the installer components into the proper directory > - cp $PACKAGE_ROOT/$m/$SDK_FILTER* $installer_root/ > - > - # Get the name of the SDK tarball > - cd $installer_root > - sdk_tar=3D"`ls $SDK_FILTER*`" > - cd - > - > - ## Custom Install Builder Parameters > - # sdk_loc - Location of SDK tarball > - # sdk_tar_nam - SDK tarball name > - # output_dir - Location to place SDK installer > - # platform - Machine name > - # sdk_version - SDK Version > - # sdk_name_prefix - SDK name Prefix. > - # > - # SDK is referred to as ${sdk_name_prefix}-${platform} in the installer > - # Ex tisdk-am335x > - # SDK installer is named after > ${sdk_name_prefix}-${platform}-${sdk_version}-Linux-x86-Install.bin > - # Ex ti-sdk-am335x-evm-06.00.00.00-Linux-x86-Install.bin > - > - > - $INSTALL_BUILDER/builder build $INSTALL_BUILDER_PROJECT linux --setvars > \ > - sdk_loc=3D"$installer_root/" \ > - sdk_name_prefix=3D"${INSTALLER_PREFIX}" \ > - sdk_tar_name=3D$sdk_tar \ > - output_dir=3D"$deploy_root" \ > - platform=3D"$m" \ > - sdk_version=3D"$TISDK_VERSION" > - > - if [ "$?" !=3D "0" ] > - then > - echo "FAILED" > $LOG_DIR/$m-build-installer.txt > - return 1 > - else > - echo "PASSED" > $LOG_DIR/$m-build-installer.txt > - fi > -} > - > -package_web_content() { > - # Set m for logging purposes > - m=3D"$1" > - > - # Create the exports content for the web page > - exports_root=3D"$deploy_root/exports" > - > - if [ -d $exports_root ] > - then > - rm -rf $exports_root > - fi > - mkdir -p $exports_root > - > - # Copy the manifest file if it exists. Pull it from the extracted > - # SDK directory from the test step. > - manifest_file=3D"$TEST_ROOT/$m-test/temp/docs/software_manifest.htm" > - if [ -e $manifest_file ] > - then > - cp $manifest_file $exports_root/ > - else > - echo "Could not package manifest file" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - # Create the PSP tarballs as well > - # First the sources tarball > - cd $TEST_ROOT/$m-test/temp > - > - tar --exclude=3Dprebuilt-images -cJf > $exports_root/$m-sdk-src-$TISDK_VERSION.tar.xz board-support/* > - > - if [ "$?" !=3D 0 ] > - then > - echo "Could not create SDK sources tarball" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - # Now Create the pre-built binaries tarball. Make a temporary directory > - # to copy contents to here so that we can get the right extraction name= . >=20 > - tmp_dir=3D"$exports_root/${INSTALLER_PREFIX}-$m-bin-${TISDK_VERSION}" > - tmp_dir_bs=3D"$tmp_dir/board-support" > - mkdir -p $tmp_dir_bs > - > - cp -rf board-support/prebuilt-images $tmp_dir_bs > - if [ "$?" !=3D 0 ] > - then > - echo "Could not copy prebuilt-images" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - cp -rf filesystem $tmp_dir/ > - if [ "$?" !=3D 0 ] > - then > - echo "Could not copy file system tarballs" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - cp -rf bin $tmp_dir/ > - if [ "$?" !=3D 0 ] > - then > - echo "Could not copy bin folder" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - # remove scripts which have dependency on devkit > - rm $tmp_dir/bin/unshallow-repositories.sh > - rm $tmp_dir/bin/create-ubifs.sh > - > - # modify create-sdcard.sh to use the tarball extraction directory > - sed -i -e "s|ti-sdk.*\[0-9\]|${tmp_dir##*/}|g" > $tmp_dir/bin/create-sdcard.sh > - > - # modify setup-target-nfs.sh to get the absolute path when running the > scripts > - # 1. remove the line to set up "SDKinstall" with TI_SDK_PATH > - sed -i -e '/^SDKinstall/d' $tmp_dir/bin/setup-targetfs-nfs.sh > - > - # 2. add the lines before setting dstdefault to get the absolute path o= f > the scripts and SDKinstall, > - # using the same way as in create-sdcard.sh: PWD=3D`pwd`; EXE=3D`echo $= 0 | > sed s=3D$PWD=3D=3D`; > - # EXEPATH=3D"$PWD"/"$EXE"; SDKinstall=3D`echo $EXEPATH | grep -o > .*ti-sdk.*.[0-9]` > - sed -i -e '/dstdefault=3D$SDKinstall\/targetNFS/i\PWD=3D`pwd`\nEXE=3D`e= cho $0 > | sed s=3D$PWD=3D=3D`\nEXEPATH=3D"$PWD"/"$EXE"\nSDKinstall=3D`echo $EXEPA= TH | grep > -o '.*ti-sdk.*.[0-9]'`\n' $tmp_dir/bin/setup-targetfs-nfs.sh > - > - # 3. use the tarball extraction directory for SDKinstall > - sed -i -e "s|ti-sdk.*\[0-9\]|${tmp_dir##*/}|g" > $tmp_dir/bin/setup-targetfs-nfs.sh > - > - # create Rules.make with variables to be used from the binary package > - echo "#platform" >> $tmp_dir/Rules.make > - echo "PLATFORM=3D$m" >> $tmp_dir/Rules.make > - echo >> $tmp_dir/Rules.make > - > - echo "#root of the target file system for installing applications" >> > $tmp_dir/Rules.make > - echo "DESTDIR=3D__DESTDIR__" >> $tmp_dir/Rules.make > - echo >> $tmp_dir/Rules.make > - > - echo "# Set EXEC_DIR to install example binaries" >> $tmp_dir/Rules.mak= e >=20 > - echo "EXEC_DIR=3D__EXEC_DIR__" >> $tmp_dir/Rules.make > - > - if [ "$?" !=3D 0 ] > - then > - echo "Could not create Rules.make" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - cp -f setup.sh $tmp_dir/ > - if [ "$?" !=3D 0 ] > - then > - echo "Could not copy setup.sh" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - cd $exports_root > - tar cJf $m-sdk-bin-$TISDK_VERSION.tar.xz > ${INSTALLER_PREFIX}-$m-bin-${TISDK_VERSION}/* > - if [ "$?" !=3D 0 ] > - then > - echo "Could not create SDK binaries tarball" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - rm -rf ${INSTALLER_PREFIX}-$m-bin-${TISDK_VERSION} > - > - if [ "$EXPORT_ARAGO_SRC" =3D=3D "1" ] > - then > - tar -C $DL_DIR -cJf $exports_root/$m-sdk-arago-src-$TISDK_VERSION.tar.x= z > . > - > - if [ "$?" !=3D 0 ] > - then > - echo "Could not create arago source tarball" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - fi > - > - # Copy any additional web files that are in the WEB_EXTRAS_ROOT > - # directory. > - web_extras=3D"$WEB_EXTRAS_ROOT/$m" > - if [ -d $web_extras ] > - then > - cp -rLf $web_extras/* $exports_root/ > - fi > - > - # Move the installer into the exports directory > - mv $deploy_root/${INSTALLER_PREFIX}-$m* $exports_root/ > - > - # Create the md5sum file > - cd $exports_root > - md5sum * > md5sum.txt > - > - # If we got here it means everything else passed > - echo "PASSED" > $LOG_DIR/$m-web-results.txt > -} > - > -generate_webgen_page() { > - # Set m for logging purposes > - m=3D"$1" > - > - > - webgen_make=3D"$WEBGEN_MAK_ROOT/$m/webgen.mak" > - > - if [ ! -e $webgen_make ] > - then > - echo "Could not find the webgen file for machine $m" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - return 1 > - fi > - > - # Create the ti.com contents directory > - mkdir -p $deploy_root/ti_com_contents > - > - # Copy the webgen file to the deploy directory > - cd $deploy_root > - cp $webgen_make . > - > - # Generate the web page > - $WEBGEN_ROOT/webgen_ext webgen.mak $deploy_root/ti_com_contents exports > - > - # Cleanup the misc webgen files > - cleanup_webgen_page $m > -} > - > -# The webgen tool does a couple of things like make a symlink to the > exports > -# directory and has a validationinfo file that needs to be removed befor= e >=20 > -# copying. If this is not done then we copy double the files, etc. > -cleanup_webgen_page() { > - m=3D"$1" > - > - content_dir=3D"$deploy_root/ti_com_contents/`grep 'PRODUCT_NAME=3D' > $webgen_make | sed -e 's/PRODUCT_NAME=3D//g'`/`echo $TISDK_VERSION | tr '= .' > '_'`" > - > - # Something went wrong here because I can't find the webgen content > - if [ ! -d $content_dir ] > - then > - echo "Could not find the $content_dir" > - echo "FAILED" > $LOG_DIR/$m-web-results.txt > - fi > - > - # Remove the exports symlink and move the real exports directory into > its > - # place > - rm -rf $content_dir/exports > - mv $deploy_root/exports $content_dir/ > - > - # Remove the .validationinfo file > - rm -f $content_dir/.validationinfo > - > - # Remove the webgen.mak file > - rm -f $deploy_root/webgen.mak > -} > - > -package_individual_sdk() { > - # Set m for logging purposes > - m=3D"$1" > - > - # Make the machine specific deploy root > - deploy_root=3D"$DEPLOY_ROOT/$m/$BUILD_ID" > - > - if [ -d $deploy_root ] > - then > - rm -rf $deploy_root > - fi > - mkdir -p $deploy_root > - > - # Create the SDK installer in the deploy directory > - create_sdk_installer $m > - > - # Create the SD card tarballs in the deploy directory > - create_sd_card_content $m > - > - # Package the SD card and web page contents to get ready for > - # generating the webgen page and publishing the SDK > - package_web_content $m > - > - if [ "$?" =3D=3D "0" ] > - then > - # Since the packaging worked let's generate the ti.com style > - # web page. > - generate_webgen_page $m > - fi > -} > - > -package_sdks(){ > - # Build a list of machines that passed their build and had no > - # CRITICAL failures. This can be done by looking for the test > - # results file for each machine. If the test file does not > - # exist then the build failed. If it does exist and does not > - # contain the CRITICAL keyword then we can continue with > - #packaging. > - machines=3D"" > - > - for m in $MACHINES > - do > - if [ -e $LOG_DIR/$m-build-result.txt ] > - then > - # Check if the build failed > - grep "FAILED" $LOG_DIR/$m-build-result.txt > /dev/null 2>&1 > - if [ "$?" =3D=3D "0" ] > - then > - # The build failed so don't package this device > - continue > - fi > - > - # Check the test results > - if [ -e $LOG_DIR/$m-test-result.txt ] > - then > - # The build at least PASSED > - # Check if this was a CRITICAL failure > - grep "CRITICAL" $LOG_DIR/$m-test-result.txt > /dev/null 2>&1 > - if [ "$?" =3D=3D "0" ] > - then > - # This was a critical failure so return without copying > - # the files > - continue > - fi > - > - # This was a build with a PASSED, SKIPPED, or non-CRITICAL > - # test result. Add it to the list of machines to package. > - machines=3D"$machines""$m " > - fi > - fi > - done > - > - echo "machines =3D $machines" > - > - # Now that the have the list of machines we can call the rest of the > - # package functions in parallel. > - for m in $machines > - do > - package_individual_sdk $m & > - done > - > - # Wait for the subprocesses to all finish > - wait > -} > diff --git a/lib/oesdk/ti-sdk-host-install.sh > b/lib/oesdk/ti-sdk-host-install.sh > deleted file mode 100755 > index 0dc1fa2..0000000 > --- a/lib/oesdk/ti-sdk-host-install.sh > +++ /dev/null > @@ -1,227 +0,0 @@ > -# /usr/bin/env bash > -set -x > -# > -# (C) Copyright 2010 Texas Instrument Inc. All rights reserved. > -# > -# Author: Schuyler Patton, Texas Instrunents Inc. > -# > -# Script to install TI SDK on User Platform > -# > - > -VERSION=3D"1.0" > - > -# > -# Display program usage > -# > -usage() > -{ > - echo " > -Usage: `basename $1` [options] --machine > > - > - --help Print this help message > -" > - exit 1 > -} > - > -# > -# Display version > -# > -version() > -{ > - echo " > -`basename $1`: version $VERSION > -" > - exit 1 > -} > - > - > -# > -# execute command > -# > -execute () > -{ > - #echo "$*" > - $* > - if [ $? -ne 0 ]; then > - echo "ERROR: failed to execute $*" > - exit 1; > - fi > -} > - > -# > -# update sdk Rules.make > -# > -update_rules_make() > -{ > - echo "Updating Rules.make" > - echo "$install_dir" > - > - echo "$install_dir">rm_id.out > - echo "$cross_compile">rm_cc.out > - echo "$cross_compile_dir">rm_ccd.out > - echo "$dest_dir">rm_dd.out > - > - sed -i -e s=3D__SDK__INSTALL_DIR__=3D$install_dir=3D $install_dir/Rules= .make > - sed -i -e > s=3D__CROSS_COMPILE__=3D$cross_compile_dir/arm-none-linux-gnueabi-=3D > $install_dir/Rules.make > - > - # Find the linux directory name > - linux=3D`find $install_dir/board-support -maxdepth 1 -name "linux*"` > - linux=3D`basename $linux` > - sed -i -e s=3D__KERNEL_NAME__=3D$linux=3D $install_dir/Rules.make > - > - # Extract toolchain sdk > - $install_dir/linux-devkit.sh -y -d $install_dir/linux-devkit > - > - # Remove toolchain SDK > - rm $install_dir/linux-devkit.sh > - > -# TODO: Unsure about this one here. This likely should change when the > -# META_SDK_PATH functionality is put back in. > - echo "Updating prefix in libtoolize " > - sed -i -e "s|/arago-2012.10|$install_dir/linux-devkit|g" \ > - $install_dir/linux-devkit/bin/libtoolize > -} > - > -# > -# update example applications CCS project file > -# > -update_ccs_project() > -{ > - cd $install_dir > - > - # Grab some essential variables from environment-setup > - TARGET_SYS=3D`sed -n 's/^export TARGET_SYS=3D//p' > linux-devkit/environment-setup` > - TOOLCHAIN_SYS=3D`sed -n 's/^export TOOLCHAIN_SYS=3D//p' > linux-devkit/environment-setup` > - SDK_SYS=3D`sed -n 's/^export SDK_SYS=3D//p' linux-devkit/environment-se= tup` > - > - # Grab toolchain's GCC version > - GCC_VERSION=3D`ls > linux-devkit/sysroots/$SDK_SYS/usr/lib/gcc/$TOOLCHAIN_SYS/` > - > - > TOOLCHAIN_TARGET_INCLUDE_DIR=3D"linux-devkit/sysroots/$TARGET_SYS/usr/inc= lude" >=20 > - > TOOLCHAIN_INCLUDE_DIR=3D"linux-devkit/sysroots/$SDK_SYS/usr/lib/gcc/$TOOL= CHAIN_SYS/$GCC_VERSION/include" >=20 > - > - # Update CCS project files using important paths to headers > - find ./example-applications -type f -exec sed -i > "s||$TOOLCHAIN_TARGET_INCLUDE_DIR|g" {} \; > - find ./example-applications -type f -exec sed -i > "s||$TOOLCHAIN_INCLUDE_DIR|g" {} \; > - cd - > -} > - > -# > -# prepare installer tools > -# > -prepare_install () > -{ > - echo "Preparing installation ..." > - cwd=3D$PWD; > - > - execute "mkdir -p ${install_dir}" > - mkdir -p ${dest_dir} > - > -} > - > -# > -# install sdk > -# > -install_sdk () > -{ > - sdk_dir=3D$PWD > - echo "$sdk_dir">is_sdk_dir.out > - echo "$install_dir">is_id.out > - echo "$cross_compile">is_cc.out > - echo "$cross_compile_dir">is_ccd.out > - echo "$dest_dir">is_dd.out > - echo "$sdk_pkg">is_sdk_pkg.out > - > -# cp -p ti-sdk-ubuntu-env-setup.sh "$install_dir" > - echo "Untarring top level SDK $sdk_pkg " > - tar -xf $sdk_pkg -C $install_dir > - echo "Untarring top level package complete " > - > - # Remove any .svn directories that were packaged by the sourceipks > - rm -rf `find $install_dir -name ".svn"` > - > -} > - > -install_ccs() > -{ > - > -# $install_source/CCS/setup*.bin & > - > -echo "install_ccs is $install_ccs">ccs_iccs.out > - > -if [ "$install_ccs" =3D "yes" ]; then > - $install_source/ccs_install.sh $install_source & > -fi > - > -} > - > - > -# Process command line... > -while [ $# -gt 0 ]; do > - case $1 in > - --help | -h) > - usage $0 > - ;; > - --version | -v) > - version $0 > - ;; > - --sdk_pkg) > - shift; > - sdk_pkg=3D$1; > - ;; > - --install_dir) > - shift; > - install_dir=3D$1; > - ;; > - --install_ccs) > - shift; > - install_ccs=3D"yes"; > - ;; > - --install_source) > - shift; > - install_source=3D$1 > - ;; > - *) > - shift; > - ;; > - esac > -done > - > -echo " " > -echo " Called with --machine $machine --sdk_pkg $sdk_pkg --install_dir > $install_dir --cross_compile_dir $cross_compile_dir --cross_compile > $cross_compile ">called-w-param.out > -echo " " > - > -echo "$machine">machid.out > -echo "$install_dir">id.out > -echo "$cross_compile">cc.out > -echo "$cross_compile_dir">ccd.out > -echo "$dest_dir">dd.out > -echo "$install_source">tmp/tmp_iss.out > -echo "$install_source">iss.out > - > -# check if install_dir variable is set. > -test -z $install_dir && usage $0 > -execute "mkdir -p $install_dir" > -echo "after mkdir ">oops.out > - > -# prepare installation. > -prepare_install > -echo "after prepare ">oops.out > - > -# install sdk > -install_sdk > -echo "after install_sdk ">oops.out > - > -# install CCS > -test -d $install_source/CCS;install_ccs > - > -# update rules.make > -update_rules_make > - > -# Update example applications CCS project files > -update_ccs_project > - > -echo "Installation completed!" > - > -exit 0 > - > -- > 2.7.4 --ZYemNER8KOOUpgFfAgPN Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Mon, Nov 22, 2021 at 08:01 PM, Denys Dmytriyenko wrote:
From: Denys Dmytriyenko <denys@konsulko.com>

S= igned-off-by: Denys Dmytriyenko <denys@konsulko.com>
Reviewed-by: Jonathan Humphreys <= j-humphreys@ti.com>
---
lib/oesdk/package-sdks | 496 -------------------------= --------------
lib/oesdk/ti-sdk-host-install.sh | 227 ----------------= --
2 files changed, 723 deletions(-)
delete mode 100644 lib/oesdk= /package-sdks
delete mode 100755 lib/oesdk/ti-sdk-host-install.sh

diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks
de= leted file mode 100644
index 2316d40..0000000
--- a/lib/oesdk/pac= kage-sdks
+++ /dev/null
@@ -1,496 +0,0 @@
-#!/bin/bash
= -
-# This script is intended to be called only from the top-level buil= d-oesdk.sh
-# script which parses the configuration file and sets nece= ssary variables.
-# So check if it is being called from any other cont= ext and if so exit.
-if [ "`basename $0`" !=3D "build-oesdk.sh" ]
-then
- log $error_log echo "This is a helper script and should not b= e run directly"
- exit 1
-fi
-
-create_sd_card_content(= ) {
- # Set m for logging purposes
- m=3D"$1"
-
- packa= ge_root=3D"$PACKAGE_ROOT/$m"
-
- # Make the machine specific SD c= ard directory
- sd_card_root=3D"$DEPLOY_ROOT/$m/$BUILD_ID/sd_card_cont= ents"
-
- if [ -d $sd_card_root ]
- then
- rm -rf $sd_c= ard_root
- fi
- mkdir -p $sd_card_root
-
- # Create the= boot_partition tarball. Some of the files such as the
- # prebuilt im= ages were already staged here during the build/test phase
- # and just= need to be renamed. Others should be copied from the
- # SD_CARD_CONT= ENT directory
- cd $package_root/boot_partition
-
- # Rename= the pre-built image files
- if [ -e u-boot-$m.img ]
- then
= - mv u-boot-$m.img u-boot.img
- fi
-
- # For machines that u= se older u-boots that do not use .img files
- if [ -e u-boot-$m.bin ]<= br />- then
- mv u-boot-$m.bin u-boot.bin
- fi
-
- # Re= move this binary since it wouldn't be used in the boot partition
- if = [ -e u-boot-spl.bin-$m ]
- then
- rm u-boot-spl.bin-$m
- fi<= br />-
- # For some devices the uImage/zImage and dtb files are read- # from the /boot directory of the rootfs. In this case do
- # no= t package the uImage/zImage and device tree files into
- # the boot pa= rtition as it will cause confusion.
- if [ "$PACKAGE_BOOT_KERNEL_FILES= " =3D "true" ]
- then
- if [ -e [uz]Image-$m.bin ]
- then- kernel_image=3D`ls [uz]Image-$m.bin | grep -o [uz]Image`
- mv [uz= ]Image-$m.bin $kernel_image
- fi
- else
- rm -f [uz]Image*- rm -f *.dtb
- fi
-
- # Copy the MLO if it exists for t= he device
- if [ -e MLO-$m ]
- then
- mv MLO-$m MLO
- f= i
-
- # If there are any extra SD card content files for the boot= partition
- # copy them with the -L to resolve symlinks
- if [ -= d "$SD_CARD_CONTENT/$m/boot" ]
- then
- cp -rLf $SD_CARD_CONTENT/= $m/boot/* .
- fi
-
- # Now tar up the boot_partition.tar.xz = file
- tar cJf $sd_card_root/boot_partition.tar.xz *
-
- if = [ "$?" !=3D "0" ]
- then
- echo "Could not create boot_partition.= tar.xz"
- echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt
- retur= n 1
- fi
-
- # Move the rootfs tarball we already had to the= sd_card_root directory
- cd $package_root/root_partition
- mv ro= otfs_partition.$FS_IMAGE_TYPE $sd_card_root/
-
- if [ "$?" !=3D "= 0" ]
- then
- echo "Could not mv rootfs_partition.tar.xz"
- = echo "FAILED" > $LOG_DIR/$m-build-sdcard.txt
- return 1
- fi-
- # Lastly let's package the start_here partition tarball
-= start_here_root=3D"$package_root/start_here_partition"
- if [ -d "$st= art_here_root" ]
- then
- rm -rf $start_here_root
- fi
= - mkdir -p $start_here_root
-
- cd $start_here_root
-
-= # Copy the installer
- cp $DEPLOY_ROOT/$m/$BUILD_ID/${INSTALLER_PREFI= X}-$m* $start_here_root/
-
- if [ "$?" !=3D "0" ]
- then
- echo "Could not copy installer to start_here"
- echo "FAILED" >= $LOG_DIR/$m-build-sdcard.txt
- return 1
- fi
-
- # Cop= y the rest of the start_here content from the SD_CARD_CONTENT
- # dire= ctory. This usually contains:
- # - CCS installer
- # - quickstar= t guides
- # - START_HERE.sh scripts (if needed)
- if [ -d "$SD_C= ARD_CONTENT/$m/start_here" ]
- then
- cp -rLf $SD_CARD_CONTENT/$m= /start_here/* .
- fi
-
- # Now tar up the start_here_partiti= on.tar.xz file
- tar cJf $sd_card_root/start_here_partition.tar.xz *-
- if [ "$?" !=3D "0" ]
- then
- echo "Could not create= start_here_partition.tar.xz"
- echo "FAILED" > $LOG_DIR/$m-build-s= dcard.txt
- return 1
- fi
-
- # Lastly copy the create-= sdcard.sh script for the extracted SDK
- # directory to the sd_card_ro= ot
- cp $TEST_ROOT/$m-test/temp/bin/create-sdcard.sh $sd_card_root/- chmod +x $sd_card_root/create-sdcard.sh
-
- # Mark this step= as PASSED since we got here
- echo "PASSED" > $LOG_DIR/$m-build-sd= card.txt
-}
-
-create_sdk_installer() {
- # Set m for l= ogging purposes
- m=3D"$1"
-
- # Make the machine specific i= nstaller root
- installer_root=3D"$INSTALLER_ROOT/$m"
-
- if= [ -d $installer_root ]
- then
- rm -rf $installer_root
- fi=
- mkdir -p $installer_root
-
- # Copy the installer compone= nts into the proper directory
- cp $PACKAGE_ROOT/$m/$SDK_FILTER* $inst= aller_root/
-
- # Get the name of the SDK tarball
- cd $inst= aller_root
- sdk_tar=3D"`ls $SDK_FILTER*`"
- cd -
-
- #= # Custom Install Builder Parameters
- # sdk_loc - Location of SDK tarb= all
- # sdk_tar_nam - SDK tarball name
- # output_dir - Location = to place SDK installer
- # platform - Machine name
- # sdk_versio= n - SDK Version
- # sdk_name_prefix - SDK name Prefix.
- #
-= # SDK is referred to as ${sdk_name_prefix}-${platform} in the installer- # Ex tisdk-am335x
- # SDK installer is named after ${sdk_name_pre= fix}-${platform}-${sdk_version}-Linux-x86-Install.bin
- # Ex ti-sdk-am= 335x-evm-06.00.00.00-Linux-x86-Install.bin
-
-
- $INSTALL_BU= ILDER/builder build $INSTALL_BUILDER_PROJECT linux --setvars \
- sdk_l= oc=3D"$installer_root/" \
- sdk_name_prefix=3D"${INSTALLER_PREFIX}" \<= br />- sdk_tar_name=3D$sdk_tar \
- output_dir=3D"$deploy_root" \
= - platform=3D"$m" \
- sdk_version=3D"$TISDK_VERSION"
-
- if = [ "$?" !=3D "0" ]
- then
- echo "FAILED" > $LOG_DIR/$m-build-i= nstaller.txt
- return 1
- else
- echo "PASSED" > $LOG_DIR= /$m-build-installer.txt
- fi
-}
-
-package_web_content(= ) {
- # Set m for logging purposes
- m=3D"$1"
-
- # Cre= ate the exports content for the web page
- exports_root=3D"$deploy_roo= t/exports"
-
- if [ -d $exports_root ]
- then
- rm -rf = $exports_root
- fi
- mkdir -p $exports_root
-
- # Copy = the manifest file if it exists. Pull it from the extracted
- # SDK dir= ectory from the test step.
- manifest_file=3D"$TEST_ROOT/$m-test/temp/= docs/software_manifest.htm"
- if [ -e $manifest_file ]
- then
- cp $manifest_file $exports_root/
- else
- echo "Could not pac= kage manifest file"
- echo "FAILED" > $LOG_DIR/$m-web-results.txt- return 1
- fi
-
- # Create the PSP tarballs as well- # First the sources tarball
- cd $TEST_ROOT/$m-test/temp
-- tar --exclude=3Dprebuilt-images -cJf $exports_root/$m-sdk-src-$TISDK_= VERSION.tar.xz board-support/*
-
- if [ "$?" !=3D 0 ]
- then=
- echo "Could not create SDK sources tarball"
- echo "FAILED" &g= t; $LOG_DIR/$m-web-results.txt
- return 1
- fi
-
- # No= w Create the pre-built binaries tarball. Make a temporary directory
- = # to copy contents to here so that we can get the right extraction name.- tmp_dir=3D"$exports_root/${INSTALLER_PREFIX}-$m-bin-${TISDK_VERSION}"<= br />- tmp_dir_bs=3D"$tmp_dir/board-support"
- mkdir -p $tmp_dir_bs-
- cp -rf board-support/prebuilt-images $tmp_dir_bs
- if [ "$= ?" !=3D 0 ]
- then
- echo "Could not copy prebuilt-images"
-= echo "FAILED" > $LOG_DIR/$m-web-results.txt
- return 1
- fi-
- cp -rf filesystem $tmp_dir/
- if [ "$?" !=3D 0 ]
- t= hen
- echo "Could not copy file system tarballs"
- echo "FAILED" = > $LOG_DIR/$m-web-results.txt
- return 1
- fi
-
- cp= -rf bin $tmp_dir/
- if [ "$?" !=3D 0 ]
- then
- echo "Could= not copy bin folder"
- echo "FAILED" > $LOG_DIR/$m-web-results.txt=
- return 1
- fi
-
- # remove scripts which have depend= ency on devkit
- rm $tmp_dir/bin/unshallow-repositories.sh
- rm $= tmp_dir/bin/create-ubifs.sh
-
- # modify create-sdcard.sh to use = the tarball extraction directory
- sed -i -e "s|ti-sdk.*\[0-9\]|${tmp_= dir##*/}|g" $tmp_dir/bin/create-sdcard.sh
-
- # modify setup-targ= et-nfs.sh to get the absolute path when running the scripts
- # 1. rem= ove the line to set up "SDKinstall" with TI_SDK_PATH
- sed -i -e '/^SD= Kinstall/d' $tmp_dir/bin/setup-targetfs-nfs.sh
-
- # 2. add the l= ines before setting dstdefault to get the absolute path of the scripts and = SDKinstall,
- # using the same way as in create-sdcard.sh: PWD=3D`pwd`= ; EXE=3D`echo $0 | sed s=3D$PWD=3D=3D`;
- # EXEPATH=3D"$PWD"/"$EXE"; S= DKinstall=3D`echo $EXEPATH | grep -o .*ti-sdk.*.[0-9]`
- sed -i -e '/d= stdefault=3D$SDKinstall\/targetNFS/i\PWD=3D`pwd`\nEXE=3D`echo $0 | sed s=3D= $PWD=3D=3D`\nEXEPATH=3D"$PWD"/"$EXE"\nSDKinstall=3D`echo $EXEPATH | grep -o= '.*ti-sdk.*.[0-9]'`\n' $tmp_dir/bin/setup-targetfs-nfs.sh
-
- # = 3. use the tarball extraction directory for SDKinstall
- sed -i -e "s|= ti-sdk.*\[0-9\]|${tmp_dir##*/}|g" $tmp_dir/bin/setup-targetfs-nfs.sh
-=
- # create Rules.make with variables to be used from the binary packa= ge
- echo "#platform" >> $tmp_dir/Rules.make
- echo "PLATFO= RM=3D$m" >> $tmp_dir/Rules.make
- echo >> $tmp_dir/Rules.m= ake
-
- echo "#root of the target file system for installing appl= ications" >> $tmp_dir/Rules.make
- echo "DESTDIR=3D__DESTDIR__" = >> $tmp_dir/Rules.make
- echo >> $tmp_dir/Rules.make
= -
- echo "# Set EXEC_DIR to install example binaries" >> $tmp_di= r/Rules.make
- echo "EXEC_DIR=3D__EXEC_DIR__" >> $tmp_dir/Rules.= make
-
- if [ "$?" !=3D 0 ]
- then
- echo "Could not cr= eate Rules.make"
- echo "FAILED" > $LOG_DIR/$m-web-results.txt
- return 1
- fi
-
- cp -f setup.sh $tmp_dir/
- if [ "$= ?" !=3D 0 ]
- then
- echo "Could not copy setup.sh"
- echo "= FAILED" > $LOG_DIR/$m-web-results.txt
- return 1
- fi
-- cd $exports_root
- tar cJf $m-sdk-bin-$TISDK_VERSION.tar.xz ${IN= STALLER_PREFIX}-$m-bin-${TISDK_VERSION}/*
- if [ "$?" !=3D 0 ]
- = then
- echo "Could not create SDK binaries tarball"
- echo "FAILE= D" > $LOG_DIR/$m-web-results.txt
- return 1
- fi
-
-= rm -rf ${INSTALLER_PREFIX}-$m-bin-${TISDK_VERSION}
-
- if [ "$EX= PORT_ARAGO_SRC" =3D=3D "1" ]
- then
- tar -C $DL_DIR -cJf $export= s_root/$m-sdk-arago-src-$TISDK_VERSION.tar.xz .
-
- if [ "$?" != =3D 0 ]
- then
- echo "Could not create arago source tarball"
- echo "FAILED" > $LOG_DIR/$m-web-results.txt
- return 1
- f= i
- fi
-
- # Copy any additional web files that are in the W= EB_EXTRAS_ROOT
- # directory.
- web_extras=3D"$WEB_EXTRAS_ROOT/$m= "
- if [ -d $web_extras ]
- then
- cp -rLf $web_extras/* $ex= ports_root/
- fi
-
- # Move the installer into the exports d= irectory
- mv $deploy_root/${INSTALLER_PREFIX}-$m* $exports_root/
-
- # Create the md5sum file
- cd $exports_root
- md5sum * = > md5sum.txt
-
- # If we got here it means everything else pas= sed
- echo "PASSED" > $LOG_DIR/$m-web-results.txt
-}
--generate_webgen_page() {
- # Set m for logging purposes
- m= =3D"$1"
-
-
- webgen_make=3D"$WEBGEN_MAK_ROOT/$m/webgen.mak= "
-
- if [ ! -e $webgen_make ]
- then
- echo "Could not= find the webgen file for machine $m"
- echo "FAILED" > $LOG_DIR/$m= -web-results.txt
- return 1
- fi
-
- # Create the ti.co= m contents directory
- mkdir -p $deploy_root/ti_com_contents
-- # Copy the webgen file to the deploy directory
- cd $deploy_root<= br />- cp $webgen_make .
-
- # Generate the web page
- $WEBG= EN_ROOT/webgen_ext webgen.mak $deploy_root/ti_com_contents exports
-- # Cleanup the misc webgen files
- cleanup_webgen_page $m
-}=
-
-# The webgen tool does a couple of things like make a symlink= to the exports
-# directory and has a validationinfo file that needs = to be removed before
-# copying. If this is not done then we copy doub= le the files, etc.
-cleanup_webgen_page() {
- m=3D"$1"
-
- content_dir=3D"$deploy_root/ti_com_contents/`grep 'PRODUCT_NAME=3D' $we= bgen_make | sed -e 's/PRODUCT_NAME=3D//g'`/`echo $TISDK_VERSION | tr '.' '_= '`"
-
- # Something went wrong here because I can't find the webg= en content
- if [ ! -d $content_dir ]
- then
- echo "Could n= ot find the $content_dir"
- echo "FAILED" > $LOG_DIR/$m-web-results= .txt
- fi
-
- # Remove the exports symlink and move the real= exports directory into its
- # place
- rm -rf $content_dir/expor= ts
- mv $deploy_root/exports $content_dir/
-
- # Remove the = .validationinfo file
- rm -f $content_dir/.validationinfo
-
= - # Remove the webgen.mak file
- rm -f $deploy_root/webgen.mak
-}=
-
-package_individual_sdk() {
- # Set m for logging purpose= s
- m=3D"$1"
-
- # Make the machine specific deploy root
- deploy_root=3D"$DEPLOY_ROOT/$m/$BUILD_ID"
-
- if [ -d $deploy= _root ]
- then
- rm -rf $deploy_root
- fi
- mkdir -p $d= eploy_root
-
- # Create the SDK installer in the deploy directory=
- create_sdk_installer $m
-
- # Create the SD card tarballs= in the deploy directory
- create_sd_card_content $m
-
- # P= ackage the SD card and web page contents to get ready for
- # generati= ng the webgen page and publishing the SDK
- package_web_content $m
-
- if [ "$?" =3D=3D "0" ]
- then
- # Since the packaging = worked let's generate the ti.com style
- # web page.
- generate_w= ebgen_page $m
- fi
-}
-
-package_sdks(){
- # Build= a list of machines that passed their build and had no
- # CRITICAL fa= ilures. This can be done by looking for the test
- # results file for = each machine. If the test file does not
- # exist then the build faile= d. If it does exist and does not
- # contain the CRITICAL keyword then= we can continue with
- #packaging.
- machines=3D""
-
-= for m in $MACHINES
- do
- if [ -e $LOG_DIR/$m-build-result.txt ]=
- then
- # Check if the build failed
- grep "FAILED" $LOG_D= IR/$m-build-result.txt > /dev/null 2>&1
- if [ "$?" =3D=3D "= 0" ]
- then
- # The build failed so don't package this device
- continue
- fi
-
- # Check the test results
- if [ -= e $LOG_DIR/$m-test-result.txt ]
- then
- # The build at least PAS= SED
- # Check if this was a CRITICAL failure
- grep "CRITICAL" $L= OG_DIR/$m-test-result.txt > /dev/null 2>&1
- if [ "$?" =3D= =3D "0" ]
- then
- # This was a critical failure so return withou= t copying
- # the files
- continue
- fi
-
- # This= was a build with a PASSED, SKIPPED, or non-CRITICAL
- # test result. = Add it to the list of machines to package.
- machines=3D"$machines""$m= "
- fi
- fi
- done
-
- echo "machines =3D $machin= es"
-
- # Now that the have the list of machines we can call the = rest of the
- # package functions in parallel.
- for m in $machin= es
- do
- package_individual_sdk $m &
- done
-
- # Wait for the subprocesses to all finish
- wait
-}
diff = --git a/lib/oesdk/ti-sdk-host-install.sh b/lib/oesdk/ti-sdk-host-install.sh=
deleted file mode 100755
index 0dc1fa2..0000000
--- a/lib/o= esdk/ti-sdk-host-install.sh
+++ /dev/null
@@ -1,227 +0,0 @@
= -# /usr/bin/env bash
-set -x
-#
-# (C) Copyright 2010 Texas = Instrument Inc. All rights reserved.
-#
-# Author: Schuyler Patto= n, Texas Instrunents Inc.
-#
-# Script to install TI SDK on User = Platform
-#
-
-VERSION=3D"1.0"
-
-#
-# Displa= y program usage
-#
-usage()
-{
- echo "
-Usage: `b= asename $1` [options] --machine <machine_name> <install_dir> &l= t;tools_dir_prefix> <dest_dir>
-
- --help Print this hel= p message
-"
- exit 1
-}
-
-#
-# Display vers= ion
-#
-version()
-{
- echo "
-`basename $1`: ver= sion $VERSION
-"
- exit 1
-}
-
-
-#
-# = execute command
-#
-execute ()
-{
- #echo "$*"
- $= *
- if [ $? -ne 0 ]; then
- echo "ERROR: failed to execute $*"- exit 1;
- fi
-}
-
-#
-# update sdk Rules.make=
-#
-update_rules_make()
-{
- echo "Updating Rules.make= "
- echo "$install_dir"
-
- echo "$install_dir">rm_id.out=
- echo "$cross_compile">rm_cc.out
- echo "$cross_compile_dir"= >rm_ccd.out
- echo "$dest_dir">rm_dd.out
-
- sed -i -e= s=3D__SDK__INSTALL_DIR__=3D$install_dir=3D $install_dir/Rules.make
-= sed -i -e s=3D__CROSS_COMPILE__=3D$cross_compile_dir/arm-none-linux-gnueab= i-=3D $install_dir/Rules.make
-
- # Find the linux directory name=
- linux=3D`find $install_dir/board-support -maxdepth 1 -name "linux*"= `
- linux=3D`basename $linux`
- sed -i -e s=3D__KERNEL_NAME__=3D$= linux=3D $install_dir/Rules.make
-
- # Extract toolchain sdk
- $install_dir/linux-devkit.sh -y -d $install_dir/linux-devkit
-
- # Remove toolchain SDK
- rm $install_dir/linux-devkit.sh
-
-# TODO: Unsure about this one here. This likely should change when the-# META_SDK_PATH functionality is put back in.
- echo "Updating pr= efix in libtoolize "
- sed -i -e "s|/arago-2012.10|$install_dir/linux-= devkit|g" \
- $install_dir/linux-devkit/bin/libtoolize
-}
-<= br />-#
-# update example applications CCS project file
-#
-= update_ccs_project()
-{
- cd $install_dir
-
- # Grab so= me essential variables from environment-setup
- TARGET_SYS=3D`sed -n '= s/^export TARGET_SYS=3D//p' linux-devkit/environment-setup`
- TOOLCHAI= N_SYS=3D`sed -n 's/^export TOOLCHAIN_SYS=3D//p' linux-devkit/environment-se= tup`
- SDK_SYS=3D`sed -n 's/^export SDK_SYS=3D//p' linux-devkit/enviro= nment-setup`
-
- # Grab toolchain's GCC version
- GCC_VERSIO= N=3D`ls linux-devkit/sysroots/$SDK_SYS/usr/lib/gcc/$TOOLCHAIN_SYS/`
-<= br />- TOOLCHAIN_TARGET_INCLUDE_DIR=3D"linux-devkit/sysroots/$TARGET_SYS/us= r/include"
- TOOLCHAIN_INCLUDE_DIR=3D"linux-devkit/sysroots/$SDK_SYS/u= sr/lib/gcc/$TOOLCHAIN_SYS/$GCC_VERSION/include"
-
- # Update CCS = project files using important paths to headers
- find ./example-applic= ations -type f -exec sed -i "s|<TOOLCHAIN_TARGET_INCLUDE_DIR>|$TOOLCH= AIN_TARGET_INCLUDE_DIR|g" {} \;
- find ./example-applications -type f = -exec sed -i "s|<TOOLCHAIN_INCLUDE_DIR>|$TOOLCHAIN_INCLUDE_DIR|g" {} = \;
- cd -
-}
-
-#
-# prepare installer tools
-#
-prepare_install ()
-{
- echo "Preparing installation .= .."
- cwd=3D$PWD;
-
- execute "mkdir -p ${install_dir}"
- mkdir -p ${dest_dir}
-
-}
-
-#
-# install sdk-#
-install_sdk ()
-{
- sdk_dir=3D$PWD
- echo "$sd= k_dir">is_sdk_dir.out
- echo "$install_dir">is_id.out
- ech= o "$cross_compile">is_cc.out
- echo "$cross_compile_dir">is_ccd.= out
- echo "$dest_dir">is_dd.out
- echo "$sdk_pkg">is_sdk_p= kg.out
-
-# cp -p ti-sdk-ubuntu-env-setup.sh "$install_dir"
= - echo "Untarring top level SDK $sdk_pkg "
- tar -xf $sdk_pkg -C $ins= tall_dir
- echo "Untarring top level package complete "
-
- = # Remove any .svn directories that were packaged by the sourceipks
- r= m -rf `find $install_dir -name ".svn"`
-
-}
-
-install_= ccs()
-{
-
-# $install_source/CCS/setup*.bin &
--echo "install_ccs is $install_ccs">ccs_iccs.out
-
-if [ "= $install_ccs" =3D "yes" ]; then
- $install_source/ccs_install.sh $inst= all_source &
-fi
-
-}
-
-
-# Process co= mmand line...
-while [ $# -gt 0 ]; do
- case $1 in
- --help = | -h)
- usage $0
- ;;
- --version | -v)
- version $0- ;;
- --sdk_pkg)
- shift;
- sdk_pkg=3D$1;
- ;;
- --install_dir)
- shift;
- install_dir=3D$1;
- ;;
- -= -install_ccs)
- shift;
- install_ccs=3D"yes";
- ;;
- --= install_source)
- shift;
- install_source=3D$1
- ;;
- *= )
- shift;
- ;;
- esac
-done
-
-echo " "
-echo " Called with --machine $machine --sdk_pkg $sdk_pkg --install_dir $i= nstall_dir --cross_compile_dir $cross_compile_dir --cross_compile $cross_co= mpile ">called-w-param.out
-echo " "
-
-echo "$machine"&g= t;machid.out
-echo "$install_dir">id.out
-echo "$cross_compile= ">cc.out
-echo "$cross_compile_dir">ccd.out
-echo "$dest_di= r">dd.out
-echo "$install_source">tmp/tmp_iss.out
-echo "$i= nstall_source">iss.out
-
-# check if install_dir variable is s= et.
-test -z $install_dir && usage $0
-execute "mkdir -p = $install_dir"
-echo "after mkdir ">oops.out
-
-# prepare = installation.
-prepare_install
-echo "after prepare ">oops.out=
-
-# install sdk
-install_sdk
-echo "after install_sdk= ">oops.out
-
-# install CCS
-test -d $install_source/CCS= ;install_ccs
-
-# update rules.make
-update_rules_make
= -
-# Update example applications CCS project files
-update_ccs_pr= oject
-
-echo "Installation completed!"
-
-exit 0
= -
--
2.7.4
--ZYemNER8KOOUpgFfAgPN--