annotate sh/c11x-gen-fc-ffs-img @ 24:b71216a5f3c3

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