<p>Vadim Yanitskiy <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/12885">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">firmware/lib: introduce TIFFS filesystem support<br><br>All known TI GSM firmwares implement some kind of flash file system, or FFS.<br>We call it TIFFS (Texas Instruments FFS) because it is TI's invention.<br><br>TIFFS is a file system with a hierarchical directory tree structure, and<br>with Unixy forward-slash-separated, case-sensitive pathnames; the semantics<br>of "what is a file" and "what is a directory" are exactly the same as in<br>UNIX; and TIFFS even supports symlinks, although that support is a little<br>under-developed, and apparently no FFS symlinks were ever used in any<br>production GSM device. Thus the FFS implemented in TI-based GSM devices<br>(modems and "dumbphone" handsets) is really no different from, for example,<br>JFFS2 in embedded Linux systems.<br><br>The FFS in a GSM device typically stores two kinds of content:<br><br>  - Factory data: IMEI, RF calibration values, device make/model/revision<br>    ID strings etc.  These files are expected to be programmed on the<br>    factory production line and not changed afterward.<br><br>  - Dynamic data written into the FFS in normal device operation: contacts,<br>    settings / preferences, call history, received SMS, etc.<br><br>It should be noted that both Compal (Mot C1xx) and Foxconn (Pirelli DP-L10)<br>vendors moved their vital per-unit factory data out of the FFS into their<br>own ad hoc flash data structures, leaving their FFS only for less<br>critical data. However, we do enable TIFFS access for them anyway.<br><br>The location of TIFFS within the flash memory of a given GSM device is<br>defined by the firmware design of that device, but is always some integral<br>number of contiguous flash sectors.<br><br>  - On Motorola/Compal C139/140 phones, the FFS used by the original<br>    proprietary firmware occupies 5 sectors of 64 KiB each (320 KiB<br>    in total), starting at 0x370000. C11x/123 use smaller FFS<br>    configurations, whereas C155/156 seem to have switched to some<br>    other FFS format, different from our familiar TIFFS.<br><br>  - On the Pirelli DP-L10, the FFS used by the original proprietary<br>    firmware occupies 18 sectors of 256 KiB each (for 4.5 MiB in total),<br>    starting at the beginning of the 2nd flash chip select (0x02000000<br>    in the ARM7 address space).<br><br>  - On FCDEV3B (FreeCalypso hardware), the FFS is located in the first<br>    8 sectors (of 256 KiB each) in the 2nd flash chip select bank,<br>    which appears at 0x01800000 in the ARM7 address space.<br><br>  - On the GTA01/02 GSM modem, FFS occupies 7 sectors of 64 KiB each,<br>    starting at flash offset 0x380000.<br><br>For more information, please refer to the FreeCalypso project<br>documentation, from where this great contribution comes from.<br><br>Please note that existing MediaTek targets most likely use different<br>storage format as they have nothing from TI Calypso. Also, we don't<br>(yet) know the location of TIFFS on SE J100i and some other<br>Compal Exx platforms.<br><br>The TIFFS support is needed for the follow-up change, that<br>implements reading of the factory RF calibration values.<br><br>Tweaked (coding style changes) by Vadim Yanitskiy <axilirator@gmail.com><br>Change-Id: If6e212baeb10953129fb0d5253d263567f5e12d6<br>Related: OS#3582<br>---<br>M src/target/firmware/Makefile<br>M src/target/firmware/board/compal_e86/init.c<br>M src/target/firmware/board/fcdev3b/init.c<br>M src/target/firmware/board/gta0x/init.c<br>M src/target/firmware/board/pirelli_dpl10/init.c<br>M src/target/firmware/include/string.h<br>A src/target/firmware/include/tiffs.h<br>M src/target/firmware/lib/Makefile<br>A src/target/firmware/lib/index.c<br>A src/target/firmware/lib/memcmp.S<br>A src/target/firmware/lib/strcmp.c<br>A src/target/firmware/tiffs/Makefile<br>A src/target/firmware/tiffs/globals.c<br>A src/target/firmware/tiffs/globals.h<br>A src/target/firmware/tiffs/init.c<br>A src/target/firmware/tiffs/readfile.c<br>16 files changed, 491 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/85/12885/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/12885">change 12885</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/12885"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmocom-bb </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: If6e212baeb10953129fb0d5253d263567f5e12d6 </div>
<div style="display:none"> Gerrit-Change-Number: 12885 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>