OTA升级包制作
Generate the Full OTA update package
- Configure Poky and make a full build (build-\<
>-image). - Fully flash the images as follows:
boot and recovery with \<>-boot.img
system with \<>-sysfs.ext4
recoveryfs with \<>-recovery.ext4
cache with \<>-cache.ext4
userfs with \<>-usrfs.ext4 - Type the following command:
cd poky/build/tmp-glibc/deploy/images/\<>/\< >-ota-target-image-ext4 - If there are any non-HLOS firmware updates, copy them to the radio/ directory.
- Zip the directory for image generation as follows:
zip -qry/android_compat/build/tools/releasetools/target-files-ext4.zip * - Type the following command:
cdandroid_compat/build/tools/releasetools - Create a shell script for Full OTA named as full_ota.sh with the following content:
#!/bin/sh
if [ “$#” -ne 3 ]; then
echo “Usage : $0 target_files_zipfile target_name MMC_or_MTD”
echo “————————————————————-“
echo “example: $0 target_files_ubi.zip mdm9607 MTD”
echo “example: $0 target_files_ext4.zip apq8009 MMC”
exit 1
fi
export PATH=.:../../../../poky/build/tmp-glibc/sysroots/x86_64-linux/usr/bin:$PATH
export OUT_HOST_ROOT=.
export LD_LIBRARY_PATH=../../../../poky/build/tmp-glibc/sysroots/x86_64-linux/usr/lib
rm -rf target_files
unzip -qo $1 -d target_files
mkdir -p target_files/META
mkdir -p target_files/SYSTEM
zipinfo -1 $1 | awk ‘BEGIN { FS=”SYSTEM/“ } /^SYSTEM\// {print “system/“ $2}’ | fs_config -D ../../../../poky/build/tmp-glibc/work/$2-\<>/\< >/1.0-r0/rootfs > target_files/META/filesystem_config.txt
cd target_files && zip -q ../$1 META/*filesystem_config.txt
SYSTEM/build.prop && cd ..
./ota_from_target_files -n -v -d $3 -p . -s “../../../device/qcom/common” –no_signing $1 update.zip
Generate the Incremental OTA update package
- Using two separate workspaces, perform steps 1 through 6 mentioned in Section 2.1 to
prepare Version-1 (v1) and Version-2 (v2) target-files-ext4.zip files – considering v1 to be
the base workspace currently on the apq target which is to be upgraded to v2. - Create a shell script for Incremental OTA named as incremental_ota.sh with the following
content:
#!/bin/sh
if [ “$#” -ne 4 ]; then
echo “Usage : $0 v1_target_files_zipfile v2_target_files_zipfile
target_name MMC_or_MTD”
echo “————————————————————-“
echo “example: $0 v1_target_files_ubi.zip v2_target_files_ubi.zip mdm9607 MTD”
echo “example: $0 v1_target_files_ext4.zip v2_target_files_ext4.zip apq8009 MMC”
exit 1
fi
export PATH=.:../../../../poky/build/tmp-glibc/sysroots/x86_64-linux/usr/bin:$PATH
export OUT_HOST_ROOT=.
export LD_LIBRARY_PATH=../../../../poky/build/tmp-glibc/sysroots/x86_64-linux/usr/lib
rm -rf target_files
unzip -qo $2 -d target_files
mkdir -p target_files/META
mkdir -p target_files/SYSTEM
zipinfo -1 $2 | awk ‘BEGIN { FS=”SYSTEM/“ } /^SYSTEM\// {print “system/“ $2}’ | fs_config -D ../../../../poky/build/tmp-glibc/work/$3-\<>/\< >/1.0-r0/rootfs > target_files/META/filesystem_config.txt
cd target_files && zip -q ../$2 META/*filesystem_config.txt SYSTEM/build.prop && cd ..
./ota_from_target_files -n -d $4 -v -p . -s
“../../../device/qcom/common” –no_signing -i $1 $2 update_incr.zip
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 yxhlfx@163.com
文章标题:OTA升级包制作
本文作者:红尘追风
发布时间:2016-10-23, 19:53:38
原始链接:http://www.micernel.com/2016/10/23/OTA_Package_Create/版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。