aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/rosa/toybox.go
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-05-21 18:08:00 +0900
committerOphestra <cat@gensokyo.uk>2026-05-21 18:10:02 +0900
commitaf4c3bbff2d4ef012db945963680f8f764e592ae (patch)
tree2ac36029a7f9ae35fde6177ca8b089f9d0047e42 /internal/rosa/toybox.go
parent54aae9d72a12ae8af93ba35d00a3817e3105dcce (diff)
internal/rosa/package: migrate toybox
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/toybox.go')
-rw-r--r--internal/rosa/toybox.go92
1 files changed, 0 insertions, 92 deletions
diff --git a/internal/rosa/toybox.go b/internal/rosa/toybox.go
deleted file mode 100644
index 7ced9c32..00000000
--- a/internal/rosa/toybox.go
+++ /dev/null
@@ -1,92 +0,0 @@
-package rosa
-
-import "hakurei.app/internal/pkg"
-
-var (
- gzip = H("gzip")
-
- toyboxEarly = H("toybox-early")
-)
-
-func (t Toolchain) newToybox(suffix, script string) (pkg.Artifact, string) {
- const (
- version = "0.8.13"
- checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
- )
- return t.NewPackage("toybox"+suffix, version, newTar(
- "https://landley.net/toybox/downloads/toybox-"+version+".tar.gz",
- checksum,
- pkg.TarGzip,
- ), &PackageAttr{
- // uses source tree as scratch space
- Writable: true,
- EnterSource: true,
-
- Flag: TEarly,
- }, &MakeHelper{
- OmitDefaults: true,
- InPlace: true,
- SkipConfigure: true,
-
- ScriptMakeEarly: `
-LDFLAGS="${LDFLAGS:-''} -static"
-
-chmod +w /bin/
-ln -rs "$(which bash)" /bin/ || true
-
-chmod +w kconfig tests
-rm \
- tests/du.test \
- tests/sed.test \
- tests/tar.test \
- tests/ls.test \
- tests/taskset.test
-
-make defconfig
-sed -i \
- 's/^CONFIG_TOYBOX_ZHELP=y$/CONFIG_TOYBOX_ZHELP=0/' \
- .config
-` + script,
- SkipCheck: t.stage.isStage0(),
- Check: []string{
- "USER=cure",
- "tests",
- },
- Install: "PREFIX=/work/system/bin make install_flat",
- Script: `
-mkdir -p /work/usr/bin
-ln -s ../../system/bin/env /work/usr/bin
-`,
- },
- _bash,
- gzip,
-
- _kernelHeaders,
- ), version
-}
-func init() {
- native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
- return t.newToybox("", "")
- }, &Metadata{
- Name: "toybox",
- Description: "many common Linux command line utilities",
- Website: "https://landley.net/toybox/",
-
- ID: 13818,
- })
-
- native.mustRegister(func(t Toolchain) (pkg.Artifact, string) {
- return t.newToybox("-early", `
-echo '
-CONFIG_EXPR=y
-CONFIG_TR=y
-CONFIG_AWK=y
-CONFIG_DIFF=y
-' >> .config
-`)
- }, &Metadata{
- Name: "toybox-early",
- Description: "a build of toybox with unfinished tools enabled to break dependency loops",
- Website: "https://landley.net/toybox/",
- })
-}