Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

reflash_m1.sh update the --data parameter when use --qi

  • Loading branch information...
commit 80474b54d02a13b85cc55a9d6e298eeab8f086c7 1 parent 5162de6
authored March 05, 2012

Showing 1 changed file with 8 additions and 8 deletions. Show diff stats Hide diff stats

  1. 16  scripts/reflash_m1.sh
16  scripts/reflash_m1.sh
... ...
@@ -1,7 +1,7 @@
1 1
 #!/bin/bash
2 2
 
3 3
 # version of me
4  
-__VERSION__="2012-03-01"
  4
+__VERSION__="2012-03-05"
5 5
 echo -e "File name: $0\t version: ${__VERSION__}"
6 6
 
7 7
 
@@ -37,8 +37,8 @@ call-help() {
37 37
 			      PARTITION: standby soc bios splash flickernoise
38 38
   --bios-mac XX XX            'XX' 'XX' is the last MAC address
39 39
   --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
42 42
 
43 43
 NOTICE: '--bios-mac' and '--rc3' needs command 'mkmmimg'
44 44
 	'--release'  VERSION can found at http://milkymist.org/updates/
@@ -251,20 +251,20 @@ fi
251 251
 
252 252
 
253 253
 if [ "$1" == "--qi" ] || [ "$1" == "--snapshot" ]; then
254  
-    if [ "$1" == "--snapshot" ] && [ "$2" == "" ]; then
  254
+    if [ "$1" == "--snapshot" ] && [ "$#" == "1" ]; then
255 255
 	call-help
256 256
 	exit 1
257 257
     fi
258 258
 
259 259
     BASE_URL_HTTP="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist"
260  
-    VERSION="$2"
  260
+    VERSION="latest"
261 261
 
262 262
     if [ "$1" == "--qi" ]; then
263 263
         BASE_URL_HTTP="http://downloads.qi-hardware.com/software/images/Milkymist_One"
264 264
     fi
265 265
 
266  
-    if [ "$2" == "" ]; then
267  
-        VERSION="latest"
  266
+    if [ "$2" != "--data" ] && [ "$2" != "" ]; then
  267
+        VERSION="$2"
268 268
     fi
269 269
 
270 270
     MD5SUMS_SERVER=$(\
@@ -291,7 +291,7 @@ if [ "$1" == "--qi" ] || [ "$1" == "--snapshot" ]; then
291 291
 	call-download
292 292
     fi
293 293
 
294  
-    if [ "$3" == "data" ]; then
  294
+    if [ "$2" == "--data" ] || [ "$3" == "--data" ]; then
295 295
 	call-jtag $1 "${WORKING_DIR}/${DATA}"
296 296
     else
297 297
 	call-jtag $1

0 notes on commit 80474b5

Please sign in to comment.
Something went wrong with that request. Please try again.