Difference between revisions of "353 firmware upgrade procedure"

From ElphelWiki
Jump to: navigation, search
 
(4 intermediate revisions by 4 users not shown)
Line 1: Line 1:
==Introduction==
+
=='''Introduction'''==
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 are several different ways to upgrade (reflash) the firmware package that is inside the NC353L camera.  This page describes each of the methods that can be used below.
  
 +
'''WARNING:''' When a camera is reflashed, the firmware in the camera is rewritten.  Old data is deleted, and new data will be written in its place.  These changes will include the Linux kernel, all drivers, applications, FPGA code and internal web pages.  If you have made any modifications to the default files or have added your own custom files to the camera, they will be lost.  Non-standard software such as this must be re-installed once the camera has been reflashed..
  
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.
+
There are four reflashing methods that this page will cover:
 +
*Elphel LiveDVD v 2.0.0 'Net Flash' Utility - the method discussed on this page.
 +
*NFS Share and [[Reflash.php]]
 +
*[[Netboot_firmware_upgrade|Netboot]]
 +
*[[Prod353 ]]
 +
 
 +
 
 +
We recommend using the LiveDVD solution in most situations.  It is generally the easiest method to follow, and is effective in nearly all situations.  The other methods will be discussed later, and are useful only in certain situations.
 +
 
 +
=='''Using the Elphel LiveDVD v2.0.0'''==
 +
 
 +
The real advantage of using the Elphel LiveDVD v2.0.0 to reflash a camera is that by using the LiveDVD to boot your computer, all the necessary software is pre-installed and configured for you automatically.  All you have to do is download a few files, and the LiveDVD software package takes care of the rest.  There are two different methods for using the Live DVD listed below.  Please choose the one that corresponds with the firmware version that you would like to install on your camera (this has nothing to do with the firmware version that is currently installed on the camera).
 +
 
 +
==='''Default Reflashing Process for Version 7.1.x'''===
 +
 
 +
'''1.''' You will need the Elphel LiveDVD, and a USB storage device of some kind (thumbdrive, external USB hard drive, etc...)
 +
 
 +
 
 +
'''2.''' Insert the Elphel LiveDVD, and restart your computer.  This will allow your PC to boot from the LiveDVD, which will setup up software that is pre-configured for reflashing your camera.
 +
 
 +
 
 +
'''3.''' After the PC has booted, connect you USB device and wait for the system to recognize it. Once it has been recognized, a window will pop up asking if you want to open the drive contents in a new window. Just click 'Cancel'. Now you need to make the device 'writeable'. With your mouse, 'Right Click' on the icon for your USB device, and click on the 'Mount' option in the pop-up menu. Then 'Right Click' on the icon again, and chose the option, 'Change read/write mode'. A message will appear, asking if you really want to make the device writeable. Choose 'Yes'.
 +
 
 +
 
 +
'''4.''' Now click on the icon for the 'Konquerer' web browser located on the bottom of the screen. If you are not familiar with this, just mouse over the icons, and windows will pop up with their names and functions. Once this browser has loaded, download the desired version 7 camera firmware image file (example: image353-2.10-7.x.x.x.tar.gz), available from our Sourceforge site (http://sourceforge.net/projects/elphel), and save it to the top directory of your USB device.
 +
 
 +
===='''''Update only for Reflashing to Version 8.x'''''====
 +
 
 +
'''''4a.'''''  ''To reflash to a camera to version 8.0 or higher firmware, you will also need to download an update file for the LiveDVD.  Download the following file, and save it to the Desktop:''
 +
 
 +
  http://downloads.sourceforge.net/elphel/elphel_dvd_update-1.0.tar.gz
 +
 
 +
'''''4b.'''''  ''Once the update file has been downloaded, click once on the 'DVD update' icon on the desktop.  A message will appear, stating that after the update has run, only 8.0 or higher software can be flashed onto a camera until the PC has been rebooted.  This is fine.  Click 'Yes' to install the update.''
 +
 
 +
 
 +
 
 +
'''5.''' To begin the reflashing process, just drag the icon for your USB device over the top of the icon labeled 'Net Flash' (the icon is a picture of a camera with a green floppy disk in front of it), and let it go. This will start the reflashing process. A few windows will pop up. The one you need to work with will have a list of any recognized cameras connected to the PC, and the word 'button' at the bottom. At this point, you need to plug in your camera for the first time, and put it into net-boot mode.
 +
 
 +
 
 +
'''6. [[Net-Boot]] mode:''' There are two methods of putting your camera in net-boot mode, depending on a small hardware revision made in 2008. Please refer to the [[Net-Boot]] page for detailed instruction about this process.
 +
 
 +
 
 +
'''7.''' Once the camera is connected to the PC (or network switch) in net-boot mode, you can click on the 'Okay' button. From here the reflashing process takes care of itself, until a message pops up requesting that the camera be rebooted by unplugging the CAT-5 cable, and then plugging it back in. Reboot the camera as instructed, and click 'Okay'. A message should pop up shortly after that stating that your camera has been reflashed successfully. In the newest version of the 8.x firmware, the yellow LED on the network jack also turns off to indicate that reflashing is complete.
 +
 
 +
 
 +
'''8.''' You can confirm that your camera has been successfully reflashed by unplugging the network cable again, and plugging it back in to reboot the camera. After approximately 30 - 60 seconds, you can open a new browser window using Mozilla Firefox, and type in "192.168.0.9". This will open up the camera 's default interface control page. Another way to test the camera would be to open a Terminal window and type in the following command:
 +
 
 +
telnet 192.168.0.9
 +
#Login: "root"
 +
#password: "pass"
 +
 
 +
This will give you root access to the camera's file system.
 +
 
 +
To check that the camera has been reflashed to the expected firmware version, type the following command:
 +
 
 +
cat /etc/issue
 +
 
 +
The firmware version will be displayed on your screen. Type 'Ctrl-x' to exit.
 +
 
 +
Or just open the following link in the web browser (no telnet session is needed), replacing your_camera_ip with the IP address of your camera (default is 192.168.0.9):
 +
http://your_camera_ip/phpshell.php?command=cat+/etc/issue
 +
 
 +
 
 +
If either one of these possibilities works, then your camera has been reflashed, and should be good to go.
 +
 
 +
 
 +
----
 +
 
 +
 
 +
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 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.
  
  
Line 9: Line 79:
 
==Firmware Upgrade Procedure==
 
==Firmware Upgrade Procedure==
 
===Step 1. Prepare USB flash ===
 
===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.
+
First you need to boot the Elphel Live DVD.
 +
 
 +
Then connect a USB thumbstick and wait for the corresponding icon to appear on the desktop.  
 +
Make sure the device is writeable: 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===
 
===Step 2. Download the current software===
 
All the current software for Elphel cameras is available for download from [http://sourceforge.net/projects/elphel/ 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 what 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)
 
All the current software for Elphel cameras is available for download from [http://sourceforge.net/projects/elphel/ 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 what 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)
 +
 +
Place this file on the Desktop as Netflash will be looking for it there.
 +
 +
You do not need to decompress the file.
 +
 
===Step 3. Running the Net Flash program===
 
===Step 3. Running the Net Flash program===
Just drag the USB flash drive Icon on the Desktop and drop it over the Net Flash icon - that will start the program. If system detects more than a single Ethernet port on your computer you will be presented with a list and required to make a choice. The only suggestion to decide what number to use would be - just try one, if there will be no communication with the camera (see below) - restart the program and try the other one.
+
To start the upgrade procedure just '''drag the USB flash drive icon on the Net Flash icon''' on the desktop.  
 +
 
 +
If the system detects more than a single Ethernet port you will be presented with a list can select a device. Don't worry about this choice, if it does not work simply close the window, try again and select the other device.
 +
 
 +
The program will then guide you throught the rest of the firmware upgrade.
 +
 
 +
 
 +
 
 +
----
  
The program will then ask you to prepare the camera.
 
 
===Step 4. Preparing camera for re-flashing ===
 
===Step 4. Preparing camera for re-flashing ===
 +
'''Current models do not have any buttons anymore. If you have one of the latest models you can safely skip step 4 & 5.'''
 +
 
Camera has a small push-button under the green dot on the back plastic overlay, right under the network connector. Gently (the button is really small and could be easily damaged if excessive force being applied) push that button with you finger ('''or fingernail at most, don't use pen tip or screwdriver! - the button trip is just 0.3mm''') - you should probably be able to hear a faint clicking sound.
 
Camera has a small push-button under the green dot on the back plastic overlay, right under the network connector. Gently (the button is really small and could be easily damaged if excessive force being applied) push that button with you finger ('''or fingernail at most, don't use pen tip or screwdriver! - the button trip is just 0.3mm''') - you should probably be able to hear a faint clicking sound.
  
Apply power to the camera while pressing (and holding) that button - you need to insert network cable into the camera (or the other end to the power supply or PoE switch) - the yellow LED on the network connector should  come up in about 2 seconds (in the normal boot, when the button is not pressed, it takes longer - some 10 seconds at least).
+
Apply power to the camera while pressing (and holding) that button - you need to insert network cable into the camera (or the other end to the power supply) - the yellow LED on the network connector should  come up in about 2 seconds (in the normal boot, when the button is not pressed, it takes longer - some 10 seconds at least).
  
 
===Step 5. Starting camera reflashing===
 
===Step 5. Starting camera reflashing===
 +
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.
  
just click
+
If the camera fails to boot at this stage (for example: if the camera is connected to other network interfaces or because the firmware archive is broken) program will exit by timeout after 120 seconds and no damage is done.
  
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.
+
If the camera fails to upgrade in last stage the program will exit by timeout after 400 seconds.  
  
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.
+
If everything goes well reflashing process takes around 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".
+
When this process is complete, you will get a message from program "All ok. You can now safely restart the camera.

Latest revision as of 17:23, 12 November 2010

Introduction

There are several different ways to upgrade (reflash) the firmware package that is inside the NC353L camera. This page describes each of the methods that can be used below.

WARNING: When a camera is reflashed, the firmware in the camera is rewritten. Old data is deleted, and new data will be written in its place. These changes will include the Linux kernel, all drivers, applications, FPGA code and internal web pages. If you have made any modifications to the default files or have added your own custom files to the camera, they will be lost. Non-standard software such as this must be re-installed once the camera has been reflashed..

There are four reflashing methods that this page will cover:


We recommend using the LiveDVD solution in most situations. It is generally the easiest method to follow, and is effective in nearly all situations. The other methods will be discussed later, and are useful only in certain situations.

Using the Elphel LiveDVD v2.0.0

The real advantage of using the Elphel LiveDVD v2.0.0 to reflash a camera is that by using the LiveDVD to boot your computer, all the necessary software is pre-installed and configured for you automatically. All you have to do is download a few files, and the LiveDVD software package takes care of the rest. There are two different methods for using the Live DVD listed below. Please choose the one that corresponds with the firmware version that you would like to install on your camera (this has nothing to do with the firmware version that is currently installed on the camera).

Default Reflashing Process for Version 7.1.x

1. You will need the Elphel LiveDVD, and a USB storage device of some kind (thumbdrive, external USB hard drive, etc...)


2. Insert the Elphel LiveDVD, and restart your computer. This will allow your PC to boot from the LiveDVD, which will setup up software that is pre-configured for reflashing your camera.


3. After the PC has booted, connect you USB device and wait for the system to recognize it. Once it has been recognized, a window will pop up asking if you want to open the drive contents in a new window. Just click 'Cancel'. Now you need to make the device 'writeable'. With your mouse, 'Right Click' on the icon for your USB device, and click on the 'Mount' option in the pop-up menu. Then 'Right Click' on the icon again, and chose the option, 'Change read/write mode'. A message will appear, asking if you really want to make the device writeable. Choose 'Yes'.


4. Now click on the icon for the 'Konquerer' web browser located on the bottom of the screen. If you are not familiar with this, just mouse over the icons, and windows will pop up with their names and functions. Once this browser has loaded, download the desired version 7 camera firmware image file (example: image353-2.10-7.x.x.x.tar.gz), available from our Sourceforge site (http://sourceforge.net/projects/elphel), and save it to the top directory of your USB device.

Update only for Reflashing to Version 8.x

4a. To reflash to a camera to version 8.0 or higher firmware, you will also need to download an update file for the LiveDVD. Download the following file, and save it to the Desktop:

  http://downloads.sourceforge.net/elphel/elphel_dvd_update-1.0.tar.gz

4b. Once the update file has been downloaded, click once on the 'DVD update' icon on the desktop. A message will appear, stating that after the update has run, only 8.0 or higher software can be flashed onto a camera until the PC has been rebooted. This is fine. Click 'Yes' to install the update.


5. To begin the reflashing process, just drag the icon for your USB device over the top of the icon labeled 'Net Flash' (the icon is a picture of a camera with a green floppy disk in front of it), and let it go. This will start the reflashing process. A few windows will pop up. The one you need to work with will have a list of any recognized cameras connected to the PC, and the word 'button' at the bottom. At this point, you need to plug in your camera for the first time, and put it into net-boot mode.


6. Net-Boot mode: There are two methods of putting your camera in net-boot mode, depending on a small hardware revision made in 2008. Please refer to the Net-Boot page for detailed instruction about this process.


7. Once the camera is connected to the PC (or network switch) in net-boot mode, you can click on the 'Okay' button. From here the reflashing process takes care of itself, until a message pops up requesting that the camera be rebooted by unplugging the CAT-5 cable, and then plugging it back in. Reboot the camera as instructed, and click 'Okay'. A message should pop up shortly after that stating that your camera has been reflashed successfully. In the newest version of the 8.x firmware, the yellow LED on the network jack also turns off to indicate that reflashing is complete.


8. You can confirm that your camera has been successfully reflashed by unplugging the network cable again, and plugging it back in to reboot the camera. After approximately 30 - 60 seconds, you can open a new browser window using Mozilla Firefox, and type in "192.168.0.9". This will open up the camera 's default interface control page. Another way to test the camera would be to open a Terminal window and type in the following command:

telnet 192.168.0.9
#Login: "root"
#password: "pass"

This will give you root access to the camera's file system.

To check that the camera has been reflashed to the expected firmware version, type the following command:

cat /etc/issue

The firmware version will be displayed on your screen. Type 'Ctrl-x' to exit.

Or just open the following link in the web browser (no telnet session is needed), replacing your_camera_ip with the IP address of your camera (default is 192.168.0.9):

http://your_camera_ip/phpshell.php?command=cat+/etc/issue


If either one of these possibilities works, then your camera has been reflashed, and should be good to go.




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 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

First you need to boot the Elphel Live DVD.

Then connect a USB thumbstick and wait for the corresponding icon to appear on the desktop. Make sure the device is writeable: 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 for 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 what 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)

Place this file on the Desktop as Netflash will be looking for it there.

You do not need to decompress the file.

Step 3. Running the Net Flash program

To start the upgrade procedure just drag the USB flash drive icon on the Net Flash icon on the desktop.

If the system detects more than a single Ethernet port you will be presented with a list can select a device. Don't worry about this choice, if it does not work simply close the window, try again and select the other device.

The program will then guide you throught the rest of the firmware upgrade.



Step 4. Preparing camera for re-flashing

Current models do not have any buttons anymore. If you have one of the latest models you can safely skip step 4 & 5.

Camera has a small push-button under the green dot on the back plastic overlay, right under the network connector. Gently (the button is really small and could be easily damaged if excessive force being applied) push that button with you finger (or fingernail at most, don't use pen tip or screwdriver! - the button trip is just 0.3mm) - you should probably be able to hear a faint clicking sound.

Apply power to the camera while pressing (and holding) that button - you need to insert network cable into the camera (or the other end to the power supply) - the yellow LED on the network connector should come up in about 2 seconds (in the normal boot, when the button is not pressed, it takes longer - some 10 seconds at least).

Step 5. Starting camera reflashing

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.

If the camera fails to boot at this stage (for example: if the camera is connected to other network interfaces or because the firmware archive is broken) program will exit by timeout after 120 seconds and no damage is done.

If the camera fails to upgrade in last stage the program will exit by timeout after 400 seconds.

If everything goes well reflashing process takes around 120 seconds.

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