Files
hakurei/internal/rosa/stage0.go
Ophestra 02771b655b internal/rosa/stage0: replace amd64 tarball
This is a non-LTO distribution with the new layer configuration.

Signed-off-by: Ophestra <cat@gensokyo.uk>
2026-05-01 18:57:28 +09:00

56 lines
1.1 KiB
Go

package rosa
import (
"sync"
"hakurei.app/fhs"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newStage0() (pkg.Artifact, string) {
return t.New("rosa-stage0", 0, t.AppendPresets(nil,
Bzip2,
), nil, nil, `
umask 377
tar \
-vjc \
-C /stage0 \
-f /work/stage0-`+triplet()+`.tar.bz2 \
.
`, pkg.Path(fhs.AbsRoot.Append("stage0"), false, t.AppendPresets(nil,
LLVM,
Mksh,
toyboxEarly,
)...)), Unversioned
}
func init() {
artifactsM[Stage0] = Metadata{
f: Toolchain.newStage0,
Name: "rosa-stage0",
Description: "Rosa OS stage0 toolchain tarball for bootstrap",
}
}
var (
// stage0 stores the tarball unpack artifact.
stage0 pkg.Artifact
// stage0Once is for lazy initialisation of stage0.
stage0Once sync.Once
)
// NewStage0 returns a stage0 distribution created from curing [Stage0].
func NewStage0() pkg.Artifact {
stage0Once.Do(func() {
stage0 = newTar(
"https://hakurei.app/seed/20260429/"+
"stage0-"+triplet()+".tar.bz2",
perArch[string]{
"amd64": "ldz-WkSx2wxUK4ndi-tlaaU8ykOowbpGRcBsciAcIDdnX6-QfzQg_se3lsZYuzuK",
}.unwrap(),
pkg.TarBzip2,
)
})
return stage0
}