353 firmware upgrade procedure

From ElphelWiki
Revision as of 09:40, 28 September 2007 by Kbjra (talk | contribs) (Step 2. Download the current software)
Jump to: navigation, search


This program is needed to upgrade the firmware in the camera - that includes Linux kernel, drivers, applications, FPGA code and internal web pages, the data will be written to the camera flash memory so if you made any changes to the default files or added your own to the camera - they will be lost so you will have to install them again.

There is also a possibility to upgrade camera firmware while the camera is operating, the method described here does not require camera current firmware to be in operational state - it uses the network bootloader hard-wired in the camera CPU (Axis ETRAX FS processor). This bootloader is a very small program and needs special Ethernet packets to be sent over the network - this in turn requires special software on the PC and root (administrative) access to the computer. It is all much simpler when you run this program on the computer booted from the LiveDVD (with all the software preinstalled and root access granted). We would recommend do it in a simple network with just computer, switch, power supply (if switch does not provide PoE) and the camera to avoid problems of the network configuration being incompatible with the procedure and make sure the special Ethernet packets between the PC and the camera are not blocked.

The Net Flash application requires the USB flash memory stick - it is used to deliver the software archive and provide a directory shared using NFS (Network File System - similar to computer/printers sharing in other operation systems). When the camera boots over the network using special Ethernet packets it connects to this shared directory, executes upgrade script (extracted from the software archive) and overwrites required "disk" (camera internal flash memory) partitions or files. While performing these tasks camera writes to the log file on in the same directory (on that USB flash drive) and can be analysed later (it is a human-readable text file). Among other text you may see mentioning of some the "bad blocks" in the camera flash memory - it is normal for NAND flash and the software takes care of mapping them out and that does not lead to any data loss.

Firmware Upgrade Procedure

Step 1. Prepare USB flash

When computer recognises that USB stick is connected it places corresponding icon on the Desktop. You need to make this device writeable before you can save any files there - for security purposes default state is read only. Open the device by clicking on it (or right-click -> mount), then right-click on the icon again and select "Change state to read/write" in the "Actions" sub-menu of the context menu.

Step 2. Download the current software

All the current software fro Elphel cameras is available for download from Elphel project page on SourceForge in the Download section, you need elphel353 package, release 7.1.1 or later. There you can download the complete source code to rebuild the camera software yourself, but if you just want to upgrade the firmware without any modification - binary archive is all that you'll need - it is a single file called image353-2.10-X.Y.Z.tar.gz , where X.Y.Z is the release number of the software (there can be actually the fourth group - image353-2.10-X.Y.Z.W.tar.gz where W is a minor release number)

for reflashing of the camera. For this process you must have a usb flash drive with empty space ~100Mb. Before flash, please check you network - ask your network administrator (computer with started LiveDVD use ip, and camera in reflash process - ip, or just connect camera to computer directly over power supply.

To start, please, download form SourceForge firmware (from section "download" at project http://sourceforge.net/projects/elphel/; package "elphel353", with version number not less than as archive with name like "image353-2.10-X.Y.Z.tar.gz", where a string "X.Y.Z" is version number of firmware, and copy it to desktop of LiveDVD, or on a flash drive. Connect a usb flash drive, click on icon for mount (or right click on icon and select "mount"), and after this - change mode of mount to "read/write" mode (right click of mouse on USB flash icon, select "Actions -> Change read/write mode", it's needed to prevent acidentally run of Net Flash script).

Now we ready to start reflashing of camera. Drag-and-drop flash icon on top of the Net Flash. If you have more than one network interface, program ask you about where from his camera is connected - please, select this interface (if you not sure - remember choices, what you use, and try again with other interface). After this prepare camera for reflash - unplug network cable from camera, press and hold the green button, plug network cable and after ~2 seconds release the button. Press "Ok" for message of program "Press the button on the camera", and wait for results.

Now, if camera the fails to boot in this process (for example, if camera connected to other network interface, or because broken archive with firmware), program will exit by timeout in 120 seconds; and when camera fail to upgrade in next stage - program will exit by timeout 400s. If all ok, reflashing process get ~120 seconds.

When this process is complete, you will get a message from program "All ok. You can safely restart the camera by network cable".