internal/rosa: gen_init_cpio artifact

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

@@ -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 }