Upgrading CMG-DCM units with legacy firmware to 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 existing 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 upgrading a working CMG-DCM to Platinum firmware. It is also possible to install Platinum on a CMG-DCM with corrupt flash memory – see this page for more details.
The Re-imaging Procedure
This procedure is used to upgrade a DCM to Platinum firmware. It can be used regardless of whether the DCM is connected by Ethernet or by serial port (terminal).
The process involves transferring three files onto the DCM, verifying their integrity (using checksums) and then executing one of the files, which carries out the remainder of the procedure. Once the script has completed and the unit has re-booted, you should use the upgrade facility, either from the command line or via the web interface, in order to load the latest version of the Platinum firmware. See the section on Firmware in the Platinum manual for more details. If your DCMs do not have internet access, you need to refer to this page for further instructions.
An example script to load the files, check their sums and then perform the upgrade is given below. It should be edited before use to suit your particular configuration. The script assumes that you are using an Ethernet connection with DHCP and can use the wget command on the DCM to transfer the files directly from the Guralp website.
If you are connected via a serial cable, the script below can still be used but the three initial wget invocations should be replaced with a single call to rz. The rz program will receive Z-Modem file transfers from a suitable terminal emulation package, such as Minicom or Hyperterm. When running the script, you will be prompted with ready to receive files, at which point you should use your emulator’s Send File command to send all three files at once. If you emulator can only send one file at a time, use three rz calls in the script.
As the procedure resets the device’s configuration, it is necessary to provide new, initial network details for use post-upgrade so that communication is not lost when upgrading a remote device over Ethernet. These are given as command line arguments to the upgrade script, upgrade-to-platinum.sh.
- If you have DHCP available at the DCM’s location, you can simply specify
sh upgrade-to-platinum.sh dhcp
as in the example script.
- If you want to set a static IP address, you must specify the argument static followed by the IP address and netmask in CIDR format, where:
- A netmask of 255.255.255.0 (24 bits set) is written as ip_address/24
- A netmask of 255.255.0.0 (16 bits set) is written as ip_address/16
- A netmask of 255.255.254.0 (23 bits set) is written as ip_address/23 etc.
The syntax for using a static address looks like this:
sh upgrade-to-platinum.sh static 192.168.0.2/24
Optionally, the default gateway may be provided after the IP address, like this:
sh upgrade-to-platinum.sh static 172.16.0.1/16 172.16.255.254
The required files are:
The MD5 checksums for each are:
$ md5sum * 53ea54b1623523a46829cbf0080f865a CMG-DCM-mk2x.tar.gz ced24e396c4f71dc73683de1d5dae264 support.tar.gz d1382c0b7cbe130fa85010520b7af59c upgrade-to-platinum.sh
The upgrade script can run unsupervised, but you may monitor its progress by connecting a serial cable to the Data Out port at 115200 baud. The upgrade process typically takes about 15 minutes. When it is complete, the ports will be configured as follows:
- Port A — GCF in at 38400 baud
- Port B — GCF in at 38400 baud
- Data Out — Terminal at 115200 baud
- Network — static or dynamic as chosen at start of upgrade procedure.
Pasteable script
Note: If you are working from a Windows PC, you may prefer to download this script from here to avoid any problems with the carriage-return characters which Windows can add to line endings.
#!/bin/sh # upgrade DCM to platinum v2 wget http://www.guralp.com/platinum/reimage/files/CMG-DCM-mk2x.tar.gz || ( echo "Cannot download CMG-DCM-mk2x.tar.gz: check networking"; exit; ) wget http://www.guralp.com/platinum/reimage/files/support.tar.gz || ( echo "Cannot download support.tar.gz: check networking"; exit; ) wget http://www.guralp.com/platinum/reimage/files/upgrade-to-platinum.sh || ( echo "Cannot download upgrade-to-platinum.sh: check networking"; exit; ) MD5a="`md5sum CMG-DCM-mk2x.tar.gz`" MD5b="`md5sum support.tar.gz`" MD5c="`md5sum upgrade-to-platinum.sh`" SUMa=53ea54b1623523a46829cbf0080f865a SUMb=ced24e396c4f71dc73683de1d5dae264 SUMc=d1382c0b7cbe130fa85010520b7af59c OKa=`expr "$MD5a" : $SUMa` OKb=`expr "$MD5b" : $SUMb` OKc=`expr "$MD5c" : $SUMc` if [ $OKa = 32 -a $OKb = 32 -a $OKc = 32 ] ; then ### Un-comment either: sh upgrade-to-platinum.sh dhcp ### or (after editing - see the notes): ### sh upgrade-to-platinum.sh static 172.16.0.1/16 172.16.255.254 else echo "Checksum Mismatch! - retry file transfer" fi
Note: This procedure install a minimal version of the firmware. Once the script has completed and the unit has re-booted, you should use the upgrade facility, either from the command line or via the web interface, in order to load the latest version of the Platinum firmware. (If your DCMs do not have internet access, you need to refer to this page for further instructions.) Due to a bug in the third-party file-system driver used in earlier Platinum versions, the upgrade should be run twice. If, when attempting the second upgrade, you see the error
-bash: /usr/bin/upgrade: No such file or directory
enter the command
hash -r
and try again.
You will see a lot of error messages like
rsync: delete_file: unlink(usr/bin/crontab) failed: Directory not empty (39) cannot delete non-empty directory: lib/modules/2.6.31-balloon2/kernel/fs/jbd *** Couldn't find library for /lib/libpanel.so.5 rm: can't remove '/var/lib/Pt-users': Directory not empty
These can all be safely ignored. When the command prompt returns, restart the unit by typing
reboot
If you have been using a web browser to communication with your DCM, you may need to clear its cache before the new web interface will display properly. Refer to your browser’s documentation for details.
See the section on Firmware in the Platinum manual for more details.