diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-30 00:24:14 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-30 00:24:14 +0900 |
| commit | 616ed29edf92fb2d60962058a3e2c545d3b652ea (patch) | |
| tree | 5dcb7ec94e95950d80c94c17443004c3c1b0a458 /internal/rosa/toybox.go | |
| parent | 9d9b7294a4a9e93301bfbbf327e9beb99cfa685b (diff) | |
internal/rosa: early toybox variant
This is a variant of toybox with unfinished tools enabled, for artifacts that will end up in a dependency loop without them.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/toybox.go')
| -rw-r--r-- | internal/rosa/toybox.go | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go index 23c2b01e..8db20b70 100644 --- a/internal/rosa/toybox.go +++ b/internal/rosa/toybox.go @@ -2,12 +2,12 @@ package rosa import "hakurei.app/internal/pkg" -func (t Toolchain) newToybox() pkg.Artifact { +func (t Toolchain) newToybox(suffix, script string) pkg.Artifact { const ( version = "0.8.13" checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI" ) - return t.New("toybox-"+version, 0, stage3Concat(t, []pkg.Artifact{}, + return t.New("toybox-"+version+suffix, TEarly, stage3Concat(t, []pkg.Artifact{}, t.Load(Make), t.Load(Bash), t.Load(Gzip), @@ -30,12 +30,7 @@ make defconfig sed -i \ 's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \ .config -echo ' -CONFIG_EXPR=y -CONFIG_TR=y -CONFIG_AWK=y -CONFIG_DIFF=y -' >> .config +`+script+` make \ "-j$(nproc)" \ LDFLAGS="${LDFLAGS} -static" @@ -51,4 +46,19 @@ ln -s ../../system/bin/env /work/usr/bin pkg.TarGzip, ))) } -func init() { artifactsF[Toybox] = Toolchain.newToybox } +func init() { + artifactsF[Toybox] = func(t Toolchain) pkg.Artifact { + return t.newToybox("", "") + } + + artifactsF[toyboxEarly] = func(t Toolchain) pkg.Artifact { + return t.newToybox("-early", ` +echo ' +CONFIG_EXPR=y +CONFIG_TR=y +CONFIG_AWK=y +CONFIG_DIFF=y +' >> .config +`) + } +} |
