Flashing

Mychaela Falconia mychaela.falconia at gmail.com
Sun Aug 18 19:23:42 UTC 2019


Hello Dan,

> I'd like to flash my Freerunner from moko11 to Freecalypso

Wow, I am delighted to hear that someone is still using their Openmoko
device *and* also using its GSM phone part!  I am guessing that you
probably live in some world region where the local powers that be are
not itching to shut down GSM/2G services like they are in USA...  Do
you already have an operator-issued SIM that works with the FR modem
in its current state running moko11?  Is your FR in its current state
(with moko11) able to connect to the local GSM network in your area
and make/receive calls?  I am asking because I am trying to establish
a baseline before changing the firmware.  Or are you seeking to
migrate from the old firmware for which there is no corresponding
source to our new source-enabled fw because something is not working
correctly in the GSM part of the device and you are seeking to gain
the ability to debug and fix the problem?

The recommended flashing method depends on whether or not you are ever
interested in putting on the hat of a developer.  If you are
potentially interested in not only flashing new FreeCalypso fw
versions, but also doing some debugging or troubleshooting of GSM
functionality, then you need to get one of our special cables that
provide access to the Calypso debug port on Openmoko devices; the same
cables also work with Motorola C1xx phones.  There are many vendors
who make such cables; the two vendors I recommend are Sysmocom and
UberWaves:

http://shop.sysmocom.de/products/cp2102-25
https://www.ebay.com/itm/262274039940
https://www.ebay.com/itm/252275767181

However, this special cable is only needed if you are interested in
additional activities beyond mere flashing of fw images, e.g., if you
would like to be able to capture the debug trace from the firmware as
it runs in normal GSM operation.  If instead you are only interested
in flashing new fw images while firmly wearing the hat of an end user,
then there are several procedures for flashing the Calypso modem from
inside the FreeRunner, without using an external cable.

> without bricking

No matter which procedure you use, it is impossible to unrecoverably
brick the Calypso modem in Openmoko devices.  When the Calypso chip
powers up, it executes code from its mask ROM first (hard-cast in the
silicon and physically unmodifiable) before jumping to the fw image in
flash, and this boot ROM provides a time window for the boot process
to be interrupted and diverted via either of the two UARTs, allowing
recovery of any bricked flash.  The absolute worst thing you can do is
blow away your individual per-unit RF calibration values, but even if
you are unfortunate enough to suffer that fate (so far no one has ever
done that on a FreeRunner, although one of our community members did
once blow away the factory calibration on an FCDEV3B), even then there
is a recovery option: if you have an Openmoko-made device that has
lost its original factory RF calibration, you can send it to me, I
will recalibrate it on my CMU200 station (my setup is no worse than
what OM's factory had) and send it back to you recalibrated.

> should I follow
> http://wiki.openmoko.org/wiki/Flashing_the_GSM_Firmware and replace files
> with yours?

Yes, this method should work indeed, but I never tried it myself, and
AFAIK no one else in our little community has tried it either.  If you
go this route, you won't be able to use the "super-easy" uSD card
method unless you reverse-engineer OM's uSD card image and replace the
m0 file (the actual Calypso fw image) with the desired version, but
you should be able to do what the ancient wiki page describes as the
manual method, using a FreeCalypso fw image in the m0 format.  All
official FreeCalypso fw releases include images in both binary and m0
formats.

This flashing method uses a tool called FLUID - it was originally TI's
official flashing tool, but Openmoko modified it to run on the
FreeRunner's application processor - TI's original version ran only
under Windows.  We finally got the source code for this tool only a
couple of months ago (2019-06), and even then we only have the source
for TI's original Windows version, not OM's modified version.  Thus
for the first 6 years of our project (from 2013 till 2019) FLUID was a
proprietary program without source code, and for that reason I never
played with it - instead I wrote my own from-scratch replacement
called fc-loadtool back in 2013, and we've been using our own tools
ever since.  See this ML post from June for more information:

https://www.freecalypso.org/pipermail/community/2019-June/000678.html

> Sorry, found https://www.freecalypso.org/members/david/howtos/

Yes, all of those methods should work too.

> Is anything changed since then please tell.

We have newer fw versions since then, the latest FreeCalypso fw
release for the GTA01/02 modem is this one:

ftp://ftp.freecalypso.org/pub/GSM/GTA02/gsm-fw/moko-new-fw-20190128.tar.bz2

David wrote:

> Yes  - minor but important change due to the different size of later images.
>
> from
>
> https://www.freecalypso.org/members/david/howtos/freeing_the_freerunner.html
>
> loadtool> flash erase 0 0x300000
>
> will no longer be correct as extra blocks must be erased to suit larger image.

Actually no, that command is still good, as it erases the entire 3 MiB
"firmware partition" (the area of flash used for the firmware, as
opposed to the flash file system), more than the size of any given fw
image.  When I gave this command to David all those years ago, I
specifically gave it in this form in order to make it future-proof. :)

In this case David probably mixed up with the situation on the Mot C139
phone, where indeed I once had flashing instructions with an erase
command that is too small for the later images.

Hasta la Victoria, Siempre,
Mychaela aka The Mother


More information about the Community mailing list