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 cleanup help message

  • Loading branch information...
commit 19b68298806e37dd4d26cb152d7e2c5cf4ce965c 1 parent e3f089a
authored January 31, 2012

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

  1. 59  scripts/reflash_m1.sh
59  scripts/reflash_m1.sh
@@ -2,7 +2,7 @@
2 2
 
3 3
 # version of me
4 4
 __VERSION__="2011-12-13"
5  
-echo "File name: $0, Version of me: ${__VERSION__}"
  5
+echo -e "File name: $0\t version: ${__VERSION__}"
6 6
 
7 7
 
8 8
 STANDBY="standby.fpg"
@@ -21,30 +21,26 @@ MAC_DIR="${HOME}/.qi/milkymist/bios-mac/tmp"
21 21
 
22 22
 # Functions ###########################################################
23 23
 call-help() {
24  
-	echo "
25  
-Usage: ./reflash_m1.sh                    version: ${__VERSION__}
26  
-	--release [VERSION]
27  
-            by default it will download 'currect' release
28  
-            VERSION can found at http://milkymist.org/updates/
29  
-	--snapshot <VERSION> [data]
30  
-            if 'data' enable will reflash data partitions <VERSION> can found
31  
-            at http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/
32  
-	--local-folder <PATH>
33  
-            all files must be under <PATH>
34  
-	--lock-flash
35  
-            lock 'standby' and 'rescue' partitions
36  
-	--read-flash <PARTITION>
37  
-            read from RESCUE partition, by default only read 'standby.bin'
38  
-            PARTITION: standby soc bios splash flickernoise
39  
-	--bios-mac 00 2a
40  
-            '00' '2a' is the last MAC address
41  
-	--rc3 00 2a
42  
-             used in factory flash, this options will reflash data partition
  24
+	echo -e \
  25
+"Usage: ./reflash_m1.sh [OPTION] [PARAM]...
  26
+
  27
+  --release [VERSION]         by default it will download the latest release
  28
+  --snapshot <VERSION> [data] if 'data' enable, it will REFLASH DATA PARTITION
  29
+  --local-folder              please use m1nor instread
  30
+  --lock-flash                lock 'standby' and 'rescue' partitions
  31
+  --read-flash <PARTITION>    read from RESCUE partition, by default only read
  32
+			      'standby.bin'
  33
+			      PARTITION: standby soc bios splash flickernoise
  34
+  --bios-mac XX XX            'XX' 'XX' is the last MAC address
  35
+  --rc3 XX XX                 used in factory flash, reflash all partitions
  36
+
43 37
 NOTICE: '--bios-mac' and '--rc3' needs command 'mkmmimg'
44  
-Written by: Xiangfu Liu <xiangfu.z@gmail.com>
45  
-Please report bugs to <devel@lists.milkymist.org>
46  
-"
  38
+	'--release'  VERSION can found at http://milkymist.org/updates/
  39
+	'--snapshot' VERSION can found at
  40
+		     http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/
47 41
 
  42
+Written by: Xiangfu Liu <xiangfu@openmobilefree.net>
  43
+Please report bugs to <devel@lists.milkymist.org>\tversion: ${__VERSION__}"
48 44
 }
49 45
 
50 46
 # $1: is the file name you want save
@@ -204,9 +200,9 @@ call-create-bios () {
204 200
     printf "\\x$(printf "%x" 0x00)" >> ${MAC_DIR}/${MAC_TMP}
205 201
 
206 202
     cat ${MAC_DIR}/${HEAD_TMP} \
207  
-        ${MAC_DIR}/${MAC_TMP} \
208  
-        ${MAC_DIR}/${REMAIN_TMP} \
209  
-        > $1
  203
+	${MAC_DIR}/${MAC_TMP} \
  204
+	${MAC_DIR}/${REMAIN_TMP} \
  205
+	> $1
210 206
 
211 207
     mkmmimg $1 write
212 208
 }
@@ -291,7 +287,7 @@ if [ "$1" == "--snapshot" ]; then
291 287
 fi
292 288
 
293 289
 if [ "$1" == "--local-folder" ]; then
294  
-    echo "Not support yet!"
  290
+    echo "Please use m1nor from http://projects.qi-hardware.com/index.php/p/wernermisc/source/tree/master/m1/tools/m1nor"
295 291
     exit 1
296 292
 fi
297 293
 
@@ -318,8 +314,8 @@ fi
318 314
 
319 315
 if [ "$1" == "--bios-mac" ]; then
320 316
     if [ "$#" != "3" ]; then
321  
-        call-help
322  
-        exit 1
  317
+	call-help
  318
+	exit 1
323 319
     fi
324 320
 
325 321
     BIOS_RESCUE_MAC="bios.$2$3.bin"
@@ -336,8 +332,8 @@ fi
336 332
 
337 333
 if [ "$1" == "--rc3" ]; then
338 334
     if [ "$#" != "3" ]; then
339  
-        call-help
340  
-        exit 1
  335
+	call-help
  336
+	exit 1
341 337
     fi
342 338
 
343 339
     BIOS_RESCUE_MAC="bios.$2$3.bin"
@@ -382,7 +378,6 @@ if [ "$1" == "--rc3" ]; then
382 378
     exit 0
383 379
 fi
384 380
 
385  
-
386 381
 # nomally not reach here
387 382
 call-help
388 383
 exit 1

0 notes on commit 19b6829

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