CM-X300: U-Boot: Disabled Module Recovery

From Compulab Mediawiki
Jump to: navigation, search

Overview

The CM-X300 firmware is required for hardware initialization, setup and operating system loading. The firmware resides in the beginning of the NAND flash (0x0 - 0x80000), therefore any write to this location, except for the update procedure, will corrupt the CM-X300 firmware.
While updating the CM-X300 firmware, there is a possibility that the update will not perform as expected and CM-X300 firmware can become invalid. This will result in a disabled CM-X300.
In such cases, CompuLab offers two solutions:

  1. Send the disabled board to CompuLab for reprogramming
  2. Recover the CM-X300 disabled module with Recovery baseboard

Sending disabled CM-X300 module to CompuLab

This option is recommended for one-time CM-X300 recovery.
This option is not recommended for U-Boot developers, as sending boards to CompuLab takes time and impacts the development process.
To continue with the RMA procedure, please consult CompuLab website.

CM-X300 Recovery baseboard

The CM-X300 Recovery baseboard is not fully functional baseboard for CM-X300. It is used only to recover the disabled CM-X300.
It has the following items assembled:

  • 9-pin serial port for U-Boot console
  • Ethernet port
  • 2 USB ports (lower port can be used only on modules with no W option)
  • 3-pin power connector
  • CAMI connectors (for CM-X300 placement)
  • Write-protected NAND flash (storing the working copy of CM-X300 firmware and automatic update script)
  • Reset button (SW1)
  • Update button (SW3)

Getting started with the recovery process

Make sure you have the following items at hand:

  • CM-X300 Recovery baseboard
  • Serial cable
  • PSU for the Recovery baseboard
  • Ethernet cable - required for recovering via TFTP
  • USB flash drive formatted with FAT filesystem - required for recovering from USB

Make the necessary preparations for the recovery procedure:

  1. Download the latest CM-X300 firmware from CompuLab website, unzip and place the file cm-x300-firmware into a USB flash drive or TFTP server root directory.
  2. Make sure the CM-X300 Recovery baseboard is powered off
  3. Plug the disabled CM-X300 into the CAMI connectors
  4. Connect the serial cable to the CM-X300 Recovery baseboard
  5. Connect the second end of the serial cable to your host workstation
  6. On your host workstation:
    1. Start a terminal application on the appropriate COM port
    2. Configure the terminal application for: baud rate 38400, 1 stop bit, no parity, no flow control
  7. Proceed to Recovering from USB flash drive or Recovering via TFTP

Recovering from USB flash drive

Recovery procedure using USB is handled by an automatic script.
To recover using USB, follow the instructions:

  1. Insert USB flash drive with cm-x300-firmware into the upper USB port
  2. Press and hold the UPDATE button (SW3).
  3. While holding the UPDATE button, power on the Recovery baseboard.
  4. In your terminal application you should see the U-Boot start up messages, if you don't see any messages, turn off the Recovery baseboard and check your serial connection.
  5. When you see the "PLEASE, RELEASE THE UPDATE BUTTON!!!" message, release the UPDATE button. Note: if the UPDATE button is not released during 5 seconds the update will fail!
  6. Let the automatic script handle the update process.
  7. After the update process completed, you will see the message: "NAND update finished successfully! Your CM-X300 module should be usable now."
  8. Make sure that the UPDATE button is released and reset the Recovery baseboard.
  9. U-Boot will start, and the Recovery process is now completed.

Recovering via TFTP

Admolition note.png This recovery method is available for CM-X300 with "E" option only.

To recover the disabled CM-X300 using TFTP, follow the instructions:

  1. Plug Ethernet cable into the Ethernet port
  2. Press and hold the UPDATE button (SW3).
  3. While holding the UPDATE button, power on the Recovery baseboard.
  4. In terminal application you should see the U-Boot start up messages, if you don't see any messages, turn off the Recovery baseboard and check all connectors.
  5. When you see the "Hit any key to stop autoboot:" message, press any key and stop the automatic USB update script. Note: if a key is not pressed during 3 seconds the update will fail!
  6. Release the UPDATE button.
  7. Set the MAC address:
    > setenv ethaddr "00:01:c0:05:f0:29"
  8. To use a DHCP server for the automatic IP address assignment, type:
    > dhcp
  9. To assign the IP address manually, type:
    > setenv ipaddr <CM-X300 IP address>
  10. Set the IP address of your TFTP server:
    > setenv serverip <TFTP server IP address>
  11. Download the CM-X300 firmware from TFTP server and update the NAND flash:
    > run tftp_read && run nand_update
  12. After the update process completed, make sure the UPDATE button is released and reset the Recovery board.
  13. U-Boot will start, and the Recovery process is now completed.

See Also