软件分支:GB JB KK
[Description]
Generally, it is NOT recommended to update Logo/LK/Preloader via OTA upgrade.
The handsets will become useless if OTA upgrade operation is interrupted in external irresistible accidents, like power loss, etc.
[Solution]
[Case 1] Full OTA Package
Update Logo into full OTA package:
Steps:
1. Perform a full build:
./mk <product> new
2. Make otapackage:
./mk <product> otapckage
3. Copy intermediate package, paste root directory of the codebase (you can rename it):
ex)
Intermediate package path: alps\out\target\product\mt6572_evb1_nand\obj\PACKAGING\target_files_intermediates\ <product>-target_files-eng.user.zip
Root directory path: alps\intermediate.zip (renamed)
4. Type following command to build the otapackage including logo raw image:
./build/tools/releasetools/ota_from_target_files -l <file> <input zip file name> <output zip file name>
ex)
<file> = logo.bin path = "out\target\product\<product>\logo.bin"
<input zip file name> = "intermediate.zip"(from 2.)
<output zip file name> = "update.zip"
5. Sign otapackage:
java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/common/releasekey.x509.pem build/target/product/security/common/releasekey.pk8 <input file path> <output file path>
ex)
<input file path> = "update.zip"
<output file path> = "update_signed.zip"
6. Push the final otapackage "update_signed.zip" to sdcard and perform the usual update
[Case 2] Differential OTA Package
Update Logo into differential OTA package:
***: First of all, make sure the current sw version in the machine is V2.
Need two codebases to build V2_4 differential OTA package for example:
1. Change directory to root of V2 codebase
2. ./makeMtk <project> bm_new
3. ./makeMtk <product> otapackage
4. Copy intermediate package into V4 root directory and rename it as V2_org.zip
ex)
Intermediate package path: V2_codebase\alps\out\target\product\<project>\obj\PACKAGING\target_files_intermediates\<product>-target_files-<user>.zip
5. Change directory to root of V4 codebase
6. ./makeMtk <project> bm_new
7. ./makeMtk <product> otapackage
8. Copy intermediate package into V4 root directory and rename it as V4_new.zip
ex)
Intermediate package path: V4_codebase\alps\out\target\product\<project>\obj\PACKAGING\target_files_intermediates\<product>-target_files-<user>.zip
9. Build logo.bin into differential OTA package and rename V2_4.zip as update.zip
./build/tools/releasetools/ota_from_target_files -l <file> -i V2_org.zip V4_new.zip V2_4.zip
ex)
<file> = logo.bin path = "V4_codebase\alps\out\target\product\<product>\logo.bin"
10. Sign otapackage:
java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/common/releasekey.x509.pem build/target/product/security/common/releasekey.pk8 <input file path> <output file path>
ex)
<input file path> = "update.zip"
<output file path> = "update_signed.zip"
11. Push the final otapackage "update_signed.zip" to sdcard and perform the usual update
Note: Firstly, logo.bin should be prepared. For logo.bin, there is no differential OTA or full OTA. It's all about full OTA.
[Case 3] Preloader
Special Case:
With header generated and downloaded via flashtool, preloader in handset is different from that in out directory. Preloader in out directory can NOT be used as source to build into OTA package.
If preloader in out directory is built into OTA package, the handset will have a bootup issue.
To upgrade from V2 to V4, there are extra steps to prepare preloader image:
1. Perform a full build:
./mk <product> new
2. Download V4 load into handset via flashtool
3. Readback preloader image from handset via flashtool
FAQ05169 [Storage] How to read back a partition by flash tool?
4. Go to step 4(in Case 1) or step 9(in Case 2) to build it into full/diff OTA package
NOTE
Different options are used to build logo/lk/preloader into OTA package:
-r (--preloader) <file>
Specify 'preloader.img' to upgrade.
-l (--logo) <file>
Specify 'logo.img' to upgrade.
-u (--uboot) <file>
Specify 'uboot.img' to upgrade.
[Description]
Generally, it is NOT recommended to update Logo/LK/Preloader via OTA upgrade.
The handsets will become useless if OTA upgrade operation is interrupted in external irresistible accidents, like power loss, etc.
[Solution]
[Case 1] Full OTA Package
Update Logo into full OTA package:
Steps:
1. Perform a full build:
./mk <product> new
2. Make otapackage:
./mk <product> otapckage
3. Copy intermediate package, paste root directory of the codebase (you can rename it):
ex)
Intermediate package path: alps\out\target\product\mt6572_evb1_nand\obj\PACKAGING\target_files_intermediates\ <product>-target_files-eng.user.zip
Root directory path: alps\intermediate.zip (renamed)
4. Type following command to build the otapackage including logo raw image:
./build/tools/releasetools/ota_from_target_files -l <file> <input zip file name> <output zip file name>
ex)
<file> = logo.bin path = "out\target\product\<product>\logo.bin"
<input zip file name> = "intermediate.zip"(from 2.)
<output zip file name> = "update.zip"
5. Sign otapackage:
java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/common/releasekey.x509.pem build/target/product/security/common/releasekey.pk8 <input file path> <output file path>
ex)
<input file path> = "update.zip"
<output file path> = "update_signed.zip"
6. Push the final otapackage "update_signed.zip" to sdcard and perform the usual update
[Case 2] Differential OTA Package
Update Logo into differential OTA package:
***: First of all, make sure the current sw version in the machine is V2.
Need two codebases to build V2_4 differential OTA package for example:
1. Change directory to root of V2 codebase
2. ./makeMtk <project> bm_new
3. ./makeMtk <product> otapackage
4. Copy intermediate package into V4 root directory and rename it as V2_org.zip
ex)
Intermediate package path: V2_codebase\alps\out\target\product\<project>\obj\PACKAGING\target_files_intermediates\<product>-target_files-<user>.zip
5. Change directory to root of V4 codebase
6. ./makeMtk <project> bm_new
7. ./makeMtk <product> otapackage
8. Copy intermediate package into V4 root directory and rename it as V4_new.zip
ex)
Intermediate package path: V4_codebase\alps\out\target\product\<project>\obj\PACKAGING\target_files_intermediates\<product>-target_files-<user>.zip
9. Build logo.bin into differential OTA package and rename V2_4.zip as update.zip
./build/tools/releasetools/ota_from_target_files -l <file> -i V2_org.zip V4_new.zip V2_4.zip
ex)
<file> = logo.bin path = "V4_codebase\alps\out\target\product\<product>\logo.bin"
10. Sign otapackage:
java -Xmx2048m -jar out/host/linux-x86/framework/signapk.jar -w build/target/product/security/common/releasekey.x509.pem build/target/product/security/common/releasekey.pk8 <input file path> <output file path>
ex)
<input file path> = "update.zip"
<output file path> = "update_signed.zip"
11. Push the final otapackage "update_signed.zip" to sdcard and perform the usual update
Note: Firstly, logo.bin should be prepared. For logo.bin, there is no differential OTA or full OTA. It's all about full OTA.
[Case 3] Preloader
Special Case:
With header generated and downloaded via flashtool, preloader in handset is different from that in out directory. Preloader in out directory can NOT be used as source to build into OTA package.
If preloader in out directory is built into OTA package, the handset will have a bootup issue.
To upgrade from V2 to V4, there are extra steps to prepare preloader image:
1. Perform a full build:
./mk <product> new
2. Download V4 load into handset via flashtool
3. Readback preloader image from handset via flashtool
FAQ05169 [Storage] How to read back a partition by flash tool?
4. Go to step 4(in Case 1) or step 9(in Case 2) to build it into full/diff OTA package
NOTE
Different options are used to build logo/lk/preloader into OTA package:
-r (--preloader) <file>
Specify 'preloader.img' to upgrade.
-l (--logo) <file>
Specify 'logo.img' to upgrade.
-u (--uboot) <file>
Specify 'uboot.img' to upgrade.