internal/rosa/package: migrate firmware
All checks were successful
Test / Create distribution (push) Successful in 1m5s
Test / Sandbox (push) Successful in 2m47s
Test / ShareFS (push) Successful in 3m46s
Test / Hakurei (push) Successful in 3m50s
Test / Sandbox (race detector) (push) Successful in 5m23s
Test / Hakurei (race detector) (push) Successful in 6m29s
Test / Flake checks (push) Successful in 1m22s

This does not depend on the kernel.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-05-19 21:46:18 +09:00
parent 962b02cf25
commit d6be116ff8
2 changed files with 47 additions and 51 deletions

View File

@@ -1,51 +0,0 @@
package rosa
import "hakurei.app/internal/pkg"
func (t Toolchain) newFirmware() (pkg.Artifact, string) {
const (
version = "20260410"
checksum = "J8PdQlGqwrivpskPzbL6xacqR6mlKtXpe5RpzFfVzKPAgG81ZRXsc3qrxwdGJbil"
)
return t.NewPackage("firmware", version, newFromGitLab(
"gitlab.com",
"kernel-firmware/linux-firmware",
version,
checksum,
), &PackageAttr{
// dedup creates temporary file
Writable: true,
// does not use configure
EnterSource: true,
Env: []string{
"HOME=/proc/nonexistent",
},
}, &MakeHelper{
OmitDefaults: true,
SkipConfigure: true,
InPlace: true,
Make: []string{
"DESTDIR=/work/system",
"install-zst",
},
SkipCheck: true, // requires pre-commit
Install: "make " + jobsFlagE + " DESTDIR=/work/system dedup",
},
Parallel,
Rdfind,
Zstd,
Findutils,
Coreutils,
), version
}
func init() {
native.mustRegister(Toolchain.newFirmware, &Metadata{
Name: "firmware",
Description: "firmware blobs for use with the Linux kernel",
Website: "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/",
ID: 141464,
})
}

View File

@@ -0,0 +1,47 @@
package firmware {
description = "firmware blobs for use with the Linux kernel";
website = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git";
anitya = 141464;
version* = "20260410";
source = remoteGitLab {
domain = "gitlab.com";
suffix = "kernel-firmware/linux-firmware";
ref = version;
checksum = "J8PdQlGqwrivpskPzbL6xacqR6mlKtXpe5RpzFfVzKPAgG81ZRXsc3qrxwdGJbil";
};
// dedup creates temporary file
writable = true;
// does not use configure
enterSource = true;
env = [
"HOME=/proc/nonexistent",
];
exec = make {
omitDefaults = true;
skipConfigure = true;
inPlace = true;
make = [
"DESTDIR=/work/system",
"install-zst",
];
// requires pre-commit
skipCheck = true;
install = "make " + jobsFlagE + " DESTDIR=/work/system dedup";
};
inputs = [
parallel,
rdfind,
zstd,
findutils,
coreutils,
];
}