Firmware bring-up status

Spacefalcon the Outlaw falcon at ivan.Harhan.ORG
Mon May 11 17:35:29 CEST 2015


Hi DS!

> In order to be able to help Mychaela with the debugging of the
> GSM stack bring-up, I planned to flash a firmware recovered from
> an old ftp by Mychaela for the C138, on my chinese C118; this
> model has a 4MB flash that makes it suitable for this larger
> than usual image, and also happens to have the JTAG pins exposed.
> Now this firmware image is particularly interesting from a debug
> point of view, since it is accompanied by the .map output file
> generated by TI's compiler, hence all the names of functions and
> memory locations are known.

It's awesome that this image we found a while back actually works on
C118 units with 4 MiB flash!  For anyone else who would like to see
it, here it is:

ftp://ftp.ifctf.org/pub/GSM/Compal/R87.2.1.03-fw-linkmap.zip

> After flashing I was first greeted by the message "FFS formatting"
> (so I guess the calibration values are gone, but it's ok since I
> made a backup of the flash contents).

Not so fast about the calibration values. :)  Just like Foxconn
(Pirelli DP-L10), Compal deviated from TI's canonical way of doing
things and moved their calibration values out of FFS into a separate
flash data structure of their own invention; in Compal's case this new
data structure is their FTM (whatever it stands for) flash sector at
0x3FC000.  Thus on Compal phones the FFS in TI's classic format stores
nothing but user data and can therefore be erased and reformatted
freely.

> The good news is, the phone
> displayed the logo then successfully attached itself to the network!
> I then made a phone call.

Awesome!

> Since the phone is now in ROM loader mode, I commented out the line
> "compal-stage plain" in /usr/local/share/freecalypso/compal.init
> Then I used fc-loadtool to properly flash the firmware:
>
> $ ./fc-loadtool -h compal /dev/ttyUSB0

There is no need to edit supposed-to-be-read-only files installed
under /usr/local/share, just add a -c none option to the command line
after -h compal. :)

> loadtool> flash program-bin 0x0 R87.2.1.03.img

Aha, I see you took care of converting Compal's variant of m0 to
straight binary before flashing.  Don't try to use loadtool's
flash program-m0 command on Compal's variant of the "m0" format, as it
won't work: my program-m0 command is designed to work with m0 files
generated with -memwidth 16 -romwidth 16 (what TI's standard TCS211
build produces), but Compal must have used -memwidth 8 -romwidth 8
instead.  Compal's variant of m0 is thus straight SREC without byte
swapping, but flash program-srec won't work with it either, as these
S-records aren't aligned to 16-bit words (the native width of the
flash).  Thus one needs to convert to straight binary first.

SF


More information about the Community mailing list