New experimental gcc-built firmware

Mychaela Falconia mychaela.falconia at gmail.com
Mon Jul 30 19:00:14 UTC 2018


Hi David!

> Now is a good time to mention that I've been using my freerunner again and
> that running the recent blob free magnetite release, calls and SMS work
> without issue

Great!

I just made an updated release that includes a small recent bugfix:

ftp://ftp.freecalypso.org/pub/GSM/GTA02/gsm-fw/moko-hybrid-fw-20180730.tar.bz2

The only difference from the previous build to the above is this
recent bugfix:

https://bitbucket.org/falconian/fc-magnetite/commits/1ed9de6c90bd0bc0f890a36e85523c1fb7869ffe

That bug can only manifest itself when the firmware runs and sees
active SMS usage for a very long time without rebooting (like it would
in a flawlessly-working smartphone :), and even then I am not sure of
the exact required conditions: inside the fw, the bug will manifest if
the for_ccd_error_check() function in sms_for.c gets called repeatedly
over and over enough times to exhaust the TMS470 C library's malloc
heap, but I don't have the time allocation to dig deep and figure out
when that function gets called, except that it obviously relates to
SMS somehow.  In any case, my source fix nips the bug at its root
(that dynamic memory allocation is not needed in the first place, of
which you can convince yourselves by looking at the ccd_getFirstFault()
and ccd_getNextFault() functions in ccd_err.c), and I just put out a
new build with this fix included.

I am also going to make a new production fw release for FCDEV3B with
the same fix.

> I'm considering hacking away at one of the linux based firmwares to remove
> the software I don't use in the hope of coming up with something as stable
> as freecalypso.

For anyone working on Linux AP software for the FreeRunner, I have one
feature request: on the info screens where information about the modem
is currently reported, in addition to the strings returned by AT+CGMI,
AT+CGMM and AT+CGMR commands, please also show the string returned by
TI's non-standard AT%VER command.  AT+CGxx commands are defined by the
GSM 07.07 spec and return strings identifying the device manufacturer
(+CGMI), the device model (+CGMM) and "revision" (+CGMR).  OM's legacy
firmwares returned hard-coded strings in response to these commands,
and their AT+CGMR response identified the firmware version.  However,
in FreeCalypso I went back to TI's original way in that the responses
to these standard AT+CGxx commands identify only the hardware and not
the firmware: +CGMI identifies the physical hw manufacturer
(FIC/Openmoko or Falconia Partners LLC), +CGMM identifies the hardware
model (GTA01, GTA02, FCDEV3B etc) and +CGMR identifies the hardware
revision.  All 3 of these strings are programmed into the modem's
flash file system by the hardware manufacturer (or in very rare cases
by a service bureau repairing a unit that had its original FFS
corrupted), and are NOT contained in the firmware.

Because of this change, the "version" or "revision" string for an
Openmoko modem running any of the recent FreeCalypso fw versions
always shows something like "GTA02BV4/FreeCalypso", indicating only
the hardware revision (programmed into the FFS by OM's factory), but
not giving any useful indication as to *which* FreeCalypso fw version
is running.  The same situation holds on all newly-made FreeCalypso
modem hw: AT+CGMR will tell you the hardware revision, but not the
firmware version.  To get the firmware version, you need to issue TI's
non-standard AT%VER command, which returns the firmware version ID
string that looks like this:

FreeCalypso Magnetite hybrid, build date 2018-07-30T16:07:13Z

This AT%VER command is not a FreeCalypso invention - it was present in
TI's original firmwares and in OM's mokoN.  You can see some examples
of how those old mokoN firmwares responded to AT%VER here:

http://wiki.openmoko.org/wiki/Neo_1973_and_Neo_FreeRunner_gsm_modem

Out of that multiline %VER response returned by legacy mokoN firmwares,
the first line is the most interesting, as it gives OM's fw build date;
the other build dates are for blob components which OM could only keep
as-is.  If you are going to issue AT%VER and display the response on
the modem info screen, I recommend simply displaying the first line
returned by the modem and discarding the rest - this way you will
display the useful firmware version info whether it is FreeCalypso or
legacy mokoN.

If you need the modem info screen to work with both TI-based and non-
TI-based modems, you can conditionalize the issuance of AT%VER (which
is TI-specific) based on the strings returned in response to AT+CGMI
and AT+CGMM (standard GSM 07.07 commands): issue AT%VER only if the
modem is a known TI-based model.

Hasta la Victoria, Siempre,
Mychaela aka The Mother


More information about the Community mailing list