Commit Graph

13 Commits

Author SHA1 Message Date
Jonathon Hall
d6ef65c578
bin/fetch_source_archive.sh: Add storage.puri.st mirror
storage.puri.st is an alternate host name for storage.puri.sm, in case
there is another issue with the .sm name registration.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-09-26 08:59:01 -04:00
Jonathon Hall
9c898a7b67
bin/seed_package_mirror.sh: Script to seed a package mirror
Run this to download all the needed package artifacts for a mirror.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-08-30 13:50:01 -04:00
Jonathon Hall
c7f652bf89
Makefile: Use relative paths in configs generated from templates
Use relative paths in configs generated from templates, so the final
build doesn't depend on the absolute location of the repository.  The
coreboot config is part of the final ROM.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
2024-05-09 19:44:10 -04:00
Manuel Mendez
d396236a83
Remove hard coded paths in shebang lines
Remove hard coded paths from shebangs and other references because they
do not play well in nix-land. Either use /usr/bin/env to do runtime PATH
based lookup or avoid absolute paths so PATH look up happens instead.

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
2024-05-02 13:00:22 -04:00
Jonathon Hall
ff1d606be6
bin/fetch_coreboot_crossgcc_archive.sh: ln -s again if link exists
Changes in things like modules/coreboot will check the coreboot
toolchain archives again.  We reuse the cached archive already, but the
final ln -s may fail if the link already exists.  Remove it first and
link again.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-01-10 13:26:55 -05:00
Jonathon Hall
93ccf25d24
bin/fetch_coreboot_crossgcc_archive.sh: Symlink archives into coreboot
Symlink the source archives into coreboot's crossgcc build rather than
copying them.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-01-09 10:03:51 -05:00
Jonathon Hall
f632897bb5
modules/coreboot: Cache coreboot toolchain archives and use mirrors
Download coreboot toolchain archives into packages/<arch> before
coreboot tries to download them.  This allows us to use mirrors to get
the archives.  We could also update the primary source this way if it
goes down instead of patching coreboot itself (has happened for IASL).

The archive versions and digests are retrieved from the coreboot
module, so there isn't another copy of that info to maintain.  That is
done in bin/fetch_coreboot_crossgcc_archive.sh, which uses the
existing fetch script to do the actual download, leveraging mirrors.

bin/fetch_source_archive.sh supports using a SHA-1 digest instead of
SHA-256, since coreboot has SHA-1 digests.  It also checks if the file
already exists (deleting the coreboot directory will cause it to be
re-run, but the packages are already there and can be used from cache).

The coreboot-4.11 IASL patch is updated to delete the outdated acpica
archive digest (it already added the new one, but the old one was still
there).  bin/fetch_coreboot_crossgcc_archive.sh finds the archive
version and digest from the digest files, so only one acpica file must
be present.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-01-08 15:10:56 -05:00
Jonathon Hall
29203782f6
bin/fetch_source_archive.sh: Use Heads package names when they differ
Use the Heads name for a package when it differs from the primary
source.  E.g. musl-cross-make's archive is just <hash>.tar.gz, which
makes little sense out of context.  musl-cross-<hash>.tar.gz makes
more sense for a mirror.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-01-05 13:17:01 -05:00
Jonathon Hall
3a93b30d5b
Makefile: Support mirrors for dependency source packages
Try to download dependency source packages from mirrors if the primary
source fails or the archive has changed.

Move the download and verify logic to bin/fetch_source_archive.sh.  The
mirror list is here, currently only
https://storage.puri.sm/heads-packages/, but others can be added.  The
mirror list is randomized to load each mirror equally.

The verify logic is moved to this script too so it can fail over to a
mirror (or another mirror) if a mismatched archive is served, not just
for a failure.  Makefile no longer needs to verify separately and there
are no separate .*-_verify files any more, the archive is only moved to
its final place once verified.

Add `packages` target to just fetch all needed packages for a board,
facilitates seeding a mirror.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2024-01-05 12:49:36 -05:00
Jonathon Hall
2d188e493d
build: Allow injecting GPG key at build time
flashrom doesn't work in qemu, so the firmware isn't able to update its
keyring.  Adding an already-provisioned key ahead of time works though.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
2022-08-24 13:04:06 -04:00
Trammell hudson
ac537d0300
clean all cpio files and ensure that they are all padded 2018-03-15 11:46:42 -04:00
Trammell hudson
16d13e61de
rename initrd.cpio to inird-$(BOARD).cpio), remove old tools 2018-02-02 16:26:26 -05:00
Trammell hudson
07f7653999
move tools into bin/ directory 2018-01-19 14:17:26 -05:00