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: add --read-flash parameters

  • Loading branch information...
commit bfcfae2608f32b923fa58ee80a80ae9ae4af12e1 1 parent 0785997
authored

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

  1. 24  scripts/reflash_m1.sh
24  scripts/reflash_m1.sh
@@ -33,7 +33,8 @@ Usage: ./reflash_m1.sh                    version: ${__VERSION__}
33 33
 
34 34
 	--lock-flash                 # lock 'standby' and 'rescue' partitions
35 35
 
36  
-	--read-flash                 # by default only read 'standby.bin' from m1
  36
+	--read-flash <PARTITION>     # read from RESCUE partition, by default only read 'standby.bin' from m1
  37
+	                             # PARTITION: standby soc bios splash flickernoise
37 38
 
38 39
 	--bios-mac 00 2a             # '00' '2a' is the last MAC address
39 40
 
@@ -105,12 +106,21 @@ EOF
105 106
     fi
106 107
 
107 108
     if [ "$1" == "--read-flash" ]; then
108  
-	echo "readmem 0x000000 0x00A0000 ${WORKING_DIR}/${STANDBY}" >> ${JTAG_BATCH_FILE}
109  
-
110  
-	#echo "readmem 0x0A0000 0x0180000 ${WORKING_DIR}/${SOC_RESCUE}" >> ${JTAG_BATCH_FILE}
111  
-	#echo "readmem 0x220000 0x0020000 ${BIOS_RESCUE_PATH}/${BIOS_RESCUE}" >> ${JTAG_BATCH_FILE}
112  
-	#echo "readmem 0x240000 0x00A0000 ${WORKING_DIR}/${SPLASH_RESCUE}" >> ${JTAG_BATCH_FILE}
113  
-	#echo "readmem 0x2E0000 0x0400000 ${WORKING_DIR}/${FLICKERNOISE_RESCUE}" >> ${JTAG_BATCH_FILE}
  109
+	if [ "$2" == "standby" ] || [ "$2" == "" ]; then
  110
+	    echo "readmem 0x000000 0x00A0000 ${WORKING_DIR}/${STANDBY}" >> ${JTAG_BATCH_FILE}
  111
+	fi
  112
+	if [ "$2" == "soc" ]; then
  113
+	    echo "readmem 0x0A0000 0x0180000 ${WORKING_DIR}/${SOC_RESCUE}" >> ${JTAG_BATCH_FILE}
  114
+	fi
  115
+	if [ "$2" == "bios" ]; then
  116
+	    echo "readmem 0x220000 0x0020000 ${WORKING_DIR}/${BIOS_RESCUE}" >> ${JTAG_BATCH_FILE}
  117
+	fi
  118
+	if [ "$2" == "splash" ]; then
  119
+	    echo "readmem 0x240000 0x00A0000 ${WORKING_DIR}/${SPLASH_RESCUE}" >> ${JTAG_BATCH_FILE}
  120
+	fi
  121
+	if [ "$2" == "flickernoise" ]; then
  122
+	    echo "readmem 0x2E0000 0x0400000 ${WORKING_DIR}/${FLICKERNOISE_RESCUE}" >> ${JTAG_BATCH_FILE}
  123
+	fi
114 124
 
115 125
 	#echo "readmem 0x6E0000 0x0180000 ${WORKING_DIR}/${SOC}" >> ${JTAG_BATCH_FILE}
116 126
 	#echo "readmem 0x860000 0x0020000 ${WORKING_DIR}/${BIOS}" >> ${JTAG_BATCH_FILE}

0 notes on commit bfcfae2

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