Skip to content

Commit

Permalink
add update ttyUSB and nand flash scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
tlhc committed Feb 7, 2014
1 parent 0c7fb05 commit f185660
Show file tree
Hide file tree
Showing 6 changed files with 180 additions and 0 deletions.
29 changes: 29 additions & 0 deletions Tkermit
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash -
#===============================================================================
#
# FILE: Tkermit.sh
#
# USAGE: ./Tkermit.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: tongl (),
# ORGANIZATION:
# CREATED: 2014年01月16日 13时18分30秒 CST
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error


port=`ls /dev | grep USB | awk -F "USB" '{print $2}'`

file="/home/mars/.kermrc"
#sed -n '/USB/' -p $file
sed -i "s/USB[0-9]/USB$port/" $file

echo "update usb success"
45 changes: 45 additions & 0 deletions cscopeGen/cscGen
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
#!/bin/bash -
#===============================================================================
#
# FILE: find_cscopeF.sh
#
# USAGE: ./find_cscopeF.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: tongl (),
# ORGANIZATION:
# CREATED: 2014年01月07日 11时23分40秒 CST
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error

rm ./cscope.files
if [ $? -eq 0 ] ; then
echo "rm success"
else
echo "no pre cscope.files!! will Gen one for you!!!"
fi

sudo find ./ -iname "*.c" -o -iname "*.h" -o -iname "*.cc" -o -iname "*.hh" -o -iname "*.hpp" -o -iname "*.cpp" -o -iname "*.java" -o -iname "*.cs" -o -iname "*.js" -o -iname "*.py" -o -iname "*.rb" -o -iname "*.sh" -o -iname "*.lua" > cscope.files

if [ $? -eq 0 ] ; then
echo "find cscope.files success"
else
exit
fi

echo "start Gen cscope database....."

sudo cscope -bq -i ./cscope.files

sudo chmod a+rw ./cscope.files
sudo chmod a+rw ./cscope.in.out
sudo chmod a+rw ./cscope.out
sudo chmod a+rw ./cscope.po.out
echo "Gen success!! enjoryyyyyyyyy!"
1 change: 1 addition & 0 deletions nandscripts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
erase nand flash and erase nand flash scripts
43 changes: 43 additions & 0 deletions nandscripts/ef_nand
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/bin/bash -
#===============================================================================
#
# FILE: ef_nand.sh
#
# USAGE: ./ef_nand.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: tongl (),
# ORGANIZATION:
# CREATED: 2014年01月16日 13时05分56秒 CST
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error


if [ "$1" = "n" ] || [ "$1" = "o" ] ; then
port=`ls /dev | grep USB | awk -F "USB" '{print $2}'`

if [ $port -eq 0 ] || [ $port -eq 1 ] ; then
erase_nand $port $1
sleep 1
flash_nand $port $1
echo "------------------------------>>>SSSSSUUUUCCCCEEESSSS!!!!!"
else
echo "no para"
fi

else
echo "you must sel the val o or n"
fi






29 changes: 29 additions & 0 deletions nandscripts/erase_nand
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash -
#===============================================================================
#
# FILE: erase_nand.sh
#
# USAGE: ./erase_nand.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: tongl (),
# ORGANIZATION:
# CREATED: 2014年01月16日 12时58分41秒 CST
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error

if [ $1 -eq 0 ] || [ $1 -eq 1 ] ; then
if [ "$2" = "n" ] || [ "$2" = "o"] ; then
sudo ~/low_work/APPRO/dm36x/sfh_DM36x.exe -nanderase -p /dev/ttyUSB$1
fi
else
echo "oh shit you foget it"
fi

33 changes: 33 additions & 0 deletions nandscripts/flash_nand
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash -
#===============================================================================
#
# FILE: flash_nand.sh
#
# USAGE: ./flash_nand.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: tongl (),
# ORGANIZATION:
# CREATED: 2014年01月16日 13时00分55秒 CST
# REVISION: ---
#===============================================================================

set -o nounset # Treat unset variables as an error



if [ $1 -eq 0 ] || [ $1 -eq 1 ] ; then
if [ "$2" = "n" ] ; then
sudo ~/low_work/APPRO/dm36x/sfh_DM36x.exe -nandflash ~/low_work/DaVinci-PSP-SDK-03.21.00.04/images/boot-strap/serial_flash/dm36x/ubl_DM36x_ARM432_DDR340_OSC24_NAND.bin ~/ACHIVE/u-boot.bin -p /dev/ttyUSB$1
else if [ "$2" = "o" ] ; then
sudo ~/low_work/APPRO/dm36x/sfh_DM36x.exe -nandflash ~/low_work/DaVinci-PSP-SDK-03.21.00.04/images/boot-strap/serial_flash/dm36x/ubl_DM36x_ARM432_DDR340_OSC24_NAND.bin ~/low_work/DaVinci-PSP-SDK-03.21.00.04/images/u-boot/dm36x/u-boot.bin -p /dev/ttyUSB$1
fi
fi
else
echo "no para"
fi

0 comments on commit f185660

Please sign in to comment.