Difference between revisions of "Firmware Upgrade"

From IPLOG
Jump to: navigation, search
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span style="color: red; font-size: 25px;"><b> Under Construction! </b></span>
+
In this document we will focus on Firmware Upgrade.
  
In this document we will focus on the Firmware Upgrade.
+
== About Firmware ==
 +
 
 +
IPLOG-GAMA firmware is divided into three parts.
 +
 
 +
'''Recovery image''' - This part is a read only image and used to possibility restore the system in the event of a main firmware fatal error of parts '''Firmware Image 1 and 2'''.
 +
 
 +
'''Firmware Image 1 and 2''' - These two parts contain the main firmware images. One is marked as '''"current"''', this firmare is running at the present time. When the Firmware Upgrade starts the new Firmware Image is written to the second Image part which is not running. Thanks to this feature, the firmware that works properly can not be damaged. After a successful upload, the new one will startup with the next reboot and market as '''"current"'''.
 +
 
 +
 
 +
== WEB interface Upgrade ==
 +
 
 +
=== 1. Open "Upgrade" page ===
 +
[[File:Upgrade_Main_Page.png|800px]]
 +
 
 +
'''Running''' - informs about right now running image (firmware version) <br>
 +
'''Recovery''' - version of recovery image <br>
 +
'''Image 1''' - version of Image 1 <br>
 +
'''Image 2''' - version of Image 2 <br>
 +
 
 +
 
 +
=== 2. Upload new firmware ===
 +
Press the "Choose File" button and enter the path to the new firmware file.
 +
 
 +
[[File:Upgrade_File_Uploading.png|800px]]
 +
 
 +
 
 +
=== 3. Upgrade button ===
 +
Upgrade button starts to be in Yellow, press it.
 +
 
 +
[[File:Upgrade_button.png|400px]]
 +
 
 +
By press yellow upgrade button the upgrading process starts.
 +
 
 +
[[File:Upgrade_Running.png|800px]]
  
== About Firmware ==
 
  
IPLOG-GAMA firmware is divided to three parts.
+
=== 4. Reboot ===
 +
In the end the device will be rebooted. The upgrade process is done.
 +
 
 +
[[File:Upgrade_Reboot.png|800px]]
 +
 
  
'''Recovery image''' - This part is read only and used to possibility to restore the system in the event of a main firmware fatal error of parts '''Firmware Image 1 and 2'''.
 
  
'''Firmware Image 1 and 2''' - This two parts contains the main firmware images. One is marked as "current", this firmare is running right now. When Firmware Upgrade starts the new Firmware Image is written to the second Image part which is not running. Due to this feature can not damage the firmware that works properly. After successful upload is marked the new one, the next startup will boot of it.
 
  
 +
== BASH Upgrade ==
 
{{NotePre
 
{{NotePre
|text=root@buildroot:~# metel-firmware-version
+
|text=root@iplog:~# metel-firmware-version
 
}}
 
}}
 +
Shows the current version of Recovery and Firmware images.
  
 
Shows the current version of Recovery and Firmware images.
 
 
{{NotePre
 
{{NotePre
|text=root@buildroot:~# root@iplog:~# metel-firmware-version
+
|text=root@iplog:~# metel-firmware-version
 
FIRMWARE
 
FIRMWARE
 
========
 
========
Line 34: Line 68:
 
version: 12.0.8811
 
version: 12.0.8811
 
}}
 
}}
 
 
  
  
Line 44: Line 76:
 
=== a) Windows ===
 
=== a) Windows ===
  
To copy files between IPLOG-GAMA(Linux) and Windows there is a need third-party tool. Is possible use for example [https://winscp.net/eng/index.php WinSCP].  
+
To copy files between IPLOG-GAMA(Linux) and Windows there is a need a third-party tool. For example it is possible to use [https://winscp.net/eng/index.php WinSCP].  
  
 
* Download, Install and Open the WinSCP.
 
* Download, Install and Open the WinSCP.
Line 51: Line 83:
 
==== Connection Configuration ====
 
==== Connection Configuration ====
  
'''Host name''' - IP address of IPLOG-GAMA, the default IP address is on the housing.
+
'''Host name''' - The IP address of IPLOG-GAMA, the default IP address is on the housing.
  
'''User name''' - Default user name is '''root''' and no password.
+
'''User name''' - The default user name is '''root''' and without a password.
  
 
[[File:WinSCPConnection.png|300px]]  
 
[[File:WinSCPConnection.png|300px]]  
Line 60: Line 92:
 
==== Connection Warning ====  
 
==== Connection Warning ====  
  
For every new connection is there Warning message if you trust the remote device. Confirm by hit the '''YES''' or '''No''' and this new session will not be saved.
+
For every new connection there is a Warning message shown, if you trust this remote device, confirm by clicking the '''YES''' or '''NO''' and this new session will or will not be saved according to your choice.
  
 
[[File:WinSCPConnectionWarning.png|300px]]
 
[[File:WinSCPConnectionWarning.png|300px]]
  
  
==== Upload firmware image file (.tar) ====
+
==== Upload Firmware Image File (.tar) ====
  
Select source file to upload to the IPLOG-GAMA and hit the '''F5''' button to start upload. As a target location use for example '''/tmp/''' folder.  
+
Select a source file with a new firmware image to upload to the IPLOG-GAMA and press the '''F5''' button to start the upload. For a target location use for example '''/tmp/''' folder.  
  
 
[[File:WinSCPUploadFile.png|300px]]
 
[[File:WinSCPUploadFile.png|300px]]
  
  
WinSCP starts image uploading.
+
WinSCP Starts Image Uploading.
  
 
[[File:WinSCPCopiing.png|300px]]  
 
[[File:WinSCPCopiing.png|300px]]  
  
  
After successful upload close the WinSCP session.
+
After a Successful Upload Close the WinSCP Session.
  
  
 
=== b) Linux ===
 
=== b) Linux ===
'''SCP or secure copy''' allows secure transferring of files between a local host and a remote host or between two remote hosts.
+
'''SCP or secure copy''' allows secure transferring of files between the local host and the remote host or between two remote hosts.
  
 
Example:
 
Example:
Line 88: Line 120:
 
}}
 
}}
  
Command '''scp''' copy file '''12.0.8958.tar''' of '''/home/user/''' folder on remote pc '''root'''(user)'''@192.168.6.61'''(ip address) to local folder '''/tmp/''' on IPLOG-GAMA.
+
Command '''scp''' copy file '''12.0.8958.tar''' of '''/home/user/''' folder to remote pc '''root'''(user)'''@192.168.6.61'''(ip address) to local folder '''/tmp/''' on IPLOG-GAMA.
 
 
  
  
  
 
== 2. Local USB ==
 
== 2. Local USB ==
For USB is not direct command how to copy files of USB to IPLOG-GAMA unit, therefore the USB must be "mounted" to some directory at the beginning.
+
For USB there is not a direct command to copy files of USB to IPLOG-GAMA unit, therefore the USB must be "mounted" to some directory at the beginning.
 
   
 
   
 
Create a new folder(usb) to '''/mnt/''' directory by command '''mkdir'''.
 
Create a new folder(usb) to '''/mnt/''' directory by command '''mkdir'''.
Line 107: Line 138:
 
}}
 
}}
  
That prints the message buffer to screen. USB name is typically a '''sda1'''.
+
This prints the message buffer to the screen. The USB name is typically a '''sda1'''.
  
 
{{NotePre
 
{{NotePre
Line 142: Line 173:
  
 
{{Tip|TipText=Check the mnt/usb/ folder content by command '''root@iplog:~# ls /mnt/usb/'''}}
 
{{Tip|TipText=Check the mnt/usb/ folder content by command '''root@iplog:~# ls /mnt/usb/'''}}
 
  
  
Line 150: Line 180:
 
Basic command to run the firmware upgrade.
 
Basic command to run the firmware upgrade.
 
{{NotePre
 
{{NotePre
|text=root@iplog:~# metel-firmware
+
|text=root@iplog:~# metel-firmware /new_firmware_image_destination
 
}}
 
}}
  
  
Runs the firmware upgrade of ''' "Remote Data Storage" ''' examples.
+
How to run the firmware upgrade of ''' "Remote Data Storage" ''' examples (Windows or Linux).
 
{{NotePre
 
{{NotePre
 
|text=root@iplog:~# metel-firmware /tmp/12.0.8958.tar
 
|text=root@iplog:~# metel-firmware /tmp/12.0.8958.tar
Line 160: Line 190:
  
  
Runs the firmware upgrade of ''' "Mount the Local USB" ''' example.
+
How to run the firmware upgrade of ''' "Mount the Local USB" ''' example.
 
{{NotePre
 
{{NotePre
 
|text=root@iplog:~# metel-firmware /mnt/usb/12.0.8958.tar
 
|text=root@iplog:~# metel-firmware /mnt/usb/12.0.8958.tar
Line 166: Line 196:
  
  
Example of process firmware upgrading.
+
Example of the process of firmware upgrading.
 
{{NotePre
 
{{NotePre
 
|text=
 
|text=
Line 211: Line 241:
  
  
After firmware upgrade restart the device by command "reboot"
+
After the firmware upgrade restart the device by command "reboot"
 
{{NotePre
 
{{NotePre
 
|text=root@iplog:~# reboot
 
|text=root@iplog:~# reboot

Latest revision as of 14:46, 14 January 2022

In this document we will focus on Firmware Upgrade.

About Firmware

IPLOG-GAMA firmware is divided into three parts.

Recovery image - This part is a read only image and used to possibility restore the system in the event of a main firmware fatal error of parts Firmware Image 1 and 2.

Firmware Image 1 and 2 - These two parts contain the main firmware images. One is marked as "current", this firmare is running at the present time. When the Firmware Upgrade starts the new Firmware Image is written to the second Image part which is not running. Thanks to this feature, the firmware that works properly can not be damaged. After a successful upload, the new one will startup with the next reboot and market as "current".


WEB interface Upgrade

1. Open "Upgrade" page

Upgrade Main Page.png

Running - informs about right now running image (firmware version)
Recovery - version of recovery image
Image 1 - version of Image 1
Image 2 - version of Image 2


2. Upload new firmware

Press the "Choose File" button and enter the path to the new firmware file.

Upgrade File Uploading.png


3. Upgrade button

Upgrade button starts to be in Yellow, press it.

Upgrade button.png

By press yellow upgrade button the upgrading process starts.

Upgrade Running.png


4. Reboot

In the end the device will be rebooted. The upgrade process is done.

Upgrade Reboot.png



BASH Upgrade

root@iplog:~# metel-firmware-version

Shows the current version of Recovery and Firmware images.

root@iplog:~# metel-firmware-version
FIRMWARE
========
image:   recovery
version: 2.0.8811

FIRMWARE
========
image:   image 1 (current)   //"current" label informs about right now running firmware
version: 12.0.8824

FIRMWARE
========
image:   image 2
version: 12.0.8811


Source of New Firmware Image

1. Remote Data Storage

a) Windows

To copy files between IPLOG-GAMA(Linux) and Windows there is a need a third-party tool. For example it is possible to use WinSCP.

  • Download, Install and Open the WinSCP.


Connection Configuration

Host name - The IP address of IPLOG-GAMA, the default IP address is on the housing.

User name - The default user name is root and without a password.

WinSCPConnection.png


Connection Warning

For every new connection there is a Warning message shown, if you trust this remote device, confirm by clicking the YES or NO and this new session will or will not be saved according to your choice.

WinSCPConnectionWarning.png


Upload Firmware Image File (.tar)

Select a source file with a new firmware image to upload to the IPLOG-GAMA and press the F5 button to start the upload. For a target location use for example /tmp/ folder.

WinSCPUploadFile.png


WinSCP Starts Image Uploading.

WinSCPCopiing.png


After a Successful Upload Close the WinSCP Session.


b) Linux

SCP or secure copy allows secure transferring of files between the local host and the remote host or between two remote hosts.

Example:

root@iplog:~# scp root@192.168.6.61:/home/user/12.0.8958.tar /tmp/

Command scp copy file 12.0.8958.tar of /home/user/ folder to remote pc root(user)@192.168.6.61(ip address) to local folder /tmp/ on IPLOG-GAMA.


2. Local USB

For USB there is not a direct command to copy files of USB to IPLOG-GAMA unit, therefore the USB must be "mounted" to some directory at the beginning.

Create a new folder(usb) to /mnt/ directory by command mkdir.

root@iplog:~# root@iplog:~# mkdir /mnt/usb/


Use the dmesg command which typically contains the messages produced by the device drivers.

root@iplog:~# dmesg

This prints the message buffer to the screen. The USB name is typically a sda1.

.
.
usb 1-2: new high-speed USB device number 3 using atmel-ehci
usb 1-2: New USB device found, idVendor=090c, idProduct=1000
usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-2: Product: USB DISK
usb 1-2: Manufacturer: SMI Corporation
usb 1-2: SerialNumber: AA04012700014703
usb-storage 1-2:1.0: USB Mass Storage device detected
scsi host0: usb-storage 1-2:1.0
scsi 0:0:0:0: Direct-Access     USB2.0   FlashDisk        1100 PQ: 0 ANSI: 0 CCS
sd 0:0:0:0: [sda] 1974272 512-byte logical blocks: (1.01 GB/964 MiB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
sd 0:0:0:0: [sda] No Caching mode page found
sd 0:0:0:0: [sda] Assuming drive cache: write through
 sda: sda1
sd 0:0:0:0: [sda] Attached SCSI removable disk
.
.


Mount the USB (sda1) to /mnt/usb directory

root@iplog:~# mount /dev/sda1 /mnt/usb/


Tip: Check the mnt/usb/ folder content by command root@iplog:~# ls /mnt/usb/



Run Firmware Upgrade

Basic command to run the firmware upgrade.

root@iplog:~# metel-firmware /new_firmware_image_destination


How to run the firmware upgrade of "Remote Data Storage" examples (Windows or Linux).

root@iplog:~# metel-firmware /tmp/12.0.8958.tar


How to run the firmware upgrade of "Mount the Local USB" example.

root@iplog:~# metel-firmware /mnt/usb/12.0.8958.tar


Example of the process of firmware upgrading.

FIRMWARE IMAGE
==============
filename:        /mnt/usb/12.0.8958.tar
type:            2
execute:         metel-firmware
executing:   /tmp/metel-firmware --skip-tar-script /mnt/usb/12.0.8958.tar

FIRMWARE IMAGE
==============
filename:        /mnt/usb/12.0.8958.tar
type:            2
execute:         skip

EEPROM
======
.
.
.
.
.
PARTITION
=========
total:           2
current:         3
partition 3:     valid
partition 4:     invalid
upgrade:         4

UPGRADE
=======
partition 4 has been initialized
firmware has been extracted
writing dtb /tmp/iplog-g2_27042017_A0_io-uart_if-uarten.dtb
writing dtb /tmp/iplog-g2_27042017_A0_io-none_if-none.dtb
writing kernel /tmp/zImage
writing rootfs /tmp/rootfs.ubi
valid boot header to partition 4 has been added
invalid boot header to partition 3 has been added
=== UPGRADE DONE ===


After the firmware upgrade restart the device by command "reboot"

root@iplog:~# reboot


Check the successful firmware upgrade. The new firmware was uploaded to not runnig firmware image possition and after device reboot used as current (running).

root@iplog:~# metel-firmware-version
FIRMWARE
========
image:   recovery
version: 2.0.8811

FIRMWARE
========
image:   image 1
version: 12.0.8824

FIRMWARE
========
image:   image 2 (current)
version: 12.0.8958.tar