Hello,
I am attempting to install a delta update using zchunk.
I have booted the 2nd root FS partition dev/mmcblk0p3.
I am expecting the update to target and write to dev/mmcblk0p2.
Here is my sw-description:
************************
software =
{
version = "0.0.1";
description = "Firmware update for XXXXX Project";
hardware-compatibility: [ "1.0", "1.2", "1.3"];
images: (
{
filename="output.zck.header";
type = "delta";
device = "/dev/mmcblk0p2";
properties: {
url = "https://**********.
cloudfront.net/software/b/output.zck";
chain = "raw";
source = "/dev/mmcblk0p3";
};
}
);
}
************************
To update I am running:
sudo swupdate -H raspi4:1.0 -i ~/zchunk.swu -v
Which progresses nicely for ~20 minutes, and finally fails with this output:
*****************************
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (finish_chunk) Index 224017 digest 243db7c398bda10a64333a5866a8948c1d7db0cbc69b690fb3adbd6407a426af digest uncomp 243db7c398bda10a64333a5866a8948c1d7db0cbc69b690fb3adbd6407a426af
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (zck_end_chunk) Finished chunk size: 42507
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (hash_init) Initializing SHA-256 hash
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (hash_init) Initializing SHA-256 hash
[INFO ] : SWUPDATE running : [get_total_size] : Total bytes to be reused : 14855030358
[INFO ] : SWUPDATE running : [get_total_size] : Total bytes to be downloaded : 64068459
[INFO ] : SWUPDATE running : [install_delta] : Size of artifact to be installed : 15115223040
[TRACE] : SWUPDATE running : [install_single_image] : Found installer for stream output.zck.header raw
[TRACE] : SWUPDATE running : [trigger_download] : Range request : 15387823-15390657,15411853-15419054,15452925-15468571,15969312-15981475,16039860-16058334,16094795-16108533,16118342-16120923,16122967-16141611,16692915-16704474,16933573-16950500,17138156-17152533,17154798-17156167,17159204-17190414,17227787-17236022,17395940-17406939,17423428-17432900,17449299-17515938,17690975-17696929,17782544-17785645,17850027-18425242,18541306-18923994,19125804-19492279,19701877-20030661,73036470-73043024,73055347-73100319,587761848-587763578,587764774-587767917,588128395-588143791,588149047-588154723,588165319-588168896,588169971-588180605,588211532-588226176,588242782-588251346,588322932-588339158,588737416-588747300,588749661-588761415,588765908-588768049,588772252-588783497,588785151-588813671,588821301-588827361,588832437-588835714,588864111-588880726,588893086-588900282,588925720-588938310,588966426-588975085,589014978-589033002,589037767-589042508,589130595-589133925,589148346-589163895,589216414-589220331,589255753-589262745,589278671-589282154,589394453-589402145,589404521-589406580,589409485-589414897,589554311-589561308,589564502-589565487,589569253-589579565,589588421-589590946,589598920-589604744,589610614-589616691,589623662-589638105,589673024-589676505,589827220-589831858,589832326-589838358,589840451-589842556,589843928-589847227,589848547-589849613,589850590-589851888,589852569-589854807,589857649-589859834,589867655-589868843,589870236-589871649,589872544-589876403,589881820-589965072,589997279-590014376,590054857-590073975,590189070-590251046,590388662-590404707,590468686-590508908,610901750-610929759,619057134-619081197,636153729-636159400,654808268-654882888,660793924-661015118,679243280-679269358,679302322-679365740,680686036-680713373,680796608-680828679,684469739-684499336,695981854-695994324,699527008-699556441,699571965-699585045,699623500-699653849,699657659-699669700,699697154-699715967,699763575-699797841,699844065-699901547,699907580-699910693,699948467-699961500,699975476-700016887,700075117-700111397,702426640-702492684,
[DEBUG] : SWUPDATE running : [channel_set_options] : cURL's low download speed timeout is disabled, this is most probably not what you want. Adapted it to 300s instead.
[ERROR] : SWUPDATE failed [0] ERROR delta_handler.c : install_delta : 1077 : Delta Update fails : aborting
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running : [install_single_image] : Installer for delta not successful !
[ERROR] : SWUPDATE failed [1] Installation failed !
[TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running : Waiting for requests...
[ERROR] : SWUPDATE failed [0] ERROR install_from_file.c : endupdate : 55 : SWUpdate *failed* !
*****************************
The deltas seem to be correct, but the install fails immediately after the range requests are printed. It does not seem that anything is being downloaded as the link is quite slow and it should take a while to download the 64MB.
I would like a more experienced look at this. Things to try or advice to get more debugging information would be much appreciated.
Things I have done to try and debug:
1.) Verified that with cURL I can download at least a few of the ranges specified from the same URL that is listed on the sw-description
2.) Switched around the device and source values (They were originally the same partition but I realize now thar source should be active mounted rootFS and device should be inactive target)
Other system info:
OS: Debian 10 (Buster)
Hardware: Raspi CM4
ZChunk version: 1.3.2
Happy to provide more information if necessary.
Many thanks in advance.