FreeCalypso > hg > freecalypso-tools
annotate doc/TIFFS-Overview @ 465:003e48f8ebe1
rvinterf/etmsync/fsnew.c: cast 0 to (char *) for execl sentinel
I generally don't use NULL and use plain 0 instead, based on a "NULL
considered harmful" discussion on the classiccmp mailing list many aeons
ago (I couldn't find it, and I reason that it must have been 2005 or
earlier), but a recent complaint by a packager sent me searching, and I
found this:
https://ewontfix.com/11/
While I don't give a @#$% about "modern" systems and code-nazi tools,
I realized that passing a plain 0 as a pointer sentinel in execl is wrong
because it will break on systems where pointers are longer than the plain
int type. Again, I don't give a @#$% about the abomination of x86_64 and
the like, but if anyone ever manages to port my code to something like a
PDP-11 (16-bit int, 32-bit long and pointers), then passing a plain 0
as a function argument where a pointer is expected most definitely won't
work: if the most natural stack slot and SP alignment unit is 16 bits,
fitting an int, with longs and pointers taking up two such slots, then
the call stack will be totally wrong with a plain 0 passed for a pointer.
Casting the 0 to (char *) ought to be the most kosher solution for the
most retro systems possible.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 11 Feb 2019 00:00:19 +0000 |
parents | 579441d7dcd8 |
children | 3100f534340b |
rev | line source |
---|---|
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
1 [Historical note: this document was originally written in 2014 when the vision |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
2 of FreeCalypso was very different from what it is today. Since then we have |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
3 transitioned from making aftermarket hacks on pre-existing Calypso phones and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
4 modems to producing and supporting our own FreeCalypso hardware products, and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
5 our firmware work has changed from a nebulous dream to stable production code. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
6 The ways in which we approach various technical aspects have changed |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
7 accordingly, but much of our documentation has been slow to catch up. The |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
8 documentation is now being updated, but there may still be some passages where |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
9 the old world view shines through.] |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
10 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
11 All TI GSM firmwares known to this author (Mother Mychaela of FreeCalypso) |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
12 implement some kind of flash file system, or FFS. Several different FFS code |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 implementations, and correspondingly several different on-flash data formats, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
14 have been used throughout the history of TI's involvement in the wireless |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
15 terminal business. The FFS incarnation of primary interest to the FreeCalypso |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
16 project is the one invented by Mads Meisner-Jensen at TI in the early 2000s |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
17 (at least according to the comments in the sources available to us), and it is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 relevant to us in the following ways: |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
20 * When targeting the GSM modem in Openmoko's GTA01/02 smartphones, we need to |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
21 work with the original FFS from the factory (call it MokoFFS), the same FFS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 as used by the mokoN firmwares: this FFS contains the IMEI and the RF |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 calibration values from the factory, which we most certainly don't want to go |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 without. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
25 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 * The Leonardo firmware semi-src which we are using as the reference for |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 building our own full source, multi-target GSM fw contains a turnkey-working |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
28 implementation of this very FFS, using the on-flash format in question and |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
29 providing run-time APIs expected by the rest of the GSM fw suite. Following |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
30 the principle of ``if it ain't broke, don't fix it'', we use this FFS not |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
31 only on the gtamodem target, but also on other targets, including those where |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
32 we are starting from a blank state and thus have the freedom to use whatever |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
33 FFS we like. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
34 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
35 * The original proprietary fw on the Pirelli DP-L10 phone also happens to use |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
36 an FFS in the same format, although Pirelli's FFS does *not* contain the IMEI |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
37 or any of the RF calibration values. This Pirelli phone was originally a |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
38 target of high interest for FreeCalypso, as we had high hopes of turning it |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
39 into a libre phone by way of our aftermarket firmware - but this plan has |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
40 since been abandoned when it became clear that Pirelli's hw is unsuitable for |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
41 aftermarket fw development because of the multitude of extra peripheral chips |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
42 for non-GSM functions which get in the way. In the earlier years of |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
43 FreeCalypso a lot of effort had been invested into studying all aspects of |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
44 the Pirelli DP-L10 phone and its original firmware, including the FFS. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 Naming |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
47 ====== |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
48 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
49 I have previously referred to the FFS format in question as Mokopir-FFS or |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
50 MPFFS, from "Moko" and "Pirelli". I was originally hesitant to call it TIFFS, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
51 as lacking the source code, I had no way of knowing whether the FFS format and |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
52 implementation were of TI's own invention, or something that TI licensed as a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
53 black box from one of their many proprietary software partners. (I was unable |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
54 to identify it as any well-known, industry-standard FFS format, but absence of |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
55 evidence is not evidence of absence.) But now that we have TI's original source |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
56 code which implements this FFS (first the MV100-0.1.rar source, then the full |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
57 Leonardo one), complete with comments and a HISTORY file, we know that our FFS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
58 was invented and implemented by someone named Mads Meisner-Jensen at TI - I'm |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
59 guessing in the SSA group in Nice, France. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
60 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
61 I am now making a naming transition from MPFFS to TIFFS: there is really no |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
62 link between this FFS format and the Openmoko+Pirelli duo, other than the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
63 happenstance of me having first encountered this FFS on these two GSM device |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
64 brands, and the name TIFFS is more neutrally-descriptive. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
65 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
66 What it is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
67 ========== |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
68 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
69 In a rare departure from TI's norm (most of TI's GSM firmware and associated |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
70 development tools suffer from heavy Windows poisoning), what I call TIFFS is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
71 very Unixy. It is a file system with a hierarchical directory tree structure |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
72 and with Unixy forward-slash-separated, case-sensitive pathnames; the semantics |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
73 of "what is a file" and "what is a directory" are exactly the same as in UNIX; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
74 and TIFFS even supports symlinks, although that support is a little under- |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
75 developed, and apparently no FFS symlinks were ever used in any production GSM |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
76 device. Thus the FFS implemented in TI-based GSM devices (modems and |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
77 "dumbphone" handsets) is really no different from, for example, JFFS2 in |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
78 embedded Linux systems. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
79 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
80 (The only traditional UNIX file system features which are missing in TIFFS are |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
81 the creation/modification/access timestamps and the ownership/permission |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
82 fields.) |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
83 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
84 The FFS in a GSM device typically stores two kinds of content: |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
85 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
86 * Factory data: IMEI, RF calibration values, device make/model/revision |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
87 ID strings etc. These files are expected to be programmed on the factory |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
88 production line and not changed afterward. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
89 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
90 * Dynamic data written into the FFS in normal device operation: when you use a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
91 "dumbphone" running TI-based firmware, every time you store something "on the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
92 phone" or in "non-volatile memory", that item is actually stored in the FFS. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
93 (Where else, if you think of it?) That includes contacts and received SMS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
94 stored "on the phone" instead of the SIM, any selections you make in the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
95 settings/preferences menus which persist across reboots (power cycles), call |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
96 history etc. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
97 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
98 It needs to be noted that the "dynamic data" aspect of FFS usage applies not |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
99 only to complete phones, but also to modems like the one used in the GTA01/02. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
100 One would naively think that non-volatile storage of data in flash outside of |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
101 factory programming would be needed only in a device with its own UI, and that |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
102 a modem subservient to external AT commands would be completely stateless |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
103 across reboot/power cycles; but that is not the case in actuality. TI-baseed |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
104 GSM firmwares, including Openmoko's mokoN and our own FreeCalypso, are designed |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
105 to always "mount" their FFS with read/write access; TI's FFS implementation in |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
106 the firmware has no concept of a "read-only mount". |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
107 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
108 I am still investigating just what kinds of data are routinely written into the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
109 non-volatile FFS by the firmware in normal operation on devices like the GTA0x |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
110 modem, but there most definitely are some. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
111 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
112 There is no hard separation between "static" and "dynamic" data in the file |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
113 system structure; TIFFS is thus akin to an embedded Linux system with just a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
114 single root file system containing both "static" files like userland binaries |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
115 and "dynamic" ones like configuration files under /etc which the user is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
116 expected to edit with vi after logging into the box, or log and similar files |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
117 created by the system itself under /var, for example. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
118 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
119 Where it lives |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
120 ============== |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
121 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
122 The type of flash memory used in Calypso GSM modems and "dumbphones" is called |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
123 NOR flash. This NOR flash memory is physically divided (by the design of the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
124 flash chip itself) into units called "sectors" or more descriptively, erase |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
125 blocks. The typical NOR flash sector size (in Calypso GSM devices) ranges from |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
126 64 KiB in the GTA02 modem's NOR flash (4 MiB total) to 256 KiB in the |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
127 S71PL129NC0 flash+RAM chip used in the Pirelli DP-L10 and in our own FreeCalypso |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
128 hardware designs (16 MiB of flash total). The key physical property is that |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
129 any bit may be changed from a '1' to a '0' at any time, in any combination, but |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
130 resetting of '0' bits back to ones can be done only on the granularity of these |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
131 largish sectors, in an operation called "sector erase". |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
132 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
133 The location of TIFFS within the flash memory of a given GSM device is defined |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
134 by the firmware design of that device, but is always some integral number of |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
135 contiguous flash sectors. Some examples: |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
136 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
137 * On the GTA01/02 GSM modem, FFS occupies 7 sectors of 64 KiB each, starting at |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
138 flash offset 0x380000. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
139 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
140 * On the Pirelli DP-L10, the FFS used by the original proprietary fw occupies |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
141 18 sectors of 256 KiB each (for 4.5 MiB in total), starting at the beginning |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
142 of the 2nd flash chip select (0x02000000 in the ARM7 address space). |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
143 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
144 * On Motorola/Compal C139/140 phones, the FFS used by the original proprietary |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
145 fw occupies 5 sectors of 64 KiB each (320 KiB in total), starting at 0x370000. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
146 C11x/123 use smaller FFS configurations, whereas C155/156 seem to have |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
147 switched to some other FFS format, different from our familiar TIFFS. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
148 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
149 * On our own FreeCalypso hardware family we have put our FFS in the first 8 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
150 sectors (of 256 KiB each) in the 2nd flash chip select bank, which appears at |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
151 0x01800000 in the ARM7 address space instead of Pirelli's 0x02000000 because |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
152 we have wired the 2nd flash chip select to nCS2 on the Calypso instead of |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
153 Pirelli's nCS3. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
154 |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
155 * The smallest real FFS configuration called for by the table in dev.c in TI's |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
156 original Leonardo fw source is 3 sectors of 64 KiB each; the same table also |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
157 sports a 4 KiB x 4 configuration for RAM-based testing (emulation of FFS in |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
158 RAM without real flash). |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
159 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
160 * The largest FFS configuration that has been envisioned by the original |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
161 designers seems to be somewhere around 128 sectors. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
162 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
163 Each flash sector used for TIFFS begins with this 6-byte signature: |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
164 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
165 46 66 73 23 10 02 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
166 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
167 The first 4 bytes are 'Ffs#' in ASCII, and the following two bytes are the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
168 format version number of 0x0210 in little-endian byte order. The following two |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
169 bytes give a count of how many times that sector has been erased and rewritten |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
170 (FF FF in "fresh" or "virgin" FFS images), and the following byte indicates |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
171 that block's role and status in the FFS life cycle. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
172 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
173 How it works |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
174 ============ |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
175 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
176 Just like JFFS2 and other high-quality flash file systems, TIFFS is designed to |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
177 recover gracefully from any possible power failure or crash: one can yank the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
178 battery from the GSM device (or induce a firmware crash) at the most mis- |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
179 opportune moment in the middle of an FFS write operation, and the FFS is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
180 expected to recover on the next boot cycle. I won't be able to document here |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
181 all gory details of exactly how this goal is achieved, partly because I haven't |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
182 studied the code to the requisite level of depth myself yet, but all of the |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
183 responsible code lives under src/cs/drivers/drv_app/ffs in our fc-magnetite and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
184 fc-selenite source trees; feel free to study it. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
185 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
186 In its "normal" or "clean" state (i.e., when not in the middle of a write |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
187 operation or recovery from an ungracefully interrupted one), a TIFFS instance |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
188 consists of the following 3 types of blocks: |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
189 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
190 * One block containing inode records, indicated by AB in its type/flags/status |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
191 byte in the block header; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
192 * N-2 blocks (where N is the total number of flash sectors allocated for the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
193 FFS) containing (or waiting to be filled with) data chunks - indicated by BD |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
194 in the type/flags/status byte; |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
195 * One "free" block, indicated by BF - destined to become a new AB or a new BD |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
196 at some point. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
197 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
198 Each object written into the FFS (file, directory or symlink) consists of a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
199 16-byte inode record written into the AB block and a data chunk written into |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
200 one of the BD blocks. The data chunk includes the name of the object, hence |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
201 one is required even for directories. Data chunks are contiguous, uncompressed, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
202 and subject to an upper size limit of 2048 or 8192 bytes, depending on the FFS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
203 configuration. Files larger than this limit are stored in a "segmented" form, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
204 giving rise to a 4th inode or object type (after file, directory and symlink): |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
205 segment. Each segment of a segmented file consists of not only a data chunk, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
206 but also an inode record for the segment, which gives the location of the data |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
207 chunk and ties the segment object into the overall FFS structure, making it |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
208 accessible. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
209 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
210 Because aside from complete sector erasure, flash memory bits can only |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
211 transition from '1' to '0' but not the other way around, overwriting an existing |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
212 file with some new content (an operation which any reasonable file system must |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
213 implement in some way) cannot be done in place. Instead like most flash file |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
214 systems, TIFFS implements this common operation by writing the new version of |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
215 the file to a new location (previously blank flash) and then invalidating the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
216 old version - and doing all that while keeping in mind the possibility of an |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
217 ungraceful crash or powerdown at any moment, and the requirement of recovering |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
218 gracefully from any such event. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
219 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
220 Of course as an FFS receives more write activity, even if one keeps overwriting |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
221 some existing files with new content of the same size, without adding to the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
222 visible total content size (think du(1) command), eventually all remaining blank |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
223 flash space will fill up. At that point (or at some earlier point, depending |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
224 on the FFS design and/or configuration) the FFS has to invoke a compaction or |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
225 reclamation or garbage collection procedure: any "mixed" blocks containing both |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
226 valid and stale data are transitioned into a "stale-only" state by having the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
227 active data moved to a new block, and then the "all stale" blocks are subjected |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
228 to sector erasure, becoming new blank sectors. The logic responsible for these |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
229 operations once again needs to be resilient to the possibility of a crash or |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
230 powerdown occurring at the most mis-opportune moment, and it also needs to |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
231 implement flash wear leveling: there is a physical limit to how many times a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
232 given flash sector can be erased and rewritten before it goes bad. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
233 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
234 All of the above are common and well-known principles, successfully implemented |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
235 in well-known flash file systems such as JFFS2 in Linux. TIFFS is absolutely |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
236 no different in this regard; for the implementation details, read the source |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
237 code. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
238 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
239 How this FFS comes into being |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
240 ============================= |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
241 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
242 (This section is only relevant to you if you plan on physically producing your |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
243 own GSM phones or modems on your own factory production line, like we currently |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
244 do at our family company, or if you simply enjoy knowing how it is done.) |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
245 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
246 To my knowledge, TI never used or produced a tool akin to mkfs.jffs2 in the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
247 embedded Linux world, which would produce a TIFFS image complete with some |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
248 initial directory and file content "in vitro". Instead it appears that the FFS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
249 instances found in shipped products such as Openmoko phones have been created |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
250 "in vivo" by TI's firmware running on the device itself during the "production |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
251 test" phase. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
252 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
253 We never got a copy of the original factory production line software that was |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
254 used by Openmoko, but we have successfully replicated the process using our own |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
255 Unix/Linux-based FreeCalypso host tools, the very same tools that are contained |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
256 in the present source package you are looking at. The process goes like this: |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
257 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
258 * When the printed circuit board is physically populated with components such |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
259 as the Calypso chip and the flash chip, the latter can be blank - if the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
260 board design has the nIBOOT pin pulled low, enabling the Calypso boot ROM |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
261 (Openmoko and Pirelli both good on this one, but shame on Compal!), there is |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
262 no need to preprogram the flash chip with anything prior to populating it on |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
263 the board, and the device remains fully unbrickable at all times afterward. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
264 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
265 * When the assembled board is powered up for the first time, with completely |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
266 blank flash, the Calypso boot ROM will sit there and patiently wait for a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
267 code download on either of its two UARTs. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
268 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
269 * Using TI's FLUID (Flash Loader Utility Independent of Device) or FreeCalypso's |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
270 fc-loadtool free replacement, the factory production station loads the main |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
271 firmware image into the flash. Note, it is just the firmware image at this |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
272 step, and the FFS sectors remain blank. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
273 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
274 * The board is commanded to reboot (or power-cycled), and the firmware image |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
275 boots for the first time. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
276 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
277 * TI's FFS implementation code in their standard firmware reacts to all blank |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
278 flash in the FFS sectors as follows: it performs what they call the preformat |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
279 operation, writing the TIFFS signature and a BF state byte into every FFS |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
280 sector, but the main "format" operation, which sets up the AB/BD block roles, |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
281 creates the root inode and makes the FFS ready to accept the creation of its |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
282 first directories and files, is not done automatically. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
283 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
284 In order to perform the FFS format operation and then fill the new FFS with |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
285 whatever directories and files are deemed needed to be present in "fresh" |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
286 shipping products, the factory production station connects to the just-booted |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
287 firmware running on the target via the RVT/ETM protocol (see the RVTMUX |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
288 write-up), and sends "test mode" commands to this running firmware. These |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
289 "FFS test mode" (or TMFFS) commands include the format operation, an mkdir |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
290 operation to create directories, and a "file write" operation akin to doing |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
291 'cat > /dir/whatever/file', creating files in FFS and storing any desired data |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
292 in them. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
293 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
294 The IMEI is assigned and written into FFS in this process, but it is not the |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
295 only data item that will be unique for each individual device made. Much more |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
296 important are the RF calibration values; the factory calibration procedure does |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
297 the following for each individual unit: |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
298 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
299 * Measures the frequency offset produced by the VCXO as a function of the AFC |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
300 DAC control value and constructs the afcparams table based on these |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
301 measurements; |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
302 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
303 * Characterizes the dBm output of the Tx chain as a function of the APC DAC |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
304 control value and comes up with a set of these DAC values which produce Tx |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
305 power levels prescribed by the GSM 05.05 spec; |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
306 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
307 * Determines the correction values which need to be applied in order to set the |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
308 correct Rx path gains and to determine the true Rx signal level from the dBfs |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
309 power measurements made in the DSP from Rx I&Q samples. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
310 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
311 These calibration procedures are performed by connecting a suitable RF test |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
312 instrument (R&S CMU200 is the industry gold standard) to the GSM device's |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
313 antenna connector or RF test port and running special calibration programs |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
314 which talk both to the CMU200 or other test instrument and to the L1TM (Layer 1 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
315 test modes) component in the DUT (device under test). In FreeCalypso hardware |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
316 manufacturing we use a CMU200 instrument which is itself maintained in good |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
317 calibration standing, and for the calibration software we use our own |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
318 fc-rfcal-tools which talk to the DUT via rvinterf. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
319 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
320 All of the resulting calibration values are stored in a bunch of files under the |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
321 /gsm/rf subtree, and these files are "owned" by the L1 code. The latter has |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
322 RAM data structures which correspond to these files; upon normal boot the |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
323 initialization code looks in FFS, and if it finds any of the RF calibration |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
324 files, it reads each present file into the corresponding RAM data structure, |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
325 overwriting the compiled-in defaults. With TI's standard production calibration |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
326 procedure which we have replicated in our FreeCalypso hw manufacturing setup, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
327 these RF calibration files in FFS come into being as follows: |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
328 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
329 * The Test Mode support code in L1 (i.e., part of the main GSM fw) performs the |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
330 measurements and stores results in its RAM data structures as commanded by |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
331 the production test station through the Test Mode interface; |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
332 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
333 * Certain special test mode commands encoded via the MISC_ENABLE opcode direct |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
334 the above L1TM code to write its RAM data structures into FFS. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
335 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
336 See the RF_tables article for more information. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
337 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
338 Compal and Pirelli differences |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
339 ============================== |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
340 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
341 The above description refers to TI's vanilla reference version, and it seems |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
342 like Openmoko (FIC) was the only phone/modem manufacturer (prior to us!) who |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
343 followed it without major deviations. In contrast, both Compal (Mot C1xx) and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
344 Foxconn (Pirelli DP-L10) moved their vital per-unit factory data (IMEI and RF |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
345 calibration) out of the FFS into their own ad hoc flash data structures (which |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
346 are very difficult to reverse-engineer and make use of, unfortunately), leaving |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
347 their FFS only for less critical data. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
348 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
349 In Compal's case (at least on the C139 model with which I have extensive |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
350 personal experience) the FFS stores only users' personal information and nothing |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
351 more. One can turn the phone off, use fc-loadtool to erase the FFS sectors, and |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
352 boot the regular fw back up; the fw will automatically do a new FFS format (it |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
353 even displays a message on the LCD as it does so) and carry on happily as a |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
354 "fresh" or "blank", perfectly functional and usable phone. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
355 |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
356 In Pirelli's case, booting their official fw with blank FFS sectors will also |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
357 result in the FFS being automatically formatted, but their fw expects some |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
358 static "asset" files to be present in this FFS: UI graphics and language |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
359 strings, ringtones, firmware images for the WiFi and VoIP processors and some |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
360 static configuration files, about 3 MiB in total. Thus although the firmware |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
361 will auto-format the blank FFS sectors, it won't function normally with all of |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
362 these "asset" files missing. Foxconn's original factory production line station |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
363 must have uploaded these files to each phone via the TMFFS2 protocol, and our |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
364 FreeCalypso suite now features a tool that can replicate this feat: fc-fsio. |
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
365 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
366 Aftermarket FFS for FreeCalypso on Compal & Pirelli targets |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
367 =========================================================== |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
368 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
369 When we run our own FreeCalypso fw on "alien" (not native to us) Mot C1xx and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
370 Pirelli DP-L10 hardware, we don't use the FFS from their respectively original |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
371 firmwares: those original FFS instances don't contain any bits of interest to |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
372 us, trying to make our fw use the same FFS as Mot/Compal's or Pirelli's original |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
373 fw would be more trouble than benefit, and on one of the target devices in this |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
374 family (Mot C155/156) the original FFS is in some different format. Instead we |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
375 create our own aftermarket FFS for our FreeCalypso fw on these alien hw targets, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
376 using a different flash location from the original so that the original fw's FFS |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
377 cannot be mistaken for our own. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
378 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
379 On the Pirelli DP-L10 we put our aftermarket FFS in an area of the flash which |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
380 the official fw family uses as a staging area for over-the-air firmware updates, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
381 thus as long as you are not doing official fw updates over WLAN (i.e., if you |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
382 only run one fixed official fw version or flash different official fw versions |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
383 with fc-loadtool without going through "fw update" protocols), our aftermarket |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
384 FFS used by our run-from-RAM FreeCalypso firmwares should remain undisturbed |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
385 while the phone is in the official fw mode. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
386 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
387 The situation is different on Mot C1xx phones. The lower-end C1xx models |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
388 including the C139 (our primary hw target in this family) have too little RAM |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
389 to run our FreeCalypso fw entirely out of RAM without flashing; the C155/156 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
390 subfamily does have enough RAM to allow a complete FC GSM fw image to be loaded |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
391 and run via fc-xram under some conditions (we previously supported such usage |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
392 in our now-retired Citrine fw and may bring it back in the gcc-built config of |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
393 FC Selenite), but there is no place in the flash where we can put our |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
394 aftermarket FFS without overwriting some part of the original fw or its data - |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
395 thus our general procedure for running FreeCalypso on any C1xx model is to |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
396 convert the victim phone to FC on a long-term basis by flashing our modified |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
397 bootloader, flashing one of our fw builds and establishing a FreeCalypso |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
398 aftermarket FFS in a flash area designated by us. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
399 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
400 It was already mentioned earlier that the factory RF calibration values on these |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
401 alien phones are stored in non-TIFFS flash data structures of Mot/Compal's or |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
402 Foxconn's invention, and our currently supported FreeCalypso firmwares |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
403 (Magnetite and Selenite) do not contain any code for reading these alien data |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
404 structures. (FC Citrine could read directly from Pirelli's factory data block, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
405 but none of our fw offerings ever parsed Compal's weird flash records.) Instead |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
406 our current approach is to have an external tool extract the bits of interest |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
407 from the alien factory records, convert them to our TI-standard format if |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
408 necessary, and upload them into our FreeCalypso aftermarket FFS. The specifics |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
409 are as follows: |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
410 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
411 * The Pirelli DP-L10 is a breeze: simply run our special pirelli-magnetite-init |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
412 command in fc-fsio while connected to a Magnetite or Selenite fw instance |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
413 running with our aftermarket FFS, and the tool will copy both the IMEI and |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
414 the RF calibration records from Pirelli's factory data block into our |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
415 aftermarket FFS. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
416 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
417 * Mot C1xx phones present a lot more hassle: our current official procedure is |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
418 to make a dump of the flash prior to the xenotransplantation procedure (also |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
419 serves as a backup), extract the RF calibration values with our c1xx-calextr |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
420 tool, and then later in the procedure when you initialize your aftermarket FFS |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
421 with fc-fsio, upload these extracted and format-converted RF calibration files |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
422 as one of the several steps involved. You will need to enter your IMEI |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
423 manually: we never figured out where Mot/Compal have it stored and how it is |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
424 obfuscated. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
425 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
426 FreeCalypso host tools for TIFFS |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
427 ================================ |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
428 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
429 Our FC host tools package supports TIFFS in two ways: |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
430 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
431 1) Our primary tool for working with GSM device file systems is fc-fsio. When |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
432 run against a compatible firmware version (primarily our own, but Pirelli's |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
433 proprietary fw is also compatible), fc-fsio allows various read and write |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
434 operations to be performed on the target device FFS. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
435 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
436 2) We have a TIFFS In Vitro Analyzer (IVA) tool for "in vitro" examination of |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
437 FFS images that have been read out of raw flash with fc-loadtool. See the |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
438 TIFFS-IVA-usage article for more information. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
439 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
440 In addition to the above, back in the days of Openmoko (back when the Openmoko |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
441 community was still active and we considered ourselves a part of it) we had |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
442 produced a kit for editing the modem FFS on Openmoko GTA01/02 devices, giving |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
443 users an easy way to change their /pcm/IMEI file. Changing IMEIs for no good |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
444 reason is completely pointless and is actually detrimental rather than helpful |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
445 for privacy, but whoever came up with the edicts that "the IMEI MUST be |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
446 immutable" had obviously failed Human Psychology 101: declaring something to be |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
447 forbidden causes people to want it simply because it is forbidden and for no |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
448 other reason - hence the popular demand for IMEI changing tools. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
449 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
450 Our Openmoko FFS editing kit from early 2014 consisted of a very early version |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
451 of what much later became the present FC host tools package (more specifically, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
452 it was before fc-fsio, and the set-imeisv command had been hacked into fc-tmsh |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
453 instead) plus a pair of "in vivo" FFS editing agent target binaries. Our |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
454 current FC host tools fully supplant the ancient version in that 2014 kit, but |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
455 we do not currently have a non-deprecated replacement for the old "in vivo" FFS |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
456 editing agent: those FFS editing agent binaries were built from our old gsm-fw |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
457 framework which was deemed to be a dead end in 2016 and fully retired in 2018. |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
458 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
459 We have not produced a new and actively maintained replacement for the "in vivo" |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
460 FFS editing function which was previously provided as a side product of the old |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
461 gsm-fw framework because we have no real need for it: the *only* use case we |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
462 have for it involves Openmoko devices, and even then only two special use cases: |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
463 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
464 1) If someone wishes to change their IMEI from within the FreeRunner (without |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
465 using an external serial cable) *or* while keeping an old firmware version |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
466 (without updating to moko13 or later), or |
0
e7502631a0f9
initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
467 |
431
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
468 2) If someone has updated the modem fw on their FR to one of our current |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
469 releases, wishes to fix the /gsm/com/rfcap file to reflect the true tri900 or |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
470 tri850 band configuration of their device, but wishes to do it from within the |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
471 FR, without using an external serial cable. |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
472 |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
473 If anyone does need to exercise one of the two special use cases listed above, |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
474 they can use the "in vivo" FFS editing agent binaries from the ancient |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
475 ffs-edit-kit-r1.tar.bz2 package - they are ancient, but will do the job just |
579441d7dcd8
doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents:
0
diff
changeset
|
476 fine for both use cases in question. |