FreeCalypso > hg > ffs-editor
annotate README @ 21:5dd2fa1d3da1
README: minor fixes
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Sat, 16 May 2020 18:44:01 +0000 |
| parents | 49bd6136f4a9 |
| children | d7740787396c |
| rev | line source |
|---|---|
| 20 | 1 FFS editor operated via fc-xram |
| 2 =============================== | |
| 3 | |
| 4 The software article presented in this repository is a tool for operating on | |
| 5 the flash file system (FFS) of Calypso devices running FreeCalypso firmware. | |
| 6 Before explaining the tool itself, I need to explain why it is needed. | |
| 7 | |
| 8 Every FC firmware version includes our TI-based FFS implementation and maintains | |
| 9 an FFS instance in device flash memory; the standard way to operate on this FFS | |
| 10 is by way of our fc-fsio utility communicating with the running firmware over | |
| 11 its RVT/ETM interface. With our AT-command-controlled modem firmwares, most of | |
| 12 the time the modem fw itself is the only agent that actually operates on the | |
| 13 FFS: if you need to perform low-level FFS operations such as formatting, simply | |
| 14 boot the firmware normally, but don't give it any AT commands, and instead poke | |
| 15 at it with fc-fsio. But when we start building firmware versions with handset | |
| 16 UI layers included, relying on the firmware itself as the sole FFS operating | |
| 17 agent becomes problematic: these UI-enabled firmwares launch into complex | |
| 18 high-level operations immediately upon boot, and it can be very desirable to be | |
| 19 able to get the FFS into a certain shape *before* the main firmware is allowed | |
| 20 to boot with it. | |
| 21 | |
| 22 The tool presented in this repository is intended to be a solution to this | |
| 23 problem. The present FFS editor is a very heavily stripped-down derivative of | |
| 24 our FC Selenite firmware, stripped heavily enough to fit entirely into RAM on | |
| 25 all of our targets, even the smallest Mot C11x. This FFS editor "firmware" | |
| 26 does not include any GSM functionality - no L1, no G23M PS and no ACI - and GPF | |
| 27 has been removed as well. The only fw components left are Nucleus, Riviera | |
| 28 (which is totally indepedent of GPF in our TCS211-based architecture), RVT (the | |
| 29 component which manages the RVTMUX UART interface to which we interface via | |
| 30 rvinterf), ETM (the component to which fc-tmsh and fc-fsio talk) and FFS, the | |
| 31 primary component of interest to us here. This FFS editor "firmware" is | |
| 32 compiled with gcc (Selenite-based), and is built only into a RAM-loadable image | |
| 33 to be run via fc-xram, no flashable images. | |
| 34 | |
| 35 The intended usage model is that you run this FFS editor like this: | |
| 36 | |
| 37 fc-xram -h mytarget /dev/ttyXXX ffsagent-XXX.srec rvinterf | |
| 38 | |
| 39 Cause the Calypso device to execute its boot path, fc-xram will load and run | |
| 40 the ffsagent image, and pass the serial channel to rvinterf - then you will | |
| 41 have rvinterf running on your host, talking to ffsagent running on the Calypso. | |
| 42 The FFS editor "firmware" does nothing other than emit a few RV traces and | |
| 43 listen for ETM command packets, and at this point you run fc-fsio to talk to | |
| 44 this FFS agent and perform whatever FFS manipulations are needed. fc-tmsh can | |
| 45 also be used to read and write both Calypso and ABB registers. | |
| 46 | |
| 47 When you are done with the needed fc-fsio manipulations, you can command a Iota | |
| 48 power-off on the target with fc-shell poweroff (sends an ETM ABB register write | |
| 49 command hitting VRPCDEV), or you can kill rvinterf or unplug the serial cable | |
| 50 and let ffsagent on the target power off in 15 to 20 s upon keepalive timeout. | |
| 51 Or you can press the RESET button on the board (FCDEV3B or Caramel) and cause | |
| 52 the flashed firmware to boot. (Powering off by pressing and holding PWON won't | |
| 53 work because the heavily stripped FFS editor "firmware" does not include the | |
| 54 regular firmware's ABB interrupt handling code path.) In any case, when the | |
| 55 flashed fw does boot, it will boot with the FFS content in whatever state you | |
| 56 brought it to with ffsagent and fc-fsio, which is the whole point of the | |
| 57 exercise. | |
| 58 | |
| 59 Supported targets | |
| 60 ================= | |
| 61 | |
| 62 The present FFS editor is intended to run only on those Calypso targets which | |
| 63 run one of our full FreeCalypso GSM firmwares of the Magnetite/Selenite family. | |
| 64 More specifically, it is intended to operate on FFS instances that are "owned" | |
| 65 by flashed FreeCalypso firmwares, *not* on FFS instances that are owned by | |
| 66 someone else's firmware. There is no mechanism for explicitly specifying FFS | |
| 67 location and geometry at a user level, as would be needed for operating on | |
| 68 arbitrary alien FFS instances, instead the FFS editor includes exactly the same | |
| 69 dev.c table of FFS configurations as our production firmwares. The few | |
| 70 different ffsagent build variants that are provided (run ./make-all.sh to | |
| 71 compile all of them) differ in which dev.c table is included, exactly the same | |
| 72 as in our production firmwares: | |
| 73 | |
| 74 * ffsagent-fcfam-{irda,modem}.srec version is built with the CONFIG_TARGET_FCFAM | |
| 75 version of the dev.c table, appropriate for FCDEV3B. | |
| 76 | |
|
21
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
77 * ffsagent-ti26-{irda,modem}.srec version is built with TI's original version |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
78 of the dev.c table with minor additions by OM and FC, appropriate for |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
79 Tango/Caramel/Luna, for Openmoko GTA0x and for GTM900 modems converted to FC. |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
80 |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
81 Target name ti26 refers to 26 MHz CLKTCXO input to Calypso, i.e., *not* |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
82 D-Sample - see below. If we ever get our hands on a D-Sample C035 board or |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
83 some other platform with similar needs, it will be easy to create a ti13 |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
84 counterpart. |
| 20 | 85 |
| 86 * compal and pirelli versions correspond to FreeCalypso aftermarket FFS configs | |
| 87 on those targets, *NOT* Compal's or Pirelli's original FFS! | |
| 88 | |
| 89 compal-new vs. compal-old configs | |
| 90 ================================= | |
| 91 | |
| 92 Back in 2015 I (Mother Mychaela) made the decision to define FC aftermarket FFS | |
| 93 on Mot C139 phones as 64x3 (meaning 3 sectors of 64 KiB each), located at | |
| 94 0x3C0000. Right now I am thinking that we should change to a larger FFS config, | |
|
21
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
95 but I have not yet committed to any specific new config. When and if I make |
| 20 | 96 the big switch, compal-new will be the new config, while compal-old will remain |
| 97 the original 2015 config. At the present moment the two ffsagent-compal-* | |
| 98 images are identical. | |
|
21
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
99 |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
100 No Calypso C05 target support |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
101 ============================= |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
102 |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
103 The present FFS editor application is a stripped-down derivative of FC Selenite |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
104 firmware, still containing Nucleus RTOS, thus it uses interrupts. Having a |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
105 run-from-RAM (or more precisely, independent of flashed fw) application use |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
106 interrupts requires having Calypso boot ROM version 0300, which is present only |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
107 in Calypso C035 silicon. (We can still use this ROM for our purpose of |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
108 interrupt redirection even if it is disabled on boot like on Compal phones.) |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
109 Because of this interrupt handling issue, this FFS editor application is not |
|
5dd2fa1d3da1
README: minor fixes
Mychaela Falconia <falcon@freecalypso.org>
parents:
20
diff
changeset
|
110 available on the Mother's D-Sample C05 board, or any other Calypso C05 target. |
