r4789 - in developers/werner/fake-calup: . bin

werner at docs.openmoko.org werner at docs.openmoko.org
Sat Nov 15 21:35:55 CET 2008


Author: werner
Date: 2008-11-15 21:35:55 +0100 (Sat, 15 Nov 2008)
New Revision: 4789

Added:
   developers/werner/fake-calup/README
Modified:
   developers/werner/fake-calup/bin/cal-backup
   developers/werner/fake-calup/bin/cal-flash
   developers/werner/fake-calup/bin/cal-sum-installed
Log:
A few small fixes and a README.



Added: developers/werner/fake-calup/README
===================================================================
--- developers/werner/fake-calup/README	                        (rev 0)
+++ developers/werner/fake-calup/README	2008-11-15 20:35:55 UTC (rev 4789)
@@ -0,0 +1,59 @@
+Testing (on the host):
+
+make test
+
+The file "current" contains the currently "installed" firmware.
+
+
+Templates
+---------
+
+bin/cal-id-installed
+  Prints the human-readable name of the current GSM firmware.
+
+bin/cal-id-file <file>
+   Prints the human-readable name of the GSM firmware in <file>.
+
+bin/cal-sum-installed
+  Prints a unique checksum of the installed firmware.
+
+bin/cal-sim-file <file>
+  Prints a unique checksum of the firmware file <file>.
+
+bin/cal-flash <file>
+  Installs the firmware <file> on the Calypso.
+
+bin/cal-backup <file>
+  Backups the current GSM Flash content to <file>
+
+
+Note: the following equalities should hold true:
+
+  foo=`cal-id-file fw/whatever`
+  cal-flash fw/whatever
+  [ $foo = `cal-id-installed` ]
+
+and
+
+  foo=`cal-sum-file fw/whatever`
+  cal-flash fw/whatever
+  [ $foo = `cal-sum-installed` ]
+
+cal-sum-* should compare the file content file cal-id-* can use some
+less reliable mechanism, e.g., the file name or an AT command.
+
+
+Recovery
+--------
+
+There is no automatic way to restore a backup. This is intentional.
+The idea is that the firmware update image contains not only the
+latest firmeware (or maybe even multiple new versions), but also a
+suitably safe fallback firmware, e.g., moko8.
+
+Thus the backup would only be used if there's a problem in the
+flashing process itself or if there is an unexpected incompatibility
+between the phone and even the fallback firmware.
+
+If a backup needs to be restore, we'll have to devise a suitable
+manual procedure.

Modified: developers/werner/fake-calup/bin/cal-backup
===================================================================
--- developers/werner/fake-calup/bin/cal-backup	2008-11-15 20:08:34 UTC (rev 4788)
+++ developers/werner/fake-calup/bin/cal-backup	2008-11-15 20:35:55 UTC (rev 4789)
@@ -7,5 +7,6 @@
 #
 
 cp current "$1"
+sync
 
 exit 0

Modified: developers/werner/fake-calup/bin/cal-flash
===================================================================
--- developers/werner/fake-calup/bin/cal-flash	2008-11-15 20:08:34 UTC (rev 4788)
+++ developers/werner/fake-calup/bin/cal-flash	2008-11-15 20:35:55 UTC (rev 4789)
@@ -3,9 +3,10 @@
 #
 # cal-flash <file>
 #
+#
+# Installs the firmware <file> on the Calypso.
+#
 
-Installs the firmware <file> on the Calypso.
-
 echo "$1" >current
 
 exit 0

Modified: developers/werner/fake-calup/bin/cal-sum-installed
===================================================================
--- developers/werner/fake-calup/bin/cal-sum-installed	2008-11-15 20:08:34 UTC (rev 4788)
+++ developers/werner/fake-calup/bin/cal-sum-installed	2008-11-15 20:35:55 UTC (rev 4789)
@@ -7,4 +7,4 @@
 # identical to the one cal-sum-file produces for the same firmware.
 #
 
-cat current | md5sum
+cal-id-file "`cat current`" | md5sum




More information about the commitlog mailing list