#!/bin/SH# # TI processor SDK Linux am335x EVM/bin/setup-package-Install.SHhacking# Description: # This article mainly on the TI SDK in the setup-package-InstallThe . Sh script is interpreted in order to understand # its working mechanism. ## .-4- -Shenzhen Nanshan Ping Shan Village Zengjianfeng # This distribution contains contributions or derivatives under copyright# as follows:## Copyright (c) /c10> ., Texas Instruments incorporated# All rights reserved.## redistribution and useinchsource and binary forms, with or without# modification, is permitted provided that the following conditions# is met :# -redistributions of source code must retain the above copyright notice,# this list of conditions and the following D isclaimer.#-Redistributionsinchbinary form must reproduce the above copyright# notice, this list of conditions and the following disclaimerinchthe# Documentation and/or other materials provided with the distribution.#-Neither the name of Texas Instruments nor the names of its# contributors may be used to endorse or promote products derived# from this software without specific prior written permission.## This software are provided by the COPYRIGHT HOL DERs and contributors#" as is"and any EXPRESS OR implied warranties, including, but not limited# to, the implied warranties of merchantability and FITNESS for A particular# PURPOSE is disclaimed. In NO EVENT shall the COPYRIGHT HOLDER or# CONTRIBUTORS being liable for any DIRECT, INDIRECT, incidental, special,# exemplar Y, or consequential damages (including, but not LIMITED to,# procurement of substitute GOODS OR SERVICES; LOSS of Use, DATA, or# profits; or business interruption) however caused and on any theory of# liability, WHETHER in contract, STRICT liability, OR TORT ( including negligence# OR OTHERWISE) arising in any-out-of-the---the-software, even if# advised of the Possibilit Y of SUCH DAMAGE.CWD=`dirname$0'. $CWD/common.SHEntry_header () {Cat<<EOF-------------------------------------------------------------------------------Setup Package Scriptthis script would MakeSure you has the proper host support Packages Installedthis script requires Administrator priviliges (sudoAccessifPackages is to be installed.-------------------------------------------------------------------------------Eof}exit_footer () {Cat<<EOF--------------------------------------------------------------------------------Package verification and installation successfully completed--------------------------------------------------------------------------------EOF}CWD=`dirname$0'. $CWD/common.SHEntry_headerpackages_to_install="xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev autoconf automake"Get_host_type host# starting with Ubuntu14.04The package name foruboot-mkimage have changed# to u-boot-Toolsif["$host"="Trusty"]; ThenPackages_to_install="$packages _to_install u-boot-tools"ElsePackages_to_install="$packages _to_install uboot-mkimage"ficmd="sudo apt-get install"# Compositing requires a kit to be installed # Check and onlyInstallThe missing packages forIinch$packages _to_install; Dois_it_installed= ' Dpkg-query-l $i2>/dev/NULL` if["$?"-ne"0"]; Thenneeds_installation=`Echo$needs _installation '" "$i New_cmd=`Echo$cmd '" "$i # Load the current CMD string to the next cmd after each package will need to be installed=$new _cmdfi Doneif["$needs _installation"=""]; Then Echo "System has required packages!"Else Echo "System requires packages $needs _installation to be installed" Echo "installation requires you administrator priviliges (sudo access)" Echo "On your host. Do you have administrator privilieges?"# Force the user to answer. Maybe the user does not want to continue while true; DoRead-P"Type ' y ' to continue or ' n ' to exit the installation:"REPLYif["$REPLY"='y'-O"$REPLY"='N']; ThenBreak ; fi Done if["$REPLY"='N']; Then Echo "installation is aborted by user"Exit1 fi# Execute and install the programEcho "performing $cmd"$cmd Check_statusfi# Print The exit statement to the Consoleexit_footer
TI Processor SDK Linux am335x evm/bin/setup-package-install.sh hacking