ti processor sdk linux am335x evm /bin/setup-package-install.sh hacking
#!/bin/sh #
# ti processor sdk linux am335x evm /bin/setup-package-install.sh hacking
# 说明:
# 本文主要对TI的sdk中的setup-package-install.sh脚本进行解读,是为了了解
# 其工作机制。
#
# -- 深圳 南山平山村 曾剑锋 # This distribution contains contributions or derivatives under copyright
# as follows:
#
# Copyright (c) , Texas Instruments Incorporated
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# - Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# - Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# 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 IS PROVIDED BY THE COPYRIGHT HOLDERS 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 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, 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 WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cwd=`dirname $`
. $cwd/common.sh entry_header() {
cat << EOF
-------------------------------------------------------------------------------
setup package script
This script will make sure you have the proper host support packages installed
This script requires administrator priviliges (sudo access) if packages are to be installed.
-------------------------------------------------------------------------------
EOF
} exit_footer() {
cat << EOF
--------------------------------------------------------------------------------
Package verification and installation successfully completed
--------------------------------------------------------------------------------
EOF
} cwd=`dirname $`
. $cwd/common.sh entry_header packages_to_install="xinetd tftpd nfs-kernel-server minicom build-essential libncurses5-dev autoconf automake" get_host_type host # Starting with Ubuntu 14.04 the package name for uboot-mkimage has changed
# to u-boot-tools if [ "$host" = "trusty" ]; then
packages_to_install="$packages_to_install u-boot-tools"
else
packages_to_install="$packages_to_install uboot-mkimage" fi cmd="sudo apt-get install " # 合成需要安装的工具包
# Check and only install the missing packages
for i in $packages_to_install; do
is_it_installed=`dpkg-query -l $i >/dev/null`
if [ "$?" -ne "" ]; then
needs_installation=`echo $needs_installation`" "$i
new_cmd=`echo $cmd`" "$i # 每次将需要安装的包加载当前的cmd字符串后面
cmd=$new_cmd
fi
done if [ "$needs_installation" = "" ]; then
echo "System has required packages!"
else
echo "System requires packages $needs_installation to be installed" echo "Installation requires you to have 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;
do
read -p "Type 'y' to continue or 'n' to exit the installation: " REPLY
if [ "$REPLY" = 'y' -o "$REPLY" = 'n' ]; then
break;
fi
done if [ "$REPLY" = 'n' ]; then
echo "Installation is aborted by user"
exit
fi # 执行并安装程序
echo "Performing $cmd"
$cmd
check_status
fi
# Print the exit statement to the console
exit_footer
ti processor sdk linux am335x evm /bin/setup-package-install.sh hacking的更多相关文章
- ti processor sdk linux am335x evm /bin/setup-uboot-env.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-uboot-env.sh hacking # 说明: # 本文主要对TI的sdk中 ...
- ti processor sdk linux am335x evm /bin/setup-minicom.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-minicom.sh hacking # 说明: # 本文主要对TI的sdk中的s ...
- ti processor sdk linux am335x evm /bin/setup-targetfs-nfs.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-targetfs-nfs.sh hacking # 说明: # 本文主要对TI的s ...
- ti processor sdk linux am335x evm /bin/commom.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/commom.sh hacking # 说明: # 本文主要对TI的sdk中的common.s ...
- ti processor sdk linux am335x evm /bin/setup-host-check.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-host-check.sh hacking # 说明: # 本文主要对TI的sdk ...
- ti processor sdk linux am335x evm /bin/create-sdcard.sh hacking
#!/bin/bash # # ti processor sdk linux am335x evm /bin/create-sdcard.sh hacking # 说明: # 本文主要对TI的sdk中 ...
- ti processor sdk linux am335x evm /bin/unshallow-repositories.sh hacking
#!/bin/bash # # ti processor sdk linux am335x evm /bin/unshallow-repositories.sh hacking # 说明: # 本文主 ...
- ti processor sdk linux am335x evm /bin/setup-tftp.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm /bin/setup-tftp.sh hacking # 说明: # 本文主要对TI的sdk中的setu ...
- ti processor sdk linux am335x evm setup.sh hacking
#!/bin/sh # # ti processor sdk linux am335x evm setup.sh hacking # 说明: # 本文主要对TI的sdk中的setup.sh脚本进行解读 ...
随机推荐
- c++ read
#include <fstream> #include <iostream> int main(void) { ] = {}; ; std::ifstream read(&qu ...
- java.util.ConcurrentModificationException 解决办法(转)
今天在项目的中有一个需求,需要在一个Set类型的集合中删除满足条件的对象,这时想当然地想到直接调用Set的remove(Object o)方法将指定的对象删除即可,测试代码: public cla ...
- 输入一个递增排序的数组和一个数字S,在数组中查找两个数,使得他们的和正好是S,如果有多对数字的和等于S,输出两个数的乘积最小的。
// test20.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iostream> #include< ...
- pom配置进行版本号统一管理
在pom.xml中配置 <properties>在该配置中添加 <project.build.sourceEncoding>UTF-8</project.build. ...
- CSS属性--过渡(transtion)
首先介绍一下transition的属性取值: transition-property : 主要设置对象中的参与过渡的属性,包括(border-color,background-color,color) ...
- JavaScript 函数参数是传值(byVal)还是传址(byRef)?
对于“JavaScript 函数参数是传值(byVal)还是传址(byRef)”这个问题,普遍存在一个误区:number,string等“简单类型”是传值,Number, String, Object ...
- iscsi 操作备忘
#查找iscsi节点 iscsiadm -m discovery -t st -p 192.168.20.225 #列出可用节点 iscsiadm -m node -T iqn.com.exapmle ...
- oracle 表空间 用户
Oracle创建表空间.创建用户以及授权.查看权限 创建临时表空间 CREATE TEMPORARY TABLESPACE test_temp TEMPFILE 'C:\oracle\product\ ...
- 配置sql server2012属性 ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.zh-CHS/s10de_5techref/html/6df812ad-4d80-4503-8a23-47719ce85624.htm
服务与服务器是两个不同的概念,服务器是提供服务的计算机,配置服务器主要是对内存.处理器.安全性等几个方面配置.由于SQL Server 2005服务器的设置参数比较多,这里选一些比较常用的介绍. 配置 ...
- orale内置函数COALESCE和GREATEST和LEAST
1. COALESCE 返回该表达式列表的第一个非空value. 格式: COALESCE(value1, value2, value3, ...) 含义: 返回value列表第一个非空的值. val ...