96boards-hikey / tools-images-hikey960

Tools and images for HiKey960
BSD 2-Clause "Simplified" License
53 stars 48 forks source link

wget from recovery-flash-uefi-prebuilt.sh does not re-download when it should #42

Open v0lker opened 5 years ago

v0lker commented 5 years ago

e. g. with revision #85 of the UEFI firmware, first downloading the debug version, then release works because the time stamp of the release version seems to be after the debug version; but the other way, wget is going to skip the download and you'll stay at the version you're at:

[...]
File ‘MD5SUMS.txt’ not modified on server. Omitting download.
[...]

actually it's worse - if you want an older version in general, the same is going to happen, so you cannot downgrade without (re)moving the folder.

what i'd suggest is to

a) name the download folder not uefi but uefi-{debug,release}-{version} or b) to always download all of the files which is going to create some overhead c) to unconditionally download the md5sums file, then compare and act accordingly.

i think a) is nice because apart from making it obvious which version(s) one has downloaded, it's the least amount of work (should work even with -v latest), so even if c) is chosen (because it is the correctest solution), a) would be nice to have as well.

could provide PR if you let me know which way you prefer.