Skip to content

Commit

Permalink
flash.sh make parameters more flexible
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiangfu Liu committed Sep 7, 2011
1 parent 575e581 commit e8a29d2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions flash/flash.sh
@@ -1,21 +1,22 @@
#!/bin/sh
#!/bin/bash

set -e

ADDRESS=0x920000
if [ "$1" == "rescue" ]; then
if [ "$1" == "rescue" ] || [ "$2" == "rescue" ]; then
ADDRESS=0x2E0000
fi

TARGET=flickernoise.fbiz
if [ "$2" == "nocompress" ]; then
TARGET=flickernoise.fbi
TARGET=flickernoise.fbi
if [ "$2" == "compress" ] || [ "$1" == "compress" ] ; then
TARGET=flickernoise.fbiz
fi

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

BATCH_FILE=`mktemp`
cat > ${BATCH_FILE}<<EOF
cable milkymist
detect
instruction CFG_OUT 000100 BYPASS
Expand All @@ -27,7 +28,11 @@ detectflash 0
endian big
flashmem ${ADDRESS} ../src/bin/${TARGET} noverify
pld reconfigure
EOF

jtag -n ${BATCH_FILE}
more ${BATCH_FILE}
rm -f ${BATCH_FILE}

echo "Done"

0 comments on commit e8a29d2

Please sign in to comment.