linux运行lpc脚本,linux的shell脚本——中级篇

#!/bin/sh

# This script is released to the Public Domain and was

originally posted to

# the Wiki at http://processors.wiki.ti.com/index.php/Main_Page

and is

# subject to the Disclaimer of that Wiki and is provided "AS IS"

without

# warranty or support of any kind. The disclaimer is re-printed

below.

#

# ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". TI

AND ITS

# RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE

SUITABILITY OF THESE

# MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND

CONDITIONS WITH

# REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL

IMPLIED

# WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A

PARTICULAR

# PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY

INTELLECTUAL PROPERTY

# RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR

OTHERWISE, IS

# GRANTED BY TI. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A

LICENSE

# FROM A THIRD PARTY, OR A LICENSE FROM TI.

# v.110126

#

# DVSDK v.4.01 GA

#

# This script is written to assist beagleboard-xM users with

running DVSDK software on their beagleboard-xM.

# It aims to provide a minimal set of changes required to run the

DVSDK software and is by no means an optimal

# implementation.

#

# TI EVM Platform Support files are replaced with beagle-xM

equivalent versions (utilising the well used and

# maintained patches from the Angstrom Distribution, found inside

Open Embedded). The installer and build

# build scripts are modified to reflect necessary changes to memory

maps, ports and configuration, etc.

#

# Capabilities and Limitations can be found on DVSDK wiki

'Unofficial DVSDK FAQs'

#

# This script should be run once from the root directory of a clean

install of DVSDK.

#

# This script is provided 'as-is'.

#--------------------- Location Check ---------------------

# Simple test to see if script is being run from top of DVSDK

install directory

if [ -e Makefile ] && [ -e Rules.make ]

then

echo

Makefile and Rules.make found... continuing...

else

echo Please

run script from root of DVSDK installation

exit

fi

#--------------------- PSP DIRECTORY ---------------------

# Backup EVM files inside PSP directory and softlink the

'prebuilt-images' (which don't exist yet).

cd psp

mkdir evm

mv linux-2.6.32-psp03.00.01.06 evm

mv u-boot-2009.11-psp03.00.01.06 evm

mv x-load-1.46-psp03.00.01.06 evm

mv prebuilt-images evm

mkdir prebuilt-images

cd prebuilt-images

ln -s ../x-load-beagle/x-load.bin.ift MLO

ln -s ../u-boot-beagle/u-boot.bin

ln -s ../linux-beagle/arch/arm/boot/uImage

cd ..

#--------------------- PROXY SETUP ---------------------

# Comment out these 4 lines if you have direct internet

connection

#PROXYHOST="foo.com"

#PROXYPORT="80"

#export http_proxy="http://${PROXYHOST}:${PROXYPORT}"

#export GIT_PROXY_COMMAND=./git-proxy.sh

# Generate git proxy command config script

#cat > git-proxy.sh <<_eof>

#if [ -x /bin/env ] ; then

# exec

/bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*

#else

# exec

/usr/bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*

#fi

#_EOF

#chmod +x git-proxy.sh

#--------------------- OE COMMIT ---------------------

# Files used in this script are pulled from Open Embedded

repository. This is the lock down tested commit

version.

OECOMMIT="?id=36547ad86a79a62353caac812cb60ecd7d4d1a0f"

#--------------------- X-LOAD ---------------------

# These are the files to build first level loader (x-load)

# Strip off 'file://'

XLOADPATCHESSTRIPPED=$(echo $XLOADPATCHES | sed s!file://!!g)

# Clone the base x-load repository

git clone git://gitorious.org/x-load-omap3/mainline.git

x-load-beagle

cd x-load-beagle

git checkout -b beagle 1c9276af4d6a5b7014a7630a1abeddf3b3177563

# Fetch the patches

mkdir oepatches ; pushd oepatches

for patchfile in ${XLOADPATCHESSTRIPPED} ; do

wget

$XLOADPREFIX/$patchfile

done

popd

# One of the x-load patches doesn't have author header - add

'unknown' author, so that it can be applied

cat > oepatches/header.txt <<_eof>

From: anon

Subject: [PATCH] Change config name

_EOF

sed -i "/From/d" oepatches/name.patch

sed -i "/Subject/d" oepatches/name.patch

cat oepatches/header.txt oepatches/name.patch >

oepatches/temp

cp oepatches/temp oepatches/name.patch

# Apply the patches to the local repository

for patchfile in ${XLOADPATCHESSTRIPPED} ; do

git am oepatches/$patchfile

done

cd ..

#--------------------- U-BOOT ---------------------

# These are the files to build second level loader (u-boot)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值