Re-flashing a CMG-DCM to install Platinum Firmware
Platinum is Guralp Systems’ next-generation firmware for CMG-EAMs, CMG-NAMs and CMG-DCMs. Platinum firmware offers a number of advantages for CMG-DCM users over the previous DCM firmware and we recommend that all CMG-DCM units being redeployed to new installations are upgraded to Platinum.
This page describes the procedure for reflashing a CMG-DCM to use Platinum firmware where the CMG-DCM has corrupt flash memory and cannot boot. If the CMG-DCM is working properly, please use this procedure instead.
The Re-flashing Procedure
Required Cables and Connections
The following cables and connections are required:
- Power/data cable - Plug a standard 10-way power/data “Y”-cable into the DCM port labelled “DATA OUT”. The power lead should be connected to a stable power supply (10–28V DC) and the data lead should be connected to a computer that will be used to control the reflashing procedure.
- Ethernet cable - Plug a standard 6-way Ethernet cable in to the DCM port labelled “NETWORK”. The 8P8C modular jack should be connected to a router or other device that will provide Internet access. Either DHCP or static addressing may be used.
The two files linked below must be saved onto the computer being used in the process. They will be uploaded to the CMG-DCM over the serial port. They are used to install a base image with enough functionality to allow the DCM to update itself over the Internet.
If you are using Linux, you can verify the integrity of the files after download with the md5sum utility:
Gaining Access to the Bootloader
The first step in the reflash procedure is to gain access to the bootloader.
- Using extraPuTTY (www.extraputty.com) or HyperTRM on Windows, or minicom (or another terminal emulator) on Linux, connect to the DATA OUT port of the DCM at 115200 baud, 8 data bits, no parity, 1 stop bit (8N1). Configure the emulator to use no flow control – neither hardware (RTS/CTS) nor software (XON/XOFF).
- Power cycle the DCM, and repeatedly type fishsoup followed by a space until you get a prompt:
Bootloader fishsouped and ready boot>
- If the message “Enter the receive enable string now to enable this port” does not appear, and step 2 fails to achieve anything within 20 seconds, the unit may be using the old bootloader. In this case, disconnect the data cable from your serial port (leaving the power plugged in to the PC) and connect the internal console cable to the DCM and the PC’s serial port, then retry step 2.
Uploading the Minimal Image Files
Having gained access to the bootloader, the minimal image files (from the required files section) need to be uploaded and flashed. This part of the procedure takes approximately 15 minutes to complete.
Note that there have been several revisions of the bootloader, so the messages that you encounter may differ slightly from the ones reproduced in these instructions. However, in all cases, you can simply follow the same procedure.
- Press ENTER a few times to make sure you are sucessfully talking to the boot loader, then type the text shown in emphasis:
boot> nand 0 erasechip Scanning for nand chip ... nand_maf_id = 0x000000EC nand_dev_id = 0x00000076 nand device name: Samsung K9D1208V0M nand erasechip: Erasing entire chip nand erasechip: passed boot> nand 1 erasechip Scanning for nand chip ... nand_maf_id = 0x000000EC nand_dev_id = 0x00000076 nand device name: Samsung K9D1208V0M nand erasechip: Erasing entire chip nand erasechip: passed boot> boot> nand 2 erasechip Scanning for nand chip ... nand_maf_id = 0x000000EC nand_dev_id = 0x00000076 nand device name: Samsung K9D1208V0M nand erasechip: Erasing entire chip nand erasechip: passed boot> load boot After receiving file, will automatically uncompress .gz images loading flash region boot using ymodem ready for YMODEM transfer...
- extraPuTTY: Send the “boot” file you downloaded earlier by selecting "Files Transfer" from the menu bar, then "Ymodem" and then "Send". Enter the filename of the downloaded boot image and click on "Open".
Hyperterminal: Send the “boot” file you downloaded earlier by selecting "Transfer" from the menu bar and then "Send File". Enter the filename of the downloaded boot image, select "Ymodem" and click on "Send".
Minicom: Send a file (Ctrl-A then S, then select Y-modem from the list). Select the boot file you downloaded earlier. Note: Minicom implements file transfer protocols using external utilities which are not always present by default in some distributions; use your distribution’s package manager to ensure that the lrzsz package is installed.
It is possible that, in the time you take to do this, the DCM will time out and give up (often printing an “RXstat timeout” error message). If this happens, press enter to get the bootloader prompt, then repeat this step.
- Once the image is uploaded you should see:
02CF170D454B000464C86C989C3FC2D0 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx boot-xxxxxxxxxxx xxxxxxxx bytes loaded to C0000400 img_size is not a multiple of 4 -- are we sure that's OK? Scanning for nand chip ... nand_maf_id = 0x000000EC nand_dev_id = 0x00000076 nand device name: Samsung K9D1208V0M Looks like a gzipped image, let's verify it... Looks like a gzipped image, let's verify it... Verifying gzipped image ......................... verifyGZipImage: calculated CRC = 0xXXXXXXXX verifyGZipImage: read CRC = 0xXXXXXXXX programming flash...erasing ... Erasing NAND region Erasing from 0x00000000 Erasing bytes 0x00100000 writing flash.. Programming NAND region YAFFS image: Programming/Verifying 0x000C0750 Block ok at page 0x00000020 .... YAFFS partition programming Success verifying ... Verifying NAND device nand: verified ok done. boot>
Errors about bad blocks can be ignored (this is normal NAND flash behaviour) but the procedure must verify and end with the success message as shown above.
- Load the root image with:
boot> load root After receiving file, will automatically uncompress .gz images loading flash region root using ymodem ready for YMODEM transfer...
Send the “root” file in the same way, and wait for the boot> prompt.
Completing the Firmware Reflash
- Now power cycle the DCM. As this is the first boot with the new firmware, the DCM will need to generate new keypairs for the ssh program. This takes 2–3 minutes. During this time, the DCM will appear unresponsive. Once it has completed, the DCM will present a login prompt:
- Log in as root with the default password, which is rootme.
- If your network is configured to use DHCP, the DCM is now ready to be upgraded and you can continue to the next step (you can verify the address of the DCM by running the command ip addr show dev eth0). If you need to set a static address, this is done with the following command (changing the highlighted values):
ip addr add xxx.yyy.zzz.aaa/NN dev eth0 ip route add default via gatewayIP echo "namesever 220.127.116.11" >> /etc/resolv.conf
The NN at the end of the IP address you wish to assign is the CIDR notation for the netmask; it is usually 24 (which corresponds to the netmask value of 255.255.255.0) or 16 (which corresponds to a netmask of 255.255.0.0). If you know the address of a local DNS server, you can substitute it in place of 18.104.22.168 in the last line above.
- Run the command upgrade and wait for the process to complete.
- Then run the command hash -r
- Finally, run upgrade once more.
- After rebooting the DCM, it is ready to be configured and used with the latest Platinum firmware.