All checks were successful
Test / Create distribution (push) Successful in 1m1s
Test / Sandbox (push) Successful in 2m39s
Test / Hakurei (push) Successful in 4m5s
Test / ShareFS (push) Successful in 4m8s
Test / Hpkg (push) Successful in 4m37s
Test / Sandbox (race detector) (push) Successful in 5m2s
Test / Hakurei (race detector) (push) Successful in 6m19s
Test / Flake checks (push) Successful in 1m45s
This is somewhat cheaper than the implementation with extra artifact and is more friendly to the make helper. Signed-off-by: Ophestra <cat@gensokyo.uk>
44 lines
1.2 KiB
Go
44 lines
1.2 KiB
Go
package rosa
|
|
|
|
import "hakurei.app/internal/pkg"
|
|
|
|
const kernelVersion = "6.12.73"
|
|
|
|
var kernelSource = pkg.NewHTTPGetTar(
|
|
nil, "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/"+
|
|
"snapshot/linux-"+kernelVersion+".tar.gz",
|
|
mustDecode("29oUBJKF1ULIv1-XQLpEUUc3LgjUSmyvOSskG37MYUcBlBjMk7RcbCTLrD7UfSM6"),
|
|
pkg.TarGzip,
|
|
)
|
|
|
|
func (t Toolchain) newKernelSource() pkg.Artifact {
|
|
return t.New("kernel-"+kernelVersion+"-src", 0, nil, nil, nil, `
|
|
mkdir -p /work/usr/src/
|
|
cp -r /usr/src/linux /work/usr/src/
|
|
chmod -R +w /work/usr/src/linux/
|
|
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource))
|
|
}
|
|
func init() { artifactsF[KernelSource] = Toolchain.newKernelSource }
|
|
|
|
func (t Toolchain) newKernelHeaders() pkg.Artifact {
|
|
return t.NewViaMake("kernel-headers", kernelVersion, kernelSource, &MakeAttr{
|
|
SkipConfigure: true,
|
|
|
|
SkipCheck: true,
|
|
Make: []string{
|
|
"-f /usr/src/kernel-headers/Makefile",
|
|
"O=/tmp/kbuild",
|
|
"LLVM=1",
|
|
`HOSTLDFLAGS="${LDFLAGS}"`,
|
|
"INSTALL_HDR_PATH=/work/system",
|
|
"headers_install",
|
|
},
|
|
ScriptInstall: "\n",
|
|
|
|
Flag: TEarly,
|
|
},
|
|
t.Load(Rsync),
|
|
)
|
|
}
|
|
func init() { artifactsF[KernelHeaders] = Toolchain.newKernelHeaders }
|