Skip to content

Commit 80474b5

Browse files
author
Xiangfu Liu
committedMar 5, 2012
reflash_m1.sh update the --data parameter when use --qi
1 parent 5162de6 commit 80474b5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed
 

‎scripts/reflash_m1.sh

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# version of me
4-
__VERSION__="2012-03-01"
4+
__VERSION__="2012-03-05"
55
echo -e "File name: $0\t version: ${__VERSION__}"
66

77

@@ -37,8 +37,8 @@ call-help() {
3737
PARTITION: standby soc bios splash flickernoise
3838
--bios-mac XX XX 'XX' 'XX' is the last MAC address
3939
--rc3 XX XX used in factory flash, reflash all partitions
40-
--qi [VERSION] [data] by default it will download the latest qi release
41-
CAUTION: if 'data' enable, it will REFLASH DATA PARTITION
40+
--qi [VERSION] [--data] by default it will download the latest qi release
41+
CAUTION: if '--data' enable, it will REFLASH DATA PARTITION
4242
4343
NOTICE: '--bios-mac' and '--rc3' needs command 'mkmmimg'
4444
'--release' VERSION can found at http://milkymist.org/updates/
@@ -251,20 +251,20 @@ fi
251251

252252

253253
if [ "$1" == "--qi" ] || [ "$1" == "--snapshot" ]; then
254-
if [ "$1" == "--snapshot" ] && [ "$2" == "" ]; then
254+
if [ "$1" == "--snapshot" ] && [ "$#" == "1" ]; then
255255
call-help
256256
exit 1
257257
fi
258258

259259
BASE_URL_HTTP="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist"
260-
VERSION="$2"
260+
VERSION="latest"
261261

262262
if [ "$1" == "--qi" ]; then
263263
BASE_URL_HTTP="http://downloads.qi-hardware.com/software/images/Milkymist_One"
264264
fi
265265

266-
if [ "$2" == "" ]; then
267-
VERSION="latest"
266+
if [ "$2" != "--data" ] && [ "$2" != "" ]; then
267+
VERSION="$2"
268268
fi
269269

270270
MD5SUMS_SERVER=$(\
@@ -291,7 +291,7 @@ if [ "$1" == "--qi" ] || [ "$1" == "--snapshot" ]; then
291291
call-download
292292
fi
293293

294-
if [ "$3" == "data" ]; then
294+
if [ "$2" == "--data" ] || [ "$3" == "--data" ]; then
295295
call-jtag $1 "${WORKING_DIR}/${DATA}"
296296
else
297297
call-jtag $1

0 commit comments

Comments
 (0)
Please sign in to comment.