internal/rosa: gen_init_cpio artifact
All checks were successful
Test / Create distribution (push) Successful in 58s
Test / Sandbox (push) Successful in 2m29s
Test / Hakurei (push) Successful in 3m41s
Test / ShareFS (push) Successful in 3m48s
Test / Hpkg (push) Successful in 4m17s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 5m45s
Test / Flake checks (push) Successful in 1m35s

This works much better than hacking around the toybox cpio implementation.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-28 21:19:03 +09:00
parent ad8f799703
commit cefd02e960
2 changed files with 10 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ const (
GMP
GLib
Gawk
GenInitCPIO
Gettext
Git
Go
@@ -187,6 +188,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
"gmp": GMP,
"glib": GLib,
"gawk": Gawk,
"gen_init_cpio": GenInitCPIO,
"gettext": Gettext,
"git": Git,
"go": Go,

View File

@@ -123,3 +123,11 @@ cp -av "$3" "$4"
)
}
func init() { artifactsF[Kernel] = Toolchain.newKernel }
func (t Toolchain) newGenInitCPIO() pkg.Artifact {
return t.New("gen_init_cpio-"+kernelVersion, 0, nil, nil, nil, `
mkdir -p /work/system/bin/
cc -o /work/system/bin/gen_init_cpio /usr/src/linux/usr/gen_init_cpio.c
`, pkg.Path(AbsUsrSrc.Append("linux"), false, kernelSource))
}
func init() { artifactsF[GenInitCPIO] = Toolchain.newGenInitCPIO }