OpenHarmony开发者论坛
标题:
OpenHarmony 4.0 差分包制作报错:raise RuntimeError(已解决)
[打印本页]
作者:
martinhu
时间:
2023-12-8 01:05
标题:
OpenHarmony 4.0 差分包制作报错:raise RuntimeError(已解决)
[md]一、 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
[/md]
作者:
martinhu
时间:
2023-12-8 17:12
合入PR验证OK,
https://gitee.com/openharmony/update
\_packaging\_tools/pulls/32
欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/)
Powered by Discuz! X3.5