Next Thing Co (NTC), the company that made the $9 C.H.I.P computer, is not doing well: orders are not shipping on time, and support is not answering emails.
While the little CHIPs would still work even if NTC no longer exists, same cannot be said for firmware flashing: the recommended method for flashing firmware is through Chrome App developed by NTC, which in turn downloads from NTC's file servers.
If Next Thing Co evaporates and their file servers go offline, the Chrome App would not be able to download the firmware, and therefore I cannot re-flash my CHIPs if I ever mess up their operating system.
To keep my C.H.I.Ps working for as long as possible, I have to plan for the inevitable and find out how to flash a CHIP without relying on the Internet, or at least, without relying on the
opensource.nextthing.co file server.
NTC has published some scripts, known as CHIP-tools, to work with CHIP computers.
chip-update-firmware.sh script is a command line tool to flash the device.
While the content of this script is complicated, to make it work offline, I just need to figure out what it needs from NTC file servers, and download these files in advance.
A brief read and tests indicate that
chip-update-firmware.sh has the following workflow:
- Verify all necessary programs are available.
- Select a flavor according to command line arguments. It is one of
- Download a
latest file that contains the latest firmware version number.
- Download SPL, sunxi, and U-Boot images.
- Connect to CHIP in FEL mode, and determine whether the CHIP has a Hynix or Toshiba NAND chip.
- Download CHIP operating system image that suitable for the NAND chip.
- Connect to CHIP in Fastboot mode, and send the operating system image to CHIP.
Files for each flavor is hosted in a different directory on the file server.
server flavor, the files are: