Skip to content

Commit e8a29d2

Browse files
author
Xiangfu Liu
committedSep 7, 2011
flash.sh make parameters more flexible
1 parent 575e581 commit e8a29d2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed
 

‎flash/flash.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
1-
#!/bin/sh
1+
#!/bin/bash
22

33
set -e
44

55
ADDRESS=0x920000
6-
if [ "$1" == "rescue" ]; then
6+
if [ "$1" == "rescue" ] || [ "$2" == "rescue" ]; then
77
ADDRESS=0x2E0000
88
fi
99

10-
TARGET=flickernoise.fbiz
11-
if [ "$2" == "nocompress" ]; then
12-
TARGET=flickernoise.fbi
10+
TARGET=flickernoise.fbi
11+
if [ "$2" == "compress" ] || [ "$1" == "compress" ] ; then
12+
TARGET=flickernoise.fbiz
1313
fi
1414

1515
make -C ../src bin/${TARGET}
1616

1717
BATCH_FILE=`mktemp`
1818
cat > ${BATCH_FILE}<<EOF
19+
1920
cable milkymist
2021
detect
2122
instruction CFG_OUT 000100 BYPASS
@@ -27,7 +28,11 @@ detectflash 0
2728
endian big
2829
flashmem ${ADDRESS} ../src/bin/${TARGET} noverify
2930
pld reconfigure
31+
3032
EOF
3133

3234
jtag -n ${BATCH_FILE}
35+
more ${BATCH_FILE}
3336
rm -f ${BATCH_FILE}
37+
38+
echo "Done"

0 commit comments

Comments
 (0)
Please sign in to comment.