diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-03-01 23:54:40 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-03-02 01:24:50 +0900 |
| commit | cc60e0d15d79916a69c8a1caeb3c4611351bb6c4 (patch) | |
| tree | 67f4f59ed7ba7b18af51338e56ffa8d9acf52da6 /internal/rosa/toybox.go | |
| parent | 9deaf853f0676ee4475468bffd35aae7e1160a74 (diff) | |
internal/rosa/make: migrate to helper interface
This also updates all affected artifacts to use new behaviour.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/toybox.go')
| -rw-r--r-- | internal/rosa/toybox.go | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go index 329ad736..813cd5d5 100644 --- a/internal/rosa/toybox.go +++ b/internal/rosa/toybox.go @@ -7,24 +7,27 @@ func (t Toolchain) newToybox(suffix, script string) pkg.Artifact { version = "0.8.13" checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI" ) - return t.NewViaMake("toybox"+suffix, version, pkg.NewHTTPGetTar( - nil, - "https://landley.net/toybox/downloads/toybox-"+version+".tar.gz", + return t.NewPackage("toybox"+suffix, version, pkg.NewHTTPGetTar( + nil, "https://landley.net/toybox/downloads/toybox-"+version+".tar.gz", mustDecode(checksum), pkg.TarGzip, - ), &MakeAttr{ - Writable: true, + ), &PackageAttr{ + // uses source tree as scratch space + Writable: true, + EnterSource: true, + + Flag: TEarly, + }, &MakeHelper{ OmitDefaults: true, InPlace: true, SkipConfigure: true, - ScriptEarly: ` + ScriptMakeEarly: ` LDFLAGS="${LDFLAGS:-''} -static" chmod +w /bin/ ln -rs "$(which bash)" /bin/ || true -cd /usr/src/toybox` + suffix + ` chmod +w kconfig tests rm \ tests/du.test \ @@ -37,25 +40,22 @@ make defconfig sed -i \ 's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \ .config -`, - ScriptConfigured: script, - SkipCheck: t.isStage0(), +` + script, + SkipCheck: t.isStage0(), Check: []string{ "USER=cure", "tests", }, - ScriptInstall: "PREFIX=/work/system/bin make install_flat", + Install: "PREFIX=/work/system/bin make install_flat", Script: ` mkdir -p /work/usr/bin ln -s ../../system/bin/env /work/usr/bin `, - - Flag: TEarly, }, - t.Load(Bash), - t.Load(Gzip), + Bash, + Gzip, - t.Load(KernelHeaders), + KernelHeaders, ) } func init() { |
