FreeCalypso > hg > fc-am-toolkit
comparison sh/c155-gen-fc-script @ 21:9d7d2fdc733b
new shell scripts c155-gen-fc-{ffs-img,script}
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 11 Jun 2023 00:28:10 +0000 |
parents | sh/c139-gen-fc-script@2299f1ebbfd2 |
children |
comparison
equal
deleted
inserted
replaced
20:aa2fd60a44fb | 21:9d7d2fdc733b |
---|---|
1 #!/bin/sh | |
2 | |
3 # This shell script generates the set of files needed for reflashing a Motorola | |
4 # C155/156 phone to FreeCalypso: it invokes c155-gen-fc-ffs-img to generate | |
5 # fc-ffs.bin (customized FFS image containing IMEI and extracted factory RF | |
6 # calibration values specific to your particular phone), and the present script | |
7 # then generates a command script for fc-loadtool that flashes everything | |
8 # in one go. | |
9 | |
10 if [ $# != 1 ] | |
11 then | |
12 echo "usage: $0 fwimage.bin" 1>&2 | |
13 exit 1 | |
14 fi | |
15 | |
16 if [ ! -f "$1" ] | |
17 then | |
18 echo "Error: $1 does not exist or is not a regular file" 1>&2 | |
19 exit 1 | |
20 fi | |
21 | |
22 if [ ! -d rfbin ] | |
23 then | |
24 echo "Error: rfbin directory is missing" 1>&2 | |
25 exit 1 | |
26 fi | |
27 | |
28 if [ ! -f IMEI ] | |
29 then | |
30 echo "Error: IMEI file is missing" 1>&2 | |
31 exit 1 | |
32 fi | |
33 | |
34 set -e | |
35 | |
36 c155-gen-fc-ffs-img rfbin IMEI | |
37 | |
38 echo "flash e-program-bin 0x20000 $1" > fc-flash-script | |
39 echo "flash e-program-bin 0x700000 fc-ffs.bin" >> fc-flash-script | |
40 | |
41 echo 'Generated fc-loadtool command script in fc-flash-script' |