2012年2月6日 星期一

[Linux Code] run_dgwsdk.sh


#!/bin/bash

TISDK=D3.0_GW-SDK.3.0.0.125

if test -e ./../../ti

then

  echo Build $TISDK ...

else

  echo Decompress $TISDK ...

  unzip ./../TI/$TISDK.zip -d ./../../

fi



##*************************************

if test -e ./../../.config    # if  .config exist then make dgwsdk

then

    cd ../../

    make dgwsdk

else <-- bracket 1

cd ../

rm -fr ./../build/dgwsdk/fs/*



##*****************************************





if [ ! -d "./Source/$TISDK" ]  # if no $TISDK then tar $TISDK.tgz

then

cd Source

tar xzvf $TISDK.tgz

fi



## ********************************************



#Put the file of /Porting/Source/SDK.3.0.0.125/* into ( Top directory )

#This mean some original code no work.

#We patch it.





cd ../

cp -ax ./Source/$TISDK/* ../

cd ..



## ********************************************



## make .config



make defconfig PRODUCT=DGWSDK

make dgwsdk



## ********************************************



# make wifi driver

cd ./wasp/puma5_xmii-ap9.2.0_U6.621/build

make BOARD_TYPE=p5-xmii



## ********************************************



# cd ./../../../ = go to ( top directory )

cd ./../../../build/dgwsdk/fs/base_fs/sbin

ln -s /usr/www/cgi-bin/cgiMain cfg



## ********************************************



cd ..    # cd .. = ( top directory )/build/dgwsdk/fs/base_fs

if [ ! -d "./tmp" ]

then

ln -s /var/tmp tmp  # if no ./tmp this directory then link to /var/tmp

fi



## ********************************************

cd ../../../../  # go to ( top directory )

cp -ax ./Porting/Source/$TISDK/build/dgwsdk/fs/base_fs/etc/ath ./build/dgwsdk/fs/base_fs/etc/

make gw_bin # Some gateway change

make filesystem

chmod 777 -R *

fi  <--- bracket 1



## ********************************************



#check lighttpd if no this folder then mkdir one



cd ./build/dgwsdk/fs/gw/etc

if [ ! -d "./lighttpd" ]

then

mkdir -p ./lighttpd/ssl/domain.com/

cd lighttpd/ssl/domain.com/

else

cd lighttpd/ssl/domain.com/

fi



## ********************************************



## Create one new key

openssl req -new -x509 -keyout server.pem -out server.pem -days 3650 -nodes  -subj '/C=TW/O=UBEE/L=Taipei/CN=www.ubeeinteractive.com/'



## ********************************************



# make filesystem again

cd ../../../../../../../../

make filesystem

0 意見:

張貼留言