annotate sh/c139-gen-fc-ffs-img @ 25:afd760eb1f8d

doc/C1xx-updates: new article
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Jun 2023 20:57:23 +0000
parents 2299f1ebbfd2
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
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
4 # on C139. It contains hard-coded FFS geometry of 64x7 (correct for 4 MiB
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
5 # flash only, FC Tourmaline), and it invokes c139-gen-fc-ffs-tree script to
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
6 # populate the FFS content. The latter script is intended to be C139-specific:
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
7 # it uses aud-c139 audio mode config files, and in the future it will also
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
8 # populate PWT buzzer melodies that aren't applicable to other C1xx targets
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
9 # (too small FFS on C11x and no buzzer on C155).
2299f1ebbfd2 c139-gen-fc-* shell scripts: add explanatory comments
Mychaela Falconia <falcon@freecalypso.org>
parents: 18
diff changeset
10
18
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 if [ $# != 2 ]
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 then
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 echo "usage: $0 rfbin-dir imei-file" 1>&2
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 exit 1
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 fi
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 set -e
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 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
20
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 echo 'Generated file system tree in fc-ffs'
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 tiffs-mkfs -f /fc-ffs 64x7 fc-ffs fc-ffs.bin
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
c8ad6188b9ed add c139-gen-fc-* shell script hierarchy
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 echo 'Generated FFS image for FC firmware in fc-ffs.bin'