Change in osmocom-bb[master]: firmware/lib: introduce TIFFS filesystem support

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Wed Feb 13 11:54:15 UTC 2019


Hello Max, Harald Welte, Jenkins Builder, 

I'd like you to reexamine a change. Please visit

    https://gerrit.osmocom.org/12885

to look at the new patch set (#2).

Change subject: firmware/lib: introduce TIFFS filesystem support
......................................................................

firmware/lib: introduce TIFFS filesystem support

All known TI GSM firmwares implement some kind of flash file system, or FFS.
We call it TIFFS (Texas Instruments FFS) because it is TI's invention.

TIFFS is a file system with a hierarchical directory tree structure, and
with Unixy forward-slash-separated, case-sensitive pathnames; the semantics
of "what is a file" and "what is a directory" are exactly the same as in
UNIX; and TIFFS even supports symlinks, although that support is a little
under-developed, and apparently no FFS symlinks were ever used in any
production GSM device. Thus the FFS implemented in TI-based GSM devices
(modems and "dumbphone" handsets) is really no different from, for example,
JFFS2 in embedded Linux systems.

The FFS in a GSM device typically stores two kinds of content:

  - Factory data: IMEI, RF calibration values, device make/model/revision
    ID strings etc.  These files are expected to be programmed on the
    factory production line and not changed afterward.

  - Dynamic data written into the FFS in normal device operation: contacts,
    settings / preferences, call history, received SMS, etc.

It should be noted that both Compal (Mot C1xx) and Foxconn (Pirelli DP-L10)
vendors moved their vital per-unit factory data out of the FFS into their
own ad hoc flash data structures, leaving their FFS only for less
critical data. However, we do enable TIFFS access for them anyway.

The location of TIFFS within the flash memory of a given GSM device is
defined by the firmware design of that device, but is always some integral
number of contiguous flash sectors.

  - On Motorola/Compal C139/140 phones, the FFS used by the original
    proprietary firmware occupies 5 sectors of 64 KiB each (320 KiB
    in total), starting at 0x370000. C11x/123 use smaller FFS
    configurations, whereas C155/156 seem to have switched to some
    other FFS format, different from our familiar TIFFS.

  - On the Pirelli DP-L10, the FFS used by the original proprietary
    firmware occupies 18 sectors of 256 KiB each (for 4.5 MiB in total),
    starting at the beginning of the 2nd flash chip select (0x02000000
    in the ARM7 address space).

  - On FCDEV3B (FreeCalypso hardware), the FFS is located in the first
    8 sectors (of 256 KiB each) in the 2nd flash chip select bank,
    which appears at 0x01800000 in the ARM7 address space.

  - On the GTA01/02 GSM modem, FFS occupies 7 sectors of 64 KiB each,
    starting at flash offset 0x380000.

For more information, please refer to the FreeCalypso project
documentation, from where this great contribution comes from.

Please note that existing MediaTek targets most likely use different
storage format as they have nothing from TI Calypso. Also, we don't
(yet) know the location of TIFFS on SE J100i and some other
Compal Exx platforms.

The TIFFS support is needed for the follow-up change, that
implements reading of the factory RF calibration values.

Tweaked (coding style changes) by Vadim Yanitskiy <axilirator at gmail.com>
Change-Id: If6e212baeb10953129fb0d5253d263567f5e12d6
Related: OS#3582
---
M src/target/firmware/Makefile
M src/target/firmware/board/compal_e86/init.c
M src/target/firmware/board/fcdev3b/init.c
M src/target/firmware/board/gta0x/init.c
M src/target/firmware/board/pirelli_dpl10/init.c
M src/target/firmware/include/string.h
A src/target/firmware/include/tiffs.h
M src/target/firmware/lib/Makefile
A src/target/firmware/lib/index.c
A src/target/firmware/lib/memcmp.S
A src/target/firmware/lib/strcmp.c
A src/target/firmware/tiffs/Makefile
A src/target/firmware/tiffs/globals.c
A src/target/firmware/tiffs/globals.h
A src/target/firmware/tiffs/init.c
A src/target/firmware/tiffs/readfile.c
16 files changed, 491 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/85/12885/2
-- 
To view, visit https://gerrit.osmocom.org/12885
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If6e212baeb10953129fb0d5253d263567f5e12d6
Gerrit-Change-Number: 12885
Gerrit-PatchSet: 2
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190213/598d56b4/attachment.htm>


More information about the gerrit-log mailing list