SPI FLASH Recovery for XO-1.75 Using JTAG

From OLPC
Jump to navigation Jump to search
  This page is monitored by the OLPC team.

If you have an XO-1.75 that will not start Open Firmware, you should first try to recover it with CForth, per SPI FLASH Recovery for XO-1.75 Using CForth. If that doesn't work, and you have a Marvell JTAG setup, you may be able to recover it with JTAG.

You need

  • The Marvell xTreme Debugger software - the version that includes the support files for the MMP2 chip (if you don't know how to get it, you probably can't get it...).
  • A Windows system to run the software (it works in a virtual machine)
  • An XO-1.75 with the JTAG connector installed
  • The special JTAG adapter cable that connects to the XO-1.75's JTAG connector
  • The OLPC JTAG Support Tools (see below)
  • A serial connection to the XO-1.75's internal serial port

Getting the OLPC JTAG Support Tools

Download http://dev.laptop.org/~wmb/xdbkit.zip

Unpack xdbkit to C:\Program Files\Marvell\XDB5.0\xdb\configurations - when you are done, configurations should have a subdirectory named OLPC .

Procedure

  • Connect the JTAG box to the XO-1.75
  • Connect the serial port to the XO-1.75 and start a terminal program to talk to it
  • Power on the XO-1.75
  • Start Marvell xTreme Debugger.
  • In the startup dialog, browse to C:\Program Files\Marvell\XDB5.0\xdb\configurations and select the file olpc.xsf
  • Optional: if you have trouble later, with xTreme Debugger not connecting to the XO-1.75, at this stage you can click on Settings, find the "Connect from Reset" choice, and select that.
  • Get back out to the main startup dialog.
  • Click "Start"
  • Eventually, if you are lucky, Marvell xTreme Debugger will connect to the board, and a new row of buttons will appear in the menu bar at the top of the window.
  • Resize the Marvell xTreme Debugger window (it opens in full-screen mode) so you can see the terminal emulator.
  • While holding down the XO-1.75's rotate button (underneath the board near the power connector), click on the CFORTH button (in the debugger's menu bar).
  • If you are lucky (are you feeling lucky, punk ?), the debugger will download CForth in the XO-1.75's SRAM and CForth signon message will appear in the terminal window, followed by "Skipping OFW" and an "ok" prompt.
  • Click on the DLOFW button. That will copy OFW into the XO-1.75's DRAM.
  • When that finishes, type "reflash0" at the ok prompt in the terminal window. You should see "Erasing", then after some time "Programming", then finally "Verifying".
  • When the ok prompt reappears, the XO-1.75's SPI FLASH has been rewritten. You can now power cycle, and the machine should start normally.
  • Update OFW using normal procedures (such as from a USB stick) if the version you have reflashed per the above is out of date.

Updating the cforth.bin and ofw.rom Files

The cforth.bin and ofw.rom files in the OLPC directory might be out of date. If they are so out of date that the system won't work after you do the above procedure, you can try with a new copy of ofw.rom , and maybe a new cforth.bin . ofw.rom is a verbatim copy of an OFW release file (like q4b05.rom), so you can get a new copy from http://dev.laptop.org/pub/firmware and copy it into the OLPC directory, renaming it to ofw.rom .

You can probably get away with an old cforth.bin, but if not, you can extract a new one from the ofw.rom with:

 $ dd if=ofw.rom of=cforth.bin bs=1 skip=8192 count=122880