view doc/C1xx-updates @ 25:afd760eb1f8d

doc/C1xx-updates: new article
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 11 Jun 2023 20:57:23 +0000
parents
children
line wrap: on
line source

In C1xx-flashing article we have covered how to initially flash FreeCalypso
aftermarket firmware into a C1xx phone and how to restore that phone back to its
original state.  However, what about updates?  What if your C1xx phone is
currently flashed with FreeCalypso and you would like to load a new firmware
build?  Or what if there is a new release of our FFS data bundle package with
updates that are relevant to C1xx targets?  How do you update these components
in your FC-on-C1xx flash?  There are two approaches, both described in this
article.

Full reflashing method
======================

If your C1xx phone is currently flashed with a FreeCalypso fw version from ages
ago, or you just don't know its exact state and would rather not depend on it,
you can simply follow the regular flashing procedure described in the
C1xx-flashing article.  If you run c1xx-analyze-image on a flashdump.bin image
that is FC aftermarket, the analysis script will detect this condition and
report it in its verbose output.  Generation of restore-flash script will be
skipped in this scenario - you don't have an original Motorola flash image to
restore - but you can still always flash any of Mot fw images posted on our FTP
site, just not with these scripts.

If you already have a per-phone project directory in which you've already run
c1xx-analyze-image and you simply wish to rerun the
{c11x,c139,c155}-gen-fc-script step, please feel free to do so.  The newly
generated fc-flash-script will refer to whichever firmware image you name on
the command line when you run the generator script anew, and fc-ffs.bin will be
regenerated based on your current state of /opt/freecalypso installation, which
is where all ffs-data-bundle updates go.  You can then execute the new
fc-flash-script in fc-loadtool just like the first time, and the phone will be
brought to the new state.

Fine-grained reflashing
=======================

If you are actively iterating, flashing new fw images as you build them, it
makes the most sense to reflash just the fw component, without touching the
dangerous boot sector (FreeCalypso bootloader never changes) and without having
to blow away and reflash your FFS.  In this scenario, make fc-loadtool entry as
usual and then execute a command of the following form:

On C11x/12x and C139/140 subfamilies:

loadtool> flash e-program-bin 0x10000 path/to/fwimage.bin

Or on C155/156 subfamily:

loadtool> flash e-program-bin 0x20000 path/to/fwimage.bin

Updating and reflashing just the FFS part
=========================================

If you wish regenerate fc-ffs.bin only (presumably to pick up updates to FFS
data bundle bits under /opt/freecalypso) without flashing or even naming a new
FC firmware image, you can run one of these scripts:

c11x-gen-fc-ffs-img rfbin IMEI 2m	-- for C11x/12x with 2 MiB flash
c11x-gen-fc-ffs-img rfbin IMEI 4m	-- for C11x/12x with 4 MiB flash
c139-gen-fc-ffs-img rfbin IMEI		-- for C139/140 (always 4 MiB flash)
c155-gen-fc-ffs-img rfbin IMEI		-- for C155/156 (always 8 MiB flash)

When you are ready to reflash fc-ffs.bin with fc-loadtool, whether it's because
you just regenerated it or because you simply wish to reset your FC FFS to its
pristine state, execute one of these commands:

for 2 MiB flash:

loadtool> flash e-program-bin 0x1C0000 fc-ffs.bin

for 4 MiB flash:

loadtool> flash e-program-bin 0x300000 fc-ffs.bin

for 8 MiB flash:

loadtool> flash e-program-bin 0x700000 fc-ffs.bin

You can also make "organic" updates to your FFS with fc-fsio, without going in
"brute force" with fc-loadtool - but you understand the workings of FreeCalypso
to that level, you probably won't be reading this guide or using any of these
scripts.