diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-02-28 21:19:03 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-02-28 21:19:03 +0900 |
| commit | cefd02e960fa80e4cfba1050148c61cad3f95bd2 (patch) | |
| tree | a3aef671495afff1622b0d9a9bda45db27653f7d | |
| parent | ad8f799703a4bf8d87741890ba831856af2dd145 (diff) | |
internal/rosa: gen_init_cpio artifact
This works much better than hacking around the toybox cpio implementation.
Signed-off-by: Ophestra <cat@gensokyo.uk>
| -rw-r--r-- | internal/rosa/all.go | 2 | ||||
| -rw-r--r-- | internal/rosa/kernel.go | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/internal/rosa/all.go b/internal/rosa/all.go index 2634a5dc..a56652e4 100644 --- a/internal/rosa/all.go +++ b/internal/rosa/all.go @@ -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, diff --git a/internal/rosa/kernel.go b/internal/rosa/kernel.go index 5dd00b94..bd3a1446 100644 --- a/internal/rosa/kernel.go +++ b/internal/rosa/kernel.go @@ -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 } |
