• Lv0
    粉丝0

积分49 / 贡献0

提问4答案被采纳0文章0

OpenHarmony 4.0 差分包制作报错:raise RuntimeError(已解决)

martinhu 显示全部楼层 发表于 2023-12-8 01:05:35

一、 ota差分包制作命令及结果如下:

packaging_tools\$ python3 build_update.py ./target_package/ ./output_package/ -s ./source_package/ -pk ./target_package/rsa_private_key2048.pem 2023-12-07 10:05:38 INFO : VERSION.mbn file parsing complete! path: ./target_package/updater_config/VERSION.mbn 2023-12-07 10:05:38 INFO : BOARD.list file parsing complete! path: ./target_package/updater_config/BOARD.list 2023-12-07 10:05:38 INFO : XML file parsing completed! 2023-12-07 10:05:38 INFO : [] 2023-12-07 10:05:38 ERROR : Uncaught exception Traceback (most recent call last): File "build_update.py", line 897, in <module> main() File "build_update.py", line 861, in main if incremental_processing( File "build_update.py", line 757, in incremental_processing if increment_image_processing( File "build_update.py", line 654, in increment_image_processing IncUpdateImage(each_src_image_path, each_src_map_path) File "/home/xxx/ohos/OpenHarmony_v4.0_release/base/update/packaging_tools/image_class.py", line 128, in __init__ self.parse_raw_image_file(image_path, map_path) File "/home/xxx/ohos/OpenHarmony_v4.0_release/base/update/packaging_tools/image_class.py", line 167, in parse_raw_image_file self.parse_block_map_file(map_path, f_r) File "/home/xxx/ohos/OpenHarmony_v4.0_release/base/update/packaging_tools/image_class.py", line 188, in parse_block_map_file raise RuntimeError RuntimeError 2023-12-07 10:05:38 INFO : Exception occurred, Resource cleaning completed!

二、packaging_tools部分目录结构如下:

packaging_tools/ ├── lib │ ├── diff #取自out/rk3568/clang_x64/updater/updater/ │ ├── e2fsck #及以下.so文件取自out/rk3568/clang_x64/thirdparty/e2fsprogs │ ├── e2fsdroid │ ├── libext2_blkid.so │ ├── libext2_com_err.so │ ├── libext2_e2p.so │ ├── libext2_misc.so │ ├── libext2_quota.so │ ├── libext2_uuid.so │ ├── libext2fs.so │ └── mke2fs ├── output_package │ └── updater_full.zip #全量升级验证成功 ├── sign_cert │ └── signing_cert.crt #取自base/update/updater/test/unittest/test_data/src/signing_cert.crt ├── signature ├── source_package #由上一次编译全量包对应的target_package copy而来 │ ├── MiniLoaderAll.bin │ ├── boot_linux.img │ ├── chip_prod.img │ ├── config.cfg │ ├── eng_system.img │ ├── parameter.txt │ ├── ramdisk.img │ ├── resource.img │ ├── rsa_private_key2048.pem │ ├── sys_prod.img │ ├── system.img │ ├── uboot.img │ ├── updater.img │ ├── updater_binary │ ├── updater_config │ │ ├── BOARD.list │ │ ├── VERSION.mbn #version: 4.0.10.15 │ │ └── updater_specified_config.xml #fileVersion=02, softVersion=4.0.10.15 compType=0 │ ├── userdata.img │ ├── vendor.img │ └── vendor.map ├── target_package #添加修改,编译后,更新imgs和updater_config配置 │ ├── MiniLoaderAll.bin │ ├── boot_linux.img │ ├── chip_prod.img │ ├── config.cfg │ ├── eng_system.img │ ├── parameter.txt │ ├── ramdisk.img │ ├── resource.img │ ├── rsa_private_key2048.pem │ ├── sys_prod.img │ ├── system.img │ ├── uboot.img │ ├── updater.img │ ├── updater_binary │ ├── updater_config │ │ ├── BOARD.list #version: 4.0.10.15 │ │ ├── VERSION.mbn │ │ └── updater_specified_config.xml #fileVersion=02, softVersion=4.0.10.16 compType=1 │ ├── userdata.img │ ├── vendor.img │ └── vendor.map

三、target_package和source_package对比差异如下:

diff target_package/ source_package/ Binary files target_package/boot_linux.img and source_package/boot_linux.img differ Binary files target_package/chip_prod.img and source_package/chip_prod.img differ Binary files target_package/eng_system.img and source_package/eng_system.img differ Binary files target_package/ramdisk.img and source_package/ramdisk.img differ Binary files target_package/resource.img and source_package/resource.img differ Binary files target_package/sys_prod.img and source_package/sys_prod.img differ Binary files target_package/system.img and source_package/system.img differ Binary files target_package/updater.img and source_package/updater.img differ Common subdirectories: target_package/updater_config and source_package/updater_config Binary files target_package/userdata.img and source_package/userdata.img differ Binary files target_package/vendor.img and source_package/vendor.img differ

packaging_tools$ diff target_package/updater_config/ source_package/updater_config/
diff target_package/updater_config/updater_specified_config.xml source_package/updater_config/updater_specified_config.xml
4c4
<         <info fileVersion="02" prdID="123456" softVersion="OpenHarmony 4.0.10.16" date="2023-12-06" time="18:30">head info</info>
---
>         <info fileVersion="02" prdID="123456" softVersion="OpenHarmony 4.0.10.15" date="2023-12-06" time="11:30">head info</info>
7,8c7,8
<       <component compAddr="vendor" compId="12" resType="05" compType="1" compVer="1.0">./vendor.img</component>
<       <component compAddr="system" compId="18" resType="05" compType="1" compVer="1.0">./system.img</component>
---
>       <component compAddr="vendor" compId="12" resType="05" compType="0" compVer="1.0">./vendor.img</component>
>       <component compAddr="system" compId="18" resType="05" compType="0" compVer="1.0">./system.img</component>

更新:已解决

合入PR: https://gitee.com/openharmony/update\_packaging\_tools/pulls/32

您尚未登录,无法参与评论,登录后可以:
参与开源共建问题交流
认同或收藏高质量问答
获取积分成为开源共建先驱

精彩评论1

martinhu

沙发 发表于 2023-12-8 17:12:13
合入PR验证OK,
https://gitee.com/openharmony/update\_packaging\_tools/pulls/32

Copyright   ©2023  OpenHarmony开发者论坛  京ICP备2020036654号-3 |技术支持 Discuz!

返回顶部