view openmoko/flash-modem.sh @ 995:74024eb17e04

fc-loadtool help: improve language regarding 16 MiB flash chips In FC project history, 16 MiB flash originally meant Pirelli DP-L10. Then we got FCDEV3B with the same flash (our own design), but now we are discovering more Calypso devices that used such large flash, both late Calypso era (Sony Ericsson K2x0) as well as much earlier ones (FIC FLUID devices.txt file with 2004 dates, Leonardo+ rev 5). Hence we need to migrate to more generic or neutral language in associated documentation, without giving elevated status to specific examples that drove our early project history.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 03 Dec 2023 21:11:12 +0000
parents 8bea9cdd8a89
children
line wrap: on
line source

#!/bin/sh

# This script shows how to flash an Openmoko modem (GTA01/02) with a new
# firmware image (in either *.m0 or *.bin format) in a fully automated manner
# using the new batch mode of fc-loadtool, running from inside the phone.
# This script should be used as a starting point by anyone who may be putting
# together an automated firmware update mechanism similar to OM's uSD card
# automated flasher.
#
# The flashing commands used here are correct ONLY for Openmoko and similar
# modems, _NOT_ for Motorola C1xx phones!!!  If you use these commands on a
# Mot C1xx phone, you will unrecoverably brick it!

if [ $# != 1 ]
then
	echo "usage: $0 firmware-image-file" 1>&2
	exit 1
fi

case "$1" in
	*.bin)
		BATCH_CMD="flash e-program-bin 0 $1"
		;;
	*.m0)
		BATCH_CMD="flash e-program-m0 $1"
		;;
	*)
		echo "error: format of $1 not recognized" 1>&2
		exit 1
esac

/opt/freecalypso/bin/fc-loadtool -h fic -Plm -t1300 /dev/ttySAC0 $BATCH_CMD