comparison sh/pirelli-init-fc-ffs @ 0:faf27dbe1a63

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