FreeCalypso > hg > fc-am-toolkit
annotate sh/pirelli-init-fc-ffs @ 12:fe5f7ba7f154
c139-analyze-boot utility put together, compiles
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sat, 10 Jun 2023 04:58:26 +0000 |
parents | faf27dbe1a63 |
children |
rev | line source |
---|---|
0
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 #!/bin/sh |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
3 if [ $# != 1 ] |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 then |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 echo "usage: $0 ttyport" 1>&2 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 exit 1 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 fi |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 ffsagent=/opt/freecalypso/target-bin/ffsagent-pirelli-am.srec |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 if [ ! -f $ffsagent ] |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 then |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 echo "Error: $ffsagent is not installed" 1>&2 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 exit 1 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 fi |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 set -ex |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 # erase the aftermarket FFS area first |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 fc-loadtool -h pirelli -Petmoff -t 800 "$1" flash2 erase 0x480000 0x180000 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 # By running fc-xram *immediately* after our fc-loadtool batch command |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 # finishes with iota-off exit mode, we avoid giving the official fw |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 # in flash an extra boot cycle. |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 fc-xram -h pirelli -t 1300 "$1" $ffsagent rvinterf -b |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 sleep .5 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 fc-fsio exec /opt/freecalypso/scripts/pirelli-am-ffsinit |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 sleep .3 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
30 fc-shell poweroff |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 sleep .1 |
faf27dbe1a63
scripts for initializing aftermarket FFS on Pirelli DP-L10
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
32 kill `cat /tmp/rvinterf.pid` |