Commits

Thayne Harbaugh  committed 4843b96

change TI_INSTALL_DIR to TI_DVSDK_DIR and export it for use by other scripts.

  • Participants
  • Parent commits 2357490

Comments (0)

Files changed (1)

File ti-setup-dvsdk

 LINARO_EXE=
 CROSS_COMPILE=
 
-TI_INSTALL_DIR=
+TI_DVSDK_DIR=
 TI_ENV_SH=
 OE_DIR=
 CGTOOLS_V5T=
 continue: \[y/N\] "
 send -- "Y\r"
 expect -exact "Destination Folder: \[$HOME/dvsdk\] "
-send -- "$TI_INSTALL_DIR/dvsdk\r"
+send -- "$TI_DVSDK_DIR/dvsdk\r"
 expect -exact "CodeSourcery Toolchain Directory \[/codesourcery/arm-2009q1\] "
 send -- "$CGTOOLS_V5T\r"
 expect -exact "PSP SDK Install Directory\r\r
 \[/Arago/arago-install/AM35x-OMAP35x-PSP-SDK-03.00.01.06\] "
-send -- "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06\r"
+send -- "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06\r"
 expect -exact "Linux Kernel Install Directory\r\r
 \[\\\$(OMAP3503_SDK_INSTALL_DIR)/src/kernel/linux-03.00.01.06\] "
-send -- "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/kernel/linux-03.00.01.06\r"
+send -- "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/kernel/linux-03.00.01.06\r"
 expect -exact "UBoot Install Directory\r\r
 \[\\\$(OMAP3503_SDK_INSTALL_DIR)/src/u-boot/u-boot-03.00.01.06\] "
-send -- "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/u-boot/u-boot-03.00.01.06\r"
+send -- "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/u-boot/u-boot-03.00.01.06\r"
 expect -exact "Codec Server Install Directory \[\\\$(DVSDK_INSTALL_DIR)/cs1omap3530_1_01_00\] "
-send -- "$TI_INSTALL_DIR/dvsdk/dvsdk_3_01_00_10/cs1omap3530_1_01_00\r"
+send -- "$TI_DVSDK_DIR/dvsdk/dvsdk_3_01_00_10/cs1omap3530_1_01_00\r"
 expect -exact "TI C6x Codegen Installation Directory \[/Arago/TI/TI_CGT_C6000_6.1.12\] "
-send -- "$TI_INSTALL_DIR/TI_CGT_C6000_6.1.12\r"
+send -- "$TI_DVSDK_DIR/TI_CGT_C6000_6.1.12\r"
 expect -exact "Target Root Filesystem Directory \[\\\$(HOME)/workdir/filesys\] "
-send -- "$TI_INSTALL_DIR/workdir/filesys\r"
+send -- "$TI_DVSDK_DIR/workdir/filesys\r"
 expect eof
 EOF
 
     if [ -n "$OE_DIR" -o -n "$LINARO_EXE" ]; then
-        find "$TI_INSTALL_DIR" \
+        find "$TI_DVSDK_DIR" \
             \( \
             -name Makefile \
             -o -name \*.mk \
             \) -print0 \
             | xargs -0 sed -i -e "s/$CGT_BINPREFIX/${CROSS_COMPILE%-}/g;"
 
-            #"$TI_INSTALL_DIR/$dvsdk_install_subdir/Rules.make" \
-            #"$TI_INSTALL_DIR/$dvsdk_install_subdir/codec_engine_2_25_02_11/examples/xdcpaths.mak"
+            #"$TI_DVSDK_DIR/$dvsdk_install_subdir/Rules.make" \
+            #"$TI_DVSDK_DIR/$dvsdk_install_subdir/codec_engine_2_25_02_11/examples/xdcpaths.mak"
     fi
 
     # Fix warning in source
     (
-        cd "$TI_INSTALL_DIR/dvsdk/dvsdk_3_01_00_10"
+        cd "$TI_DVSDK_DIR/dvsdk/dvsdk_3_01_00_10"
         patch -p1 <<EOF
 --- dvsdk_3_01_00_10.orig/dmai_2_05_00_12/packages/ti/sdo/dmai/linux/Display_fbdev.c	2011-04-11 23:50:54.871885186 -0600
 +++ dvsdk_3_01_00_10/dmai_2_05_00_12/packages/ti/sdo/dmai/linux/Display_fbdev.c	2011-04-11 23:50:41.384211532 -0600
     )
 
     cat <<EOF >>"$TI_ENV_SH"
-export DVSDK_INSTALL_DIR="\${TI_INSTALL_DIR}/$dvsdk_install_subdir"
+export DVSDK_INSTALL_DIR="\${TI_DVSDK_DIR}/$dvsdk_install_subdir"
 EOF
 }
 
 send -- "Y\r"
 expect -exact "Where do you want to install C6000 Code Generation Tools?\r\r
 \[/opt/TI/TI_CGT_C6000_6.1.12\] "
-send -- "$TI_INSTALL_DIR/TI_CGT_C6000_6.1.12\r"
+send -- "$TI_DVSDK_DIR/TI_CGT_C6000_6.1.12\r"
 expect -exact "-- Press space to continue --"
 send -- " "
 expect -exact "-- Press space to continue --"
 EOF
 
     cat <<EOF >>"$TI_ENV_SH"
-export CGTOOLS_C64P="\${TI_INSTALL_DIR}/TI_CGT_C6000_6.1.12"
+export CGTOOLS_C64P="\${TI_DVSDK_DIR}/TI_CGT_C6000_6.1.12"
 export CGTOOLS_C674="\${CGTOOLS_C64P}"
 export C6000_C_DIR="\${CGTOOLS_C64P}/include;\${CGTOOLS_C64P}/lib"
 export CGTOOLS_V5T="${CGTOOLS_V5T}"
     local file="$1"
 
     [ -n "$DEBUG" ] || set -x
-    mkdir -p "$TI_INSTALL_DIR/dvsdk/dvsdk_3_01_00_10/clips/"
-    tar -C "$TI_INSTALL_DIR/dvsdk/dvsdk_3_01_00_10/clips/" -xf "$file"
+    mkdir -p "$TI_DVSDK_DIR/dvsdk/dvsdk_3_01_00_10/clips/"
+    tar -C "$TI_DVSDK_DIR/dvsdk/dvsdk_3_01_00_10/clips/" -xf "$file"
     [ -n "$DEBUG" ] || set +x
 }
 
 send -- "Y\r"
 expect -exact "Where do you want to install Texas Instruments CS1OMAP3530 Codec Server?\r\r
 \[$HOME/dvsdk/dvsdk_3_01_00_10\] "
-send -- "$TI_INSTALL_DIR/dvsdk/dvsdk_3_01_00_10\r"
+send -- "$TI_DVSDK_DIR/dvsdk/dvsdk_3_01_00_10\r"
 expect eof
 EOF
 }
     local file="$1"
 
     [ -n "$DEBUG" ] || set -x
-    tar -C "$TI_INSTALL_DIR" -xf "$file"
+    tar -C "$TI_DVSDK_DIR" -xf "$file"
     (
-        cd "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/kernel"
+        cd "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/kernel"
         tar -xf linux-03.00.01.06.tar.gz
-        cd "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/u-boot"
+        cd "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/u-boot"
         tar -xf u-boot-03.00.01.06.tar.gz
-        cd "$TI_INSTALL_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/examples"
+        cd "$TI_DVSDK_DIR/AM35x-OMAP35x-PSP-SDK-03.00.01.06/src/examples"
         tar -xf examples.tar.gz
     )
     [ -n "$DEBUG" ] || set +x
 send -- "Y\r"
 expect -exact "Where do you want to install c64plus-dsplib?\r\r
 \[$HOME/c64plus-dsplib_2_02_00_00\] "
-send -- "$TI_INSTALL_DIR/dsplib_v210\r"
+send -- "$TI_DVSDK_DIR/dsplib_v210\r"
 expect eof
 EOF
 
     # Fix silly Windows path separator and install dsplib files.
     sed \
         -e '/include/s%\\%/%g;' \
-        "$TI_INSTALL_DIR/dsplib_v210/include/dsplib64plus.h" \
-        >"$TI_INSTALL_DIR/TI_CGT_C6000_6.1.12/include/dsplib64plus.h"
+        "$TI_DVSDK_DIR/dsplib_v210/include/dsplib64plus.h" \
+        >"$TI_DVSDK_DIR/TI_CGT_C6000_6.1.12/include/dsplib64plus.h"
 
-    rsync -a --delete "$TI_INSTALL_DIR/dsplib_v210/src/" "$TI_INSTALL_DIR/TI_CGT_C6000_6.1.12/src/"
-    cp "$TI_INSTALL_DIR/dsplib_v210/lib/dsplib64plus.lib" "$TI_INSTALL_DIR/TI_CGT_C6000_6.1.12/lib/"
+    rsync -a --delete "$TI_DVSDK_DIR/dsplib_v210/src/" "$TI_DVSDK_DIR/TI_CGT_C6000_6.1.12/src/"
+    cp "$TI_DVSDK_DIR/dsplib_v210/lib/dsplib64plus.lib" "$TI_DVSDK_DIR/TI_CGT_C6000_6.1.12/lib/"
 }
 
 
 expect -exact "Continue? \[n/Y\] "
 send -- "Y\r"
 expect -exact "Where do you want to install IQmath? \[$HOME/IQmath\] "
-send -- "$TI_INSTALL_DIR/IQmath_v213\r"
+send -- "$TI_DVSDK_DIR/IQmath_v213\r"
 expect eof
 EOF
 }
     # Make symlinks for the toolchain
     local tool=
     local linaro_exe_prefix="${LINARO_EXE%-gcc*}-"
-    mkdir -p "$TI_INSTALL_DIR/xdir/bin"
+    mkdir -p "$TI_DVSDK_DIR/xdir/bin"
     for tool in $BUILD_TOOLS; do
-        ln -s "${linaro_exe_prefix}$tool" "$TI_INSTALL_DIR/xdir/bin/$CROSS_COMPILE$tool"
+        ln -s "${linaro_exe_prefix}$tool" "$TI_DVSDK_DIR/xdir/bin/$CROSS_COMPILE$tool"
     done
 
     # Collect development libraries and headers
-    fakeroot tar -C "$TI_INSTALL_DIR" -x -z -f "$file"
-    mv "$TI_INSTALL_DIR/binary/usr/include" "$TI_INSTALL_DIR/xdir/include"
-    mv "$TI_INSTALL_DIR/binary/usr/lib" "$TI_INSTALL_DIR/xdir/lib"
-    rsync -rv "$TI_INSTALL_DIR/binary/lib/" "$TI_INSTALL_DIR/xdir/lib/"
+    fakeroot tar -C "$TI_DVSDK_DIR" -x -z -f "$file"
+    mv "$TI_DVSDK_DIR/binary/usr/include" "$TI_DVSDK_DIR/xdir/include"
+    mv "$TI_DVSDK_DIR/binary/usr/lib" "$TI_DVSDK_DIR/xdir/lib"
+    rsync -rv "$TI_DVSDK_DIR/binary/lib/" "$TI_DVSDK_DIR/xdir/lib/"
     # Fix-up symlinks
     local link=
     local target=
-    find "$TI_INSTALL_DIR/xdir/lib" -type l | while read link; do
+    find "$TI_DVSDK_DIR/xdir/lib" -type l | while read link; do
         target="$(readlink "$link")"
         local strip="${target#/lib/arm-linux-gnueabi/}"
         if [ "$strip" = "$target" ]; then
         fi
         ln -sf "$strip" "$link"
     done
-    rm -rf "$TI_INSTALL_DIR/binary"
+    rm -rf "$TI_DVSDK_DIR/binary"
 }
 
 
 fetch_files()
 {
     local dl_info=
-    local dl_dir="$TI_INSTALL_DIR/download"
+    local dl_dir="$TI_DVSDK_DIR/download"
     mkdir -p "$dl_dir"
 
     for dl_info in $FETCH_FILES; do
     # Clean out old files - but save the downloads since they take time to fetch
     printf "Deleting old files . . .\n"
     local rm_file=
-    ls -A -I download "$TI_INSTALL_DIR" \
+    ls -A -I download "$TI_DVSDK_DIR" \
         | while read rm_file; do
-        rm -rf "$TI_INSTALL_DIR/$rm_file"
+        rm -rf "$TI_DVSDK_DIR/$rm_file"
     done
 }
 
     fi
 
     cat <<EOF >"$TI_ENV_SH"
-TI_INSTALL_DIR="$TI_INSTALL_DIR"
+export TI_DVSDK_DIR="$TI_DVSDK_DIR"
 export CROSS_COMPILE=$CROSS_COMPILE
 EOF
 
     while getopts "d:Dhl:o:tu:xy" opt_name; do
         case "$opt_name" in
             (D) DOWNLOAD_ONLY="y" ;;
-            (d) TI_INSTALL_DIR="$OPTARG" ;;
+            (d) TI_DVSDK_DIR="$OPTARG" ;;
             (h) usage; exit 0 ;;
             (l) LINARO_EXE="$OPTARG" ;;
             (o) OE_DIR="$OPTARG" ;;
     done
 
     # Verify settings
-    if [ -z "$TI_INSTALL_DIR" ]; then
+    if [ -z "$TI_DVSDK_DIR" ]; then
         printf "ERROR: install directory (argument \"-d\") must be specified.\n" >&2
         exit 1
     fi
 
     # Resolve the absolute install path
-    mkdir -p "$TI_INSTALL_DIR"
-    TI_INSTALL_DIR="$(cd "$TI_INSTALL_DIR" && pwd)"
-    TI_ENV_SH="$TI_INSTALL_DIR/environment.sh"
+    mkdir -p "$TI_DVSDK_DIR"
+    TI_DVSDK_DIR="$(cd "$TI_DVSDK_DIR" && pwd)"
+    TI_ENV_SH="$TI_DVSDK_DIR/environment.sh"
 
     # Verify OE_DIR
     if [ -n "$OE_DIR" ]; then
     elif [ -n "$LINARO_EXE" ]; then
         local linaro_basename="$(basename "$LINARO_EXE")"
         CROSS_COMPILE="${linaro_basename%-gcc*}-"
-        CGTOOLS_V5T="$TI_INSTALL_DIR/xdir"
+        CGTOOLS_V5T="$TI_DVSDK_DIR/xdir"
     else
         CROSS_COMPILE="$CGT_BINPREFIX-"
-        CGTOOLS_V5T="$TI_INSTALL_DIR/codesourcery/arm-2009q1"
+        CGTOOLS_V5T="$TI_DVSDK_DIR/codesourcery/arm-2009q1"
     fi
 
     setup_ti_dir
     fetch_files
 
     if [ -n "$OE_DIR" -o -n "$LINARO_EXE" ]; then
-        find "$TI_INSTALL_DIR" \
+        find "$TI_DVSDK_DIR" \
             \( \
             -name Makefile \
             -o -name \*.bld \
             \) -print0 \
             | xargs -0 sed -i -e "s/$CGT_BINPREFIX/$CROSS_COMPILE/g;"
 
-            #"$TI_INSTALL_DIR/$dvsdk_install_subdir/Rules.make" \
-            #"$TI_INSTALL_DIR/$dvsdk_install_subdir/codec_engine_2_25_02_11/examples/xdcpaths.mak"
+            #"$TI_DVSDK_DIR/$dvsdk_install_subdir/Rules.make" \
+            #"$TI_DVSDK_DIR/$dvsdk_install_subdir/codec_engine_2_25_02_11/examples/xdcpaths.mak"
     fi
 
     test_install