User Tools

Site Tools


wiki:upgrade_keros3_to_4

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:upgrade_keros3_to_4 [2018/09/20 14:44]
ghi [Upgrade procedure]
wiki:upgrade_keros3_to_4 [2019/02/14 14:55]
hch [Limits]
Line 1: Line 1:
-====== Upgrade from KerOS 3.x to 4 with custom liveburner ======+====== Upgrade from KerOS version ​3.x to 4.x with custom liveburner ======
  
-KerOS 4.x introduces some important modifications (new Kernel, rootfsRW, hotfixing) requiring an upgrade with a liveburner. This page will provide a way to do this upgrade with conservation of some elements like the configuration and reinstall some additional packages.+KerOS v4.x introduces some important modifications (new kernel, rootfsRW, hotfixing) requiring an upgrade with a liveburner. This page will provide a way to do this upgrade with conservation of some elements like the configuration and reinstall some additional packages.
  
 ===== Introduction ===== ===== Introduction =====
  
-A liveburner package will by default ​flush the eMMC content and install only the KerOS package. So any package, data and configurations will be lost using such upgrade package. \\  +A liveburner package will by default ​flash the eMMC content and install only the KerOS package. So any packages, dataand configurations will be lost using such upgrade package. \\  
-This upgrade will be problematic for products already on the field that needs to keep a Device Management link UP and RUNNING ​before and after the upgrade.+This upgrade will be problematic for products already on the field that need to keep a Device Management link up and running ​before and after the upgrade.
  
 To solve this, this procedure will provide: To solve this, this procedure will provide:
-  * A way to backup some files (i.e. configurations) before ​flushing ​the eMMC and restore them at the end of the upgrade.+  * A way to backup some files (i.e. configurations) before ​flashing ​the eMMC and restore them at the end of the upgrade.
   * A tool to customize a liveburner in order to add some additional packages during the upgrade.   * A tool to customize a liveburner in order to add some additional packages during the upgrade.
  
-<note important>​Please note that an upgrade is always risky and must be tested and validated before deploying on the products on the field. We also recommend to upgrade products in small batches and not all the products in a raw.</​note>​+<note important>​Please note that an upgrade is always risky and must be tested and validated before deploying on the products on the field. We also recommend to upgrade products in small batches and not all the products in a row.</​note>​
  
 ===== Upgrade procedure ===== ===== Upgrade procedure =====
Line 20: Line 20:
   - Product will restart on the liveburner upgrade tool.   - Product will restart on the liveburner upgrade tool.
   - Execution of the script ''​preinst''​ to mount a safezone and copy the files to backup on it.   - Execution of the script ''​preinst''​ to mount a safezone and copy the files to backup on it.
-  - Upgrade of the KerOS system including the eMMC flush and installation of the KerOS package.+  - Upgrade of the KerOS system including the eMMC flash and installation of the KerOS package.
   - Execution of the ''​preapps''​ and/or ''​postapps''​ scripts to access to the safezone and restore/​merge saved files.   - Execution of the ''​preapps''​ and/or ''​postapps''​ scripts to access to the safezone and restore/​merge saved files.
   - Installation of the additional packages and save in backup.   - Installation of the additional packages and save in backup.
Line 27: Line 27:
 ===== Requirements ===== ===== Requirements =====
  
-  * An original KerOS liveburner 4.x package available in the [[wiki:​resources|resources ​page]]. +  ​* A desktop Linux machine (native or virtual). //=> It will be used to build the ''​liveburner''​ package.//​ 
-  * The update_liveburner_package-4.0-g8c53719.tar.gz tool available [[wiki:resources#other_tools|here]]. +  ​* An original KerOS liveburner 4.x package available in the resources page: [[resources_ibts:resources|Wirnet iBTS resources]] or [[resources_ifemto:​resources|Wirnet iFemtoCell ​resources]]. 
-  * The following packages :<code bash>​sudo apt-get install device-tree-compiler cpio binutils</​code>​+  * The ''​update_liveburner_package-4.0-g8c53719.tar.gz'' ​tool available [[wiki:common_resources#tools|here]]. 
 +  * The following packages: <code bash>​sudo apt-get install device-tree-compiler cpio binutils</​code>​
  
-<note important>​Procedure hereunder is dedicated to Linux operating systems.</​note>​ 
 ===== Limits ===== ===== Limits =====
  
 Some limits are present in this upgrade mechanism: Some limits are present in this upgrade mechanism:
-  * Safezone space: 2MiB +  * Safezone space: 2MiB. 
-  * Additional packages max size cumulated: 20MiB +  * Additional packages max size cumulated: 20MiB. 
-  * Secure Storage is lost for products without Secure Boot activated+
  
 ===== Usage ===== ===== Usage =====
  
-==== Generate a custom liveburner ====+==== Generate a custom liveburner ​(from a Linux machine)====
  
 === Default process === === Default process ===
Line 67: Line 67:
 Additional packages can be installed simply by adding them as arguments. Additional packages can be installed simply by adding them as arguments.
 <code bash> <code bash>
-./​update_liveburner.sh liveburner_4.0.2_klk-lpbs-signed.ipk preinst preapps ​my_packet.ipk+./​update_liveburner.sh liveburner_4.0.2_klk-lpbs-signed.ipk preinst preapps ​my_package.ipk
 </​code>​ </​code>​
 </​note>​ </​note>​
Line 76: Line 76:
  
 ^ Variable ^ Role ^ Example ^ ^ Variable ^ Role ^ Example ^
-| ROOTFSRW_PATH | Root path adapted to the firmware version. For KerOS < 4.0 it will be ''/​user/​rootfs_rw/''​ and for >= 4.0 version it will be ''/''​ | cp ${ROOTFSRW_PATH}/​etc/​hosts ${SAFEZONE_MOUNTPOINT}/​ | +''​ROOTFSRW_PATH'' ​| Root path adapted to the firmware version. For KerOS < 4.0 it will be ''/​user/​rootfs_rw/''​ and for >= 4.0 version it will be ''/''​ | ''​cp ${ROOTFSRW_PATH}/​etc/​hosts ${SAFEZONE_MOUNTPOINT}/​'' ​
-| SAFEZONE_MOUNTPOINT | The mountpoint to use to access the safezone | cp ${ROOTFSRW_PATH}/​etc/​hosts ${SAFEZONE_MOUNTPOINT}/​ | +''​SAFEZONE_MOUNTPOINT'' ​| The mountpoint to use to access the safezone | ''​cp ${ROOTFSRW_PATH}/​etc/​hosts ${SAFEZONE_MOUNTPOINT}/​'' ​
-| /user  | The mountpoint to use to access the RW USER partiton | cp /​user/​myfile.txt ${SAFEZONE_MOUNTPOINT}/​ |+''​/user'' ​ | The mountpoint to use to access the RW USER partiton | ''​cp /​user/​myfile.txt ${SAFEZONE_MOUNTPOINT}/​'' ​|
  
 In case of custom upgrade, please note that the management of the content of the safezone needs to be done using the scripts ''​preinst''​ and ''​preapps''​ like detailed below. In case of custom upgrade, please note that the management of the content of the safezone needs to be done using the scripts ''​preinst''​ and ''​preapps''​ like detailed below.
Line 89: Line 89:
 To add some files, ​ append them at the end of the script like shown in the commented example line. To add some files, ​ append them at the end of the script like shown in the commented example line.
  
-++++ preinst | +++++ 
-<​code>​+File to download - preinst.sh 
 +<​code ​bash preinst.sh>
 #!/bin/sh #!/bin/sh
 # Description:​ Script to be executed before a liveburner upgrade. # Description:​ Script to be executed before a liveburner upgrade.
Line 154: Line 155:
 ++++ ++++
  
-In case of customer ​blocking problem during the execution of this script, it is possible to interrupt the upgrade. To do so, it is possible to use the function **fatal_error** in the customer ​part of the script like this:+In the case of custom upgrade ​blocking problem ​happens ​during the execution of this script, it is possible to interrupt the upgrade. To do so, it is possible to use the function **fatal_error** in the custom ​part of the script like this:
 <code bash> <code bash>
 cp ${ROOTFSRW_PATH}/​etc/​non_existant_file ${SAFEZONE_MOUNTPOINT}/​ || fatal_error "Error detected! stop the upgrade!!"​ cp ${ROOTFSRW_PATH}/​etc/​non_existant_file ${SAFEZONE_MOUNTPOINT}/​ || fatal_error "Error detected! stop the upgrade!!"​
Line 171: Line 172:
 The first way is the more simple way. It consist of adapting the ''​preapps''/''​postapps''​ scripts (like for ''​preinst''​). Kerlink recommends this method. ​ The first way is the more simple way. It consist of adapting the ''​preapps''/''​postapps''​ scripts (like for ''​preinst''​). Kerlink recommends this method. ​
  
-++++ preapps | + 
-<​code>​+++++ 
 +File to download - preapps.sh 
 +<​code ​bash preapps.sh>
 #!/bin/sh #!/bin/sh
 # Description:​ Script to be executed during a liveburner upgrade # Description:​ Script to be executed during a liveburner upgrade