internal/rosa/toybox: migrate to make helper
All checks were successful
Test / Create distribution (push) Successful in 57s
Test / Sandbox (push) Successful in 2m34s
Test / Hakurei (push) Successful in 3m46s
Test / ShareFS (push) Successful in 3m50s
Test / Hpkg (push) Successful in 4m16s
Test / Sandbox (race detector) (push) Successful in 4m59s
Test / Hakurei (race detector) (push) Successful in 5m56s
Test / Flake checks (push) Successful in 1m46s

A previous change caused world rebuild, so it is a good time to do this.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-03-01 10:02:36 +09:00
parent 2a34a269d0
commit 6159c74e96

View File

@@ -7,19 +7,24 @@ func (t Toolchain) newToybox(suffix, script string) pkg.Artifact {
version = "0.8.13"
checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
)
return t.New("toybox-"+version+suffix, TEarly, stage0Concat(t, []pkg.Artifact{},
t.Load(Make),
t.Load(Bash),
t.Load(Gzip),
return t.NewViaMake("toybox"+suffix, version, pkg.NewHTTPGetTar(
nil,
"https://landley.net/toybox/downloads/toybox-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
), &MakeAttr{
Writable: true,
OmitDefaults: true,
InPlace: true,
SkipConfigure: true,
ScriptEarly: `
LDFLAGS="${LDFLAGS} -static"
t.Load(KernelHeaders),
), nil, stage0Concat(t, []string{},
"ROSA_CHECK=make USER=cure tests",
), `
chmod +w /bin/
ln -rs "$(which bash)" /bin/ || true
cd /usr/src/toybox
cd /usr/src/toybox` + suffix + `
chmod +w kconfig tests
rm \
tests/du.test \
@@ -32,21 +37,25 @@ make defconfig
sed -i \
's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
.config
`+script+`
make \
"-j$(nproc)" \
LDFLAGS="${LDFLAGS} -static"
${ROSA_CHECK}
PREFIX=/work/system/bin make install_flat
make "-j$(nproc)"
`,
ScriptConfigured: script,
CheckName: "USER=cure tests",
SkipCheck: t.isStage0(),
ScriptInstall: "PREFIX=/work/system/bin make install_flat",
Script: `
mkdir -p /work/usr/bin
ln -s ../../system/bin/env /work/usr/bin
`, pkg.Path(AbsUsrSrc.Append("toybox"), true, pkg.NewHTTPGetTar(
nil,
"https://landley.net/toybox/downloads/toybox-"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
`,
Flag: TEarly,
},
t.Load(Bash),
t.Load(Gzip),
t.Load(KernelHeaders),
)
}
func init() {
artifactsF[Toybox] = func(t Toolchain) pkg.Artifact {