FreeCalypso > hg > fc-am-toolkit
comparison sh/c11x-gen-fc-ffs-img @ 20:aa2fd60a44fb
new shell scripts c11x-gen-fc-{ffs-img,script}
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 10 Jun 2023 23:53:15 +0000 |
parents | sh/c139-gen-fc-ffs-img@2299f1ebbfd2 |
children |
comparison
equal
deleted
inserted
replaced
19:2299f1ebbfd2 | 20:aa2fd60a44fb |
---|---|
1 #!/bin/sh | |
2 | |
3 # This shell script generates an fc-ffs.bin image specifically for FreeCalypso | |
4 # on C11x, either the 2 MiB flash variant or the 4 MiB flash variant of this | |
5 # phone hw subfamily. A required command line argument selects between 2m and | |
6 # 4m FFS geometries. | |
7 | |
8 if [ $# != 3 ] | |
9 then | |
10 echo "usage: $0 rfbin-dir imei-file 2m|4m" 1>&2 | |
11 exit 1 | |
12 fi | |
13 | |
14 case "$3" in | |
15 2m) | |
16 ffs_geom=64x3 | |
17 ;; | |
18 4m) | |
19 ffs_geom=64x7 | |
20 ;; | |
21 *) | |
22 echo "Error: invalid flash config argument" 1>&2 | |
23 exit 1 | |
24 esac | |
25 | |
26 set -e | |
27 | |
28 # FIXME: using c139-gen-fc-ffs-tree script to populate the FFS content for | |
29 # FC on C11x is OK for now, but we may need a different script in the future. | |
30 | |
31 c139-gen-fc-ffs-tree "$1" "$2" fc-ffs | |
32 | |
33 echo 'Generated file system tree in fc-ffs' | |
34 | |
35 tiffs-mkfs -f /fc-ffs $ffs_geom fc-ffs fc-ffs.bin | |
36 | |
37 echo 'Generated FFS image for FC firmware in fc-ffs.bin' |