forked from tlhc/SMK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add update ttyUSB and nand flash scripts
- Loading branch information
Showing
6 changed files
with
180 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
erase nand flash and erase nand flash scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |