annotate doc/Flash-boot-defect @ 238:08ad558c1fbc

CHANGES: exitcodes.h addition documented
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 20 Aug 2017 18:40:03 +0000
parents de8f75783b3b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
205
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 As of this writing (2017-05-01), there is an unexplained hardware problem on
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 some of our FCDEV3B boards in that flashed firmware images which use flash boot
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 mode 1 (see the Flash-boot-modes article) fail to boot. It is not currently
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 known how many boards are affected by this problem; it is possible that the
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 Mother's S/N 001 board is the only one that exhibits this oddity.
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 This problem particularly affects our FC Magnetite firmware, as the latter uses
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 flash boot mode 1 just like TI's TCS211 fw from which it originates. OTOH, our
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 FC Citrine firmware, which uses flash boot mode 0, boots just fine. A minimal
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 test case has been created under target-utils/flash-boot-test in this
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 repository: it is a simple loadagent-like standalone application that is built
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 to be booted from flash instead of expecting to be loaded serially, and it is
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 built in two versions, one for mode 0 and another for mode 1. Both versions
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 work on an Openmoko-made GTA02 (the mode 1 version continuously reboots every
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 few seconds because it doesn't disable the watchdog timer, but it is still very
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 clearly alive) as well as on those FCDEV3B boards which aren't affected, but on
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 FCDEV3B S/N 001 the mode 1 version fails to boot just like the full Magnetite
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 firmware.
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 The Mother of FreeCalypso does not currently have any prognosis as to when or
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 even if the mysterious hardware problem that causes flash boot mode 1 to fail
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 can be fixed. Logical reasoning tells us that it must be a hardware problem,
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 as the flash boot mode in question works without a hitch on every pre-existing
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 Calypso device known to us, and similar logical reasoning tells us that the
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 watchdog timer probably has to be involved in some way, as it is the mechanism
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 underlying flash boot mode 1 (again, see the Flash-boot-modes article), but I
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 am at a total loss when it comes to what kind of board-level problem could
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 possibly produce such behaviour. But then if only the S/N 001 board is affected
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 and no others, it could just be a defective chip. More data points need to be
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 gathered before we shall know whether or not we have a real problem.
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 For those who do have a flash-boot-challenged FCDEV3B board, two workarounds
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 have been developed, in this chronological order:
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 1. One can boot the board in the serial download mode, and download a
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 teensy-tiny piece of code that disables the boot ROM and jumps to address 0.
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 If the flash contains a firmware image meant to be booted in mode 1, this
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 image will get indirectly booted in this manner. Run a command like this:
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 fc-iram -h fcfam /dev/ttyXXX /opt/freecalypso/target-bin/flash-boot-wa.srec rvinterf
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 (fc-iram has been extended to support second program invokation just like
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 fc-xram, just for this peculiar use case. The flash-boot-wa.srec helper can
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 also be booted via fc-xram.)
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 2. After doing the above, I found a way to patch the Magnetite firmware image
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 to boot in mode 0 - see the Flash-boot-mode-hack write-up in the Magnetite
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 source tree. With this patch applied, FC Magnetite happily boots directly
de8f75783b3b Flash-boot-defect and Flash-boot-modes documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 from flash on my board without needing fc-iram or fc-xram assistance.