Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于TencentOS-tiny ota_diff ring =1 时的patch_test 错误 #313

Open
suncheng7808 opened this issue Jul 22, 2021 · 1 comment
Open

关于TencentOS-tiny ota_diff ring =1 时的patch_test 错误 #313

suncheng7808 opened this issue Jul 22, 2021 · 1 comment

Comments

@suncheng7808
Copy link

您好!

打搅了!不知您是否还在维护这个项目!

最近在学习TencentOS-tiny,在学习diff ota 部分时发现有的文件产生patch文件时报错。
报错log如下:

D:\Project\study_obj\c_obj\TencentOS-tiny\TencentOS-tiny\components\ota\tools\diff\out\target>diff.exe -v -b 2048 -n 0.2 -o 0.1 gd_0.1.bin gd_0.2.bin patch.bin
RUN bsdiff algorithm ...
PARSING bspatch ...
VERIFY cmd integrity ...
SEARCHING safe block ...
BUILD dependency graph ...
ANALYSING dependency graph ...

====== simplified relied relationship list ======
MAKING final patch ...
is ring ][%0]-
[################################ ][%31]/
-----------ring=0--------------
[topo_ring_break] graph is ring
[#####################################################################################################][%100]/
-----------ring=1--------------

blk_len=2048 the_blk_len=2048 blk_cnt=87
I=5 N=3 C=21 D=1517
ctrl_blk=0x10BB5A8 diff_blk=10BB5BD extra_blk=10BBBAA
cursor: 1517 blk_len=2048
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=6 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=7 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=8 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=9 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=10 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=11 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=12 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=13 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=14 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=15 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=16 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=17 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=18 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=19 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=20 N=2 C=14 D=1992
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBD7E
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=21 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 1992 blk_len=2048
cursor: 2048 blk_len=2048
I=22 N=3 C=21 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5BD extra_blk=10BBDBD
cursor: 722 blk_len=2048
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=23 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=24 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=25 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=26 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=4 N=1 C=7 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5AF extra_blk=10BBDAF
cursor: 2048 blk_len=2048
I=3 N=1 C=7 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5AF extra_blk=10BBDAF
cursor: 2048 blk_len=2048
I=2 N=1 C=7 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5AF extra_blk=10BBDAF
cursor: 2048 blk_len=2048
I=1 N=1 C=7 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5AF extra_blk=10BBDAF
cursor: 2048 blk_len=2048
I=0 N=1 C=7 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5AF extra_blk=10BBDAF
cursor: 2048 blk_len=2048
I=27 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=28 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 880 blk_len=2048
cursor: 2048 blk_len=2048
I=29 N=3 C=21 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5BD extra_blk=10BBDBD
cursor: 355 blk_len=2048
cursor: 699 blk_len=2048
cursor: 2048 blk_len=2048
I=30 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=31 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=32 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=33 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=34 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=35 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=36 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=37 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=38 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=39 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=40 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=41 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=42 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=43 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=44 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=45 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=46 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=47 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=48 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=49 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=50 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=51 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=52 N=2 C=14 D=2048
ctrl_blk=0x10BB5A8 diff_blk=10BB5B6 extra_blk=10BBDB6
cursor: 684 blk_len=2048
cursor: 2048 blk_len=2048
I=53 N=5 C=35 D=2046
ctrl_blk=0x10BB5A8 diff_blk=10BB5CB extra_blk=10BBDC9
cursor: 684 blk_len=2048
cursor: 1404 blk_len=2048
cursor: 1566 blk_len=2048
cursor: 1568 blk_len=2048
cursor: 2048 blk_len=2048
ERROR: line number[1325], function[patch_test] msg[wrong patch!]
ERROR: line number[1427], function[ota_diff] msg[patch test failed!]
ERROR: line number[202], function[make_patch] msg[ota_diff failed
]
make patch failed

=================================
后来经过不断的测试发现如果ring 为0 就没有问题。如果ring >0 就会包这个错误!

因此请教一下是不是要先判断图里是否有环,再解环,再处理数据?

应为对这部分的算法不了解,不知怎么改,所以请教你一下。

测试的bin文件见附件!
diff_ota_testbin.zip

@Supowang1989
Copy link
Collaborator

您好,感谢您的反馈,最近我们项目比较忙,过段时间我安排研发的同事来复现分析下,感谢您的支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants