annotate doc/TIFFS-Overview @ 482:3100f534340b

doc updates for Compal FFS
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 07 Mar 2019 01:28:32 +0000
parents 579441d7dcd8
children 23f41a61ff7a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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.
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
146 C11x/12x use smaller FFS configurations, whereas C155/156 use a different FFS
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
147 implementation with a completely different on-flash format - see the new
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
148 Compal-FFS article for more details.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
150 * 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
151 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
152 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
153 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
154 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
155
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 * 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
157 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
158 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
159 RAM without real flash).
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 * 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
162 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
163
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 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
165
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 46 66 73 23 10 02
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 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
169 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
170 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
171 (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
172 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
173
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 How it works
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
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 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
178 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
179 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
180 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
181 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
182 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
183 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
184 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
185 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
186
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 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
188 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
189 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
190
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 * 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
192 byte in the block header;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 * 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
194 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
195 in the type/flags/status byte;
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 * 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
197 at some point.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 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
200 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
201 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
202 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
203 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
204 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
205 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
206 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
207 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
208 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
209 accessible.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 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
212 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
213 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
214 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
215 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
216 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
217 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
218 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
219 gracefully from any such event.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 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
222 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
223 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
224 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
225 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
226 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
227 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
228 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
229 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
230 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
231 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
232 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
233 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
234
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 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
236 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
237 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
238 code.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 How this FFS comes into being
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
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 (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
244 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
245 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
246
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 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
248 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
249 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
250 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
251 "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
252 test" phase.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
254 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
255 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
256 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
257 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
258
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 * 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
260 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
261 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
262 (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
263 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
264 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
265
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 * 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
267 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
268 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
269
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 * 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
271 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
272 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
273 step, and the FFS sectors remain blank.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 * 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
276 boots for the first time.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 * 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
279 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
280 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
281 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
282 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
283 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
284
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 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
286 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
287 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
288 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
289 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
290 "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
291 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
292 '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
293 in them.
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 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
296 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
297 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
298 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
299
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
300 * 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
301 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
302 measurements;
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
303
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
304 * 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
305 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
306 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
307
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
308 * 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
309 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
310 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
311
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
312 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
313 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
314 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
315 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
316 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
317 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
318 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
319 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
320
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
321 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
322 /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
323 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
324 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
325 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
326 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
327 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
328 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
329
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
330 * 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
331 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
332 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
333
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
334 * 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
335 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
336
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
337 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
338
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 Compal and Pirelli differences
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
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342 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
343 like Openmoko (FIC) was the only phone/modem manufacturer (prior to us!) who
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
344 followed it without major deviations. In contrast, both Compal (Motorola C1xx
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
345 and Sony Ericsson J100) and Foxconn (Pirelli DP-L10) moved their vital per-unit
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
346 factory data (IMEI and RF calibration) out of the FFS into their own ad hoc
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
347 flash data structures (which are very difficult to reverse-engineer and make
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
348 use of, unfortunately), leaving 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
349
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
350 In Compal's case (all C1xx models and SE J100) the FFS stores only users'
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
351 personal information and nothing more. One can turn the phone off, use
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
352 fc-loadtool to erase the FFS sectors, and boot the regular fw back up; the fw
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
353 will automatically do a new FFS format (it even displays a message on the LCD
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
354 as it does so) and carry on happily as a "fresh" or "blank", perfectly
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
355 functional and usable phone. Please see the new Compal-FFS article for further
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
356 details.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358 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
359 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
360 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
361 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
362 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
363 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
364 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
365 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
366 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
367
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
368 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
369 ===========================================================
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
371 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
372 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
373 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
374 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
375 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
376 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
377 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
378 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
379 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
380
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
381 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
382 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
383 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
384 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
385 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
386 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
387 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
388
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
389 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
390 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
391 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
392 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
393 and run via fc-xram under some conditions (we previously supported such usage
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
394 in our now-retired Citrine fw and we also support it in the gcc-built config of
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
395 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
396 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
397 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
398 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
399 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
400 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
401
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
402 It was already mentioned earlier that the factory RF calibration values on these
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
403 alien phones are stored in non-TIFFS flash data structures of Compal's or
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
404 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
405 (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
406 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
407 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
408 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
409 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
410 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
411 are as follows:
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
413 * 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
414 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
415 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
416 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
417 aftermarket FFS.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
419 * 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
420 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
421 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
422 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
423 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
424 as one of the several steps involved. You will need to enter your IMEI
482
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
425 manually: we never figured out where Mot/SE/Compal have it stored and how it
3100f534340b doc updates for Compal FFS
Mychaela Falconia <falcon@freecalypso.org>
parents: 431
diff changeset
426 is obfuscated.
0
e7502631a0f9 initial import from freecalypso-sw rev 1033:5ab737ac3ad7
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
428 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
429 ================================
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 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
432
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
433 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
434 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
435 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
436 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
437
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
438 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
439 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
440 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
441
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
442 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
443 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
444 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
445 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
446 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
447 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
448 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
449 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
450 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
451
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
452 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
453 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
454 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
455 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
456 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
457 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
458 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
459 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
460
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
461 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
462 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
463 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
464 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
465
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
466 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
467 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
468 (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
469
431
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
470 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
471 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
472 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
473 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
474
579441d7dcd8 doc/TIFFS-Overview: long-overdue update for the current state of FC
Mychaela Falconia <falcon@freecalypso.org>
parents: 0
diff changeset
475 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
476 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
477 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
478 fine for both use cases in question.