[Buildroot-users] how to force-check hash for extra file?

Arnout Vandecappelle arnout at mind.be
Wed Mar 26 10:32:07 UTC 2025



On 26/03/2025 09:49, David Picard wrote:
> Hi,
> 
> In a home-made package, in addition to a Git repo, I need to download a binary 
> file. I do it with curl in a pre or post download hook.
> 
> I provided a .hash file for the package. Buildroot actually checks the Git 
> tarball hash, but not the other file's. How can I force it ?

  Instead of a hook, just add the URL to LIBFOO_EXTRA_DOWNLOADS. Then it will 
use all of Buildroot's download infrastructure, including BR2_PRIMARY_SITE, 
proxy configuration, caching in the download directory, and checking hashes.

  Note: you need to make sure that the name of the binary in the download 
directory is unique, i.e. if the binary changes, it needs to have a different 
name. If the place where you download it from doesn't do that, you can trick it 
by using a URL as follows:

https://foo.bar/normal/url.bin?br-filename=/binary-v1.2.3.bin

Buildroot splits at the last / to find the filename, so it will be downloaded as 
binary-v1.2.3.bin.

  Regards,
  Arnout



More information about the buildroot-users mailing list