Translation(s): none

Modern kernels need a relatively recent version of the u-boot firmware. If you still use old firmware (including what Global Scale ships on the units by default), then you need to update, which requires having the JTAG dongle (to gain console serial port access). One way to know you've got old firmware is if booting a Linux kernel results in errors about corrupt gzip data and a failure to launch the kernel.

Note that re-flashing firmware will erase all configuration variables. If preserving your existing boot config is important, use printenv and make notes before proceeding. Also note that any time you're re-flashing boot firmware, there is a slight chance you could 'brick' your device leaving it unbootable. If that happens, the JTAG interface can be used to recover.

Updating DreamPlug's U-Boot

These instructions are from Ian Campbell, using uboot version 2012.04.01-2, which is the current version in Debian's Wheezy release.

Prepare your system::

# wget
# dpkg-deb -x u-boot_2012.04.01-2_armel.deb u-boot_2012.04.01-2_armel
# cp -r u-boot_2012.04.01-2_armel/usr/lib/u-boot/dreamplug /mnt

Move the USB drive to your DreamPlug, and connect to your system via the JTAG dongle. Connect the UART DreamPlug port to the JTAG Board's UART port or connect the JTAG DreamPlug port to the JTAG Board's JTAG port. Next, plug the USB cord into your main system and access the serial port with::

# screen /dev/ttyUSB0 115200

Now, interrupt the boot process so you can flash it from within the bootloader, before the GNU/Linux system takes over::

> usb start
> fatload usb 2 0x6400000 dreamplug/u-boot.kwb
> sf probe 0
> sf erase 0x0 0x80000
> sf write 0x6400000 0x0 0x${filesize}

You must, of course, fill in the size of u-boot.kwb file you're loading in hex. That will make the last command look like:

Note that there is no $ in that command.

To convert the file's size to hex, try entering the file size in bytes (which you can get from running ls -l u-boot.kwb at a command prompt) into the following search:

This handy table lists the file sizes for all versions we know of:

At this point, you should be able to reset the DreamPlug and have it boot to a serial console prompt. If that fails, you'll need real JTAG magic to try again.

Unbricking a DreamPlug

Sometimes, things go wrong when updating the firmware (notably: when you restart the DreamPlug between the "sf erase" and "sf write" commands), and you'll need to completely recover the system from scratch. Follow these instructions.

These instructions were copied and edited from:

These instructions should get you from a Bricked DreamPlug to getting U-Boot running in Ram ready to restore your system from USB/TFTP.

  1. First, install the required packages:
    sudo apt-get install openocd telnet screen
    I have found that openocd in Wheezy (0.5.0-1) has some bugs. Taking openocd package source from Jessie (0.7.0-2) and building from source on wheezy gives me a working system. --- Alex Owen
  2. Connect & Power up your device with the mini USB cable and JTAG.

  3. Open a terminal session and connect to the plug console:
    screen /dev/ttyUSB0 115200
  4. Open a 2nd terminal session.
    sudo openocd -f /usr/share/openocd/scripts/board/sheevaplug.cfg -s /usr/share/openocd/scripts
  5. You should see output similar to this:
    Open On-Chip Debugger 0.4.0 (2010-10-08-15:52)
    Licensed under GNU GPL v2
    For bug reports, read
    2000 kHz
    trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
    jtag_nsrst_delay: 200
    jtag_ntrst_delay: 200
    dcc downloads are enabled
    Warn : use 'feroceon.cpu' as target identifier, not '0'
    Info : clock speed 2000 kHz
    Info : JTAG tap: feroceon.cpu tap/device found: 0x20a023d3 (mfg: 0x1e9, part: 0x0a02, ver: 0x2)
    Info : Embedded ICE version 0
    Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
  6. If you are using a JTAG and getting errors at this point replug or even swap JTAG cables and retry.
  7. Next open a 3rd terminal session.
    telnet localhost 4444
  8. Output should look like this:
    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.
    Open On-Chip Debugger
  9. Then, in that third session, run:
    reset;sheevaplug_init;load_image u-boot.elf;resume 0x00600000
  10. Now you should see U-Boot starting to run in the 1st terminal session and you are ready to start restoring your plug.
  11. DON'T turn off your DreamPlug. Follow the "Updating the ?DreamPlug's U-Boot" instructions.