EAM Platinum firmware recovery for CTBTO digitisers
Contents
Recovery procedure
This recovery procedure can be useful if the firmware has become damaged by a partial upgrade. If this procedure is not able to recover your unit, then the unit must be returned to Güralp Systems for reflash. If this is the case, please contact support for details and to arrange an RMA Return Material Authorisation. An RMA is permission to return goods for any reason. Our Goods-In team may refuse to accept any item received without an RMA number clearly marked on the outer packaging so, please, always ensure that you have an RMA before despatching anything to us. For more details, please see our Warranty and Repairs policy.
Requirements
Physical access to the unit will be required.
Equipment required:
- GPIO Console cable. Either:
- CAS-DCM-0036: a blue, 12-way bayonet to DE9 female; or
- CAS-AFF-0005: a black, 12-way bayonet to USB type A male.
A CAS-DCM-0044, a 12-way bayonet to USB type A male is not suitable for this purpose.
- Laptop or PC, possibly with serial port or USB to RS232 adapter, depending on the cable in use, as above.
- Terminal emulator (e.g. PuTTYPuTTY is a free (both as in “free speech” and
also as in “free beer”) and highly-recommended SSH client, telnet
client and serial terminal emulator that runs under Windows and Linux.
It should be downloaded from Simon Tatham's web-site.
(Beware of fake alternative download sites.) under Windows or minicom under Linux).
A suitable rsync/upgrade server is required. You therefore need either:
- Internet access (to rsync.guralp.com TCP port 873/rsync); or
- a local rsync server with a copy of the CTBTO stable firmware
Booting and Preparation
-
Connect the console cable between the GPIO socket of the digitiser and the laptop/PC (the "recovery machine"), using a USB/serial adapter if necessary.
-
Open the terminal emulator on the recovery machine and set it to 38400 baud, 8N1.
-
Apply power to the digitiser.
-
Almost immediately, there should be some output. Approximately two screens (2×25 lines) of output will be displayed.
-
There will be a series of yes or no questions. Answer no (by pressing n) to each question. Very old bootloaders have some minor differences, but the questions should be as below. If any question is accidentally answered yes, it is safe to simply remove and re-apply power, starting the process again.
The sequence looks like this: Attempt rsync update ? (y/N) n Boot main via kexec ? (Y/n) n Boot main via switch_root ? (y/N) n Mount successful but no boot options available Attempt scripted NAND device reinstall ? (y/N) nAt this point, you should now be presented with a shell prompt:
/ # -
The next step is to set up networking. The procedure differs depending on whether you use DHCPDHCP stands for Dynamic Host Configuration Pprotocol which is a widely used method to simplify the networking configuration of hosts on a LAN. It relies on a LAN having a DHCP server to allocate IP addresses and provide other relevant information such as default routes and the addresses of name-servers. For more information, please see Wikipedia's DHCP page. on your network or not.
-
If you are using DHCP to configure your network, run:
ifconfig lo 127.0.0.1 route add -net 127.0.0.0 netmask 255.0.0.0 lo udhcpc --script /etc/udhcpc.sh --now --interface eth0The networking parameters will be automatically configured by your DHCP server
-
If you are not using DHCP and you need to assign your networking parameters statically, find the correct values and then run:
ifconfig eth0 192.0.2.2 netmask 255.255.255.0 route add default gw 192.0.2.1 echo "nameserver 1.1.1.1"> /etc/resolv.confIn the command above, replace:
- 192.0.2.2
- with the desired IP address;
- 255.255.255.0
- with the desired netmask; and
- 192.0.2.1
- with the IP address of your default router.
You can replace 1.1.1.1 with the IP address of a preferred nameserver if you wish but this is not normally necessary: 1.1.1.1 is a reasonable choice in most regions.
The 1.1.1.1 DNS server is operated by Cloudflare. If it is blocked in your jurisdiction, search the Internet for free public DNS servers for a list of other suitable addresses..
-
-
Next, the system date must be set to something sensible because, otherwise, files will have incorrect modification times, which will cause various malfunctions. In the command below, replace:
- mm
- with the Month (01 to 12);
- dd
- with the Day (01 to 31);
- HH
- with the Hour (00 to 23);
- MM
- with the Minute (00 to 59); and
- YYYY
- with the Year (2011 upwards)
The command should be entered as
date mmddHHMMYYYYThe data and time should be entered in UTC, regardless of your current time zone.
Reflashing the firmware
-
Erase NAND flash
This will destroy all your settings and data in the buffer (it won't affect data recorded on any mass storage device). There is no way to retrieve anything from the unit after running these commands.
umount /mnt flash_eraseall /dev/mtd3 mount -t yaffs /dev/mtdblock3 /mntThe flash_eraseall command will probably complain about multiple bad blocks and failures. This is normal for NAND flash. However, it should tick all the way up to 100%. If it aborts early then there is potentially a hardware problem. The last mount command must succeed, or there is a problem somewhere and the unit will likely need to be returned to GSL support.
-
Copy files on
In the example below it may be necessary to replace rsync.guralp.com with its IP address (currently 46.43.14.141) or with the name of your local rsync server. This step will download about 50Mb of image data.
rsync --super --verbose --stats --human-readable --progress \ --itemize-changes --recursive --times --links --perms \ --chmod=ugo+r,+X --force \ rsync://rsync.guralp.com/ctbto-stable/CMG-DCM-mk4-eabi/ /mnt/If this step fails at start-up (temporary failure in name resolution, no route to host, etc.) then something is wrong with the networking configuration. If it fails part way through, or at the end, something is likely wrong with the unit and it will need to be returned to the factory.
If you are using a local rsync server instead of the Güralp server, simply replace rsync.guralp.com in the command above with the IP address or DNS name of your local server.If the rsync command completes successfully, create some necessary files:
cp -a /dev/null /mnt/dev cp -a /dev/zero /mnt/dev cp -a /dev/console /mnt/dev mkdir -p /mnt/etc/conf.local echo set_hwclock `date +%s` > /mnt/.magic_upgrade syncEach of these commands is critical and must not fail.
-
Finalise
Now it is safe to power-cycle the digitiser. You can also boot the new system without power cycling by running:
kexec -l /mnt/boot/zImage kexec -eYou can watch its boot progress on the console port. The first boot can take several minutes as the system will have to run through some basic initialisation procedures. However, you should eventually have a login: prompt, at which point you can log in as root using the default password (see note below) and refer to the Platinum manual to reconfigure the device.
The previous default root password is now routinely tried by hackers during brute-force attacks. As a result, this procedure now changes the root password to . We strongly recommend that you change this to something secure if the unit is to be connected to the Internet. Please see our Platinum security guide
This completes the procedure. In case of problems, please contact .