NOR flash utility

Werner Almesberger werner at
Tue Feb 26 05:34:38 CET 2008

A little utility to flash the GTA02 NOR:

It takes a file and writes it into the GTA02 NOR flash.
(It runs on the target, but I put it under trunk/src/host/...,
because the devirginator needs it.)

Its actions are determined by the previous NOR content:

- if the NOR already contains the desired file, it does nothing
  (E.g., if a board is rebooted at DM2, or if a board comes back
  from DM2 and goes through DM1.5 again.)

- if the NOR is erased, if just writes the new file
  (E.g., if the NOR is programmed for the first time. This should
  be the most common case.)

- if the NOR contains something else, it erases it, then writes
  the new data
  (E.g., if a board is recycled while we are switching the NOR
  content. This should be very uncommon.)

These actions take <1s, about 5-6s, and 15s, respectively.

Miles, the easiest way to use this would be to launch it in the
background when the system starts, and test for its completion
at the end of DM1.5.

I don't think the tests in DM1.5 are particularly sensitive to
the background load of the system, so this should help to avoid
having to wait for the NOR operation to complete.


( flashnor nor.bin && touch /tmp/nor-done; ) &

Then you can simply check if /tmp/nor-done exists.

I put an example NOR image on

- Werner

More information about the openmoko-kernel mailing list