Closed dangowrt closed 3 months ago
Hmm, I'm deleting the downloaded firmware if any of the verification steps fail, so maybe I'm deleting it too soon? Checking now...
It also fails with the same error when --keep
is set. What I meant is that the file seems to be downloaded correctly and only sha256 verification for some reason fails, and also only on some devices...
Got it, thanks.
The culprit must be busybox sha256sum somehow erroring out (and I'm throwing away the ubus stderr info right now). I've got an mt7622, so I'll try it there, see if I can reproduce your ubnt's behavior.
Bah, works fine on mine. If you've got time, could you add a print line to /usr/bin/owut
, probably around line 205, run owut download
and show me the output?
sum: function(file) {
// Return the checksum for the specified file.
let data = _run("/bin/busybox", [ "sha256sum", file ]);
printf(">>>>>>>>>>>>>>>>>>>>\n%s\n%.4J\n<<<<<<<<<<<<<<<\n", file, data);
return data?.code == 0 ? substr(data.stdout, 0, 64) : null;
},
Don't bother with above, I've just added legitimate diagnostics in a70f7e5cda15eb0b0a6574eea25c7fe82410fd57 that should tell us what's going on with that call...
Trivial reason: I was missing rpcd-mod-file
, which isn't a dependency nor indirect dependency of owut
at the moment, it should be added.
Aha, thanks! I don't know how I missed that. I just checked and rpcd-mod-file got sucked in by luci and friends on all my test machines, so I missed that.
Just pushed it to https://github.com/openwrt/packages/pull/24324
Manually downloading the file URL works, and results in the expected SHA256 as well.
However,With/tmp/firmware.bin
doesn't exist, which is probably the reason for busybox sha256sums not working.--keep
firmware.bin does exist in/tmp
and SHA256 also matches.