aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2026-01-29 02:00:32 +0900
committerOphestra <cat@gensokyo.uk>2026-01-29 02:00:32 +0900
commit79c0106ea091ac042621874876385a848a287f34 (patch)
tree80e38b711079b1c090b11ad07551b4d3012b1776 /internal
parent536db533de2be6ffca53b7f3ef7ad042699b8e84 (diff)
internal/rosa: replace busybox dash with mksh
Toybox does not provide a shell, mksh fills that gap. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/busybox.go1
-rw-r--r--internal/rosa/gnu.go4
-rw-r--r--internal/rosa/ninja.go1
-rw-r--r--internal/rosa/rosa.go7
4 files changed, 10 insertions, 3 deletions
diff --git a/internal/rosa/busybox.go b/internal/rosa/busybox.go
index f9bd1946..306ef653 100644
--- a/internal/rosa/busybox.go
+++ b/internal/rosa/busybox.go
@@ -338,7 +338,6 @@ cp busybox /system/bin/
mkdir -pv /work/system/bin/
busybox --install -s /work/system/bin/
cp -v busybox /work/system/bin/
-ln -vs ../system/bin/hush /work/bin/sh
mkdir -vp /work/usr/bin/
ln -vs ../../system/bin/busybox /work/usr/bin/env
`, pkg.Path(AbsUsrSrc.Append("busybox"), true, t.NewPatchedSource(
diff --git a/internal/rosa/gnu.go b/internal/rosa/gnu.go
index 09414ebc..0160e636 100644
--- a/internal/rosa/gnu.go
+++ b/internal/rosa/gnu.go
@@ -59,6 +59,7 @@ func (t Toolchain) newAutoconf() pkg.Artifact {
t.Load(Make),
t.Load(M4),
t.Load(Perl),
+ t.Load(Bash),
}, nil, nil, `
cd "$(mktemp -d)"
/usr/src/autoconf/configure \
@@ -205,6 +206,7 @@ func (t Toolchain) newCoreutils() pkg.Artifact {
return t.New("coreutils-"+version, false, []pkg.Artifact{
t.Load(Make),
t.Load(Perl),
+ t.Load(Bash),
t.Load(KernelHeaders),
}, nil, nil, `
@@ -212,6 +214,8 @@ cd /usr/src/coreutils
test_disable() { chmod +w "$2" && echo "$1" > "$2"; }
test_disable '#!/bin/sh' gnulib-tests/test-c32ispunct.sh
+test_disable '#!/bin/sh' tests/split/line-bytes.sh
+test_disable '#!/bin/sh' tests/dd/no-allocate.sh
cd "$(mktemp -d)"
/usr/src/coreutils/configure \
diff --git a/internal/rosa/ninja.go b/internal/rosa/ninja.go
index 27047a52..328faf17 100644
--- a/internal/rosa/ninja.go
+++ b/internal/rosa/ninja.go
@@ -10,6 +10,7 @@ func (t Toolchain) newNinja() pkg.Artifact {
return t.New("ninja-"+version, false, []pkg.Artifact{
t.Load(CMake),
t.Load(Python),
+ t.Load(Bash),
}, nil, nil, `
chmod -R +w /usr/src/ninja/
mkdir -p /work/system/bin/ && cd /work/system/bin/
diff --git a/internal/rosa/rosa.go b/internal/rosa/rosa.go
index f90626a3..9e4adcc4 100644
--- a/internal/rosa/rosa.go
+++ b/internal/rosa/rosa.go
@@ -189,14 +189,16 @@ func (t Toolchain) New(
const lcMessages = "LC_MESSAGES=C.UTF-8"
var (
- path = AbsSystem.Append("bin", "busybox")
- args = []string{"hush", absCureScript.String()}
+ path = AbsSystem.Append("bin", "sh")
+ args = []string{"mksh", absCureScript.String()}
support []pkg.Artifact
)
switch t {
case toolchainBusybox:
name += "-early"
support = slices.Concat([]pkg.Artifact{newBusyboxBin()}, extra)
+ path = AbsSystem.Append("bin", "busybox")
+ args[0] = "hush"
env = fixupEnviron(env, nil, "/system/bin")
case toolchainStage3:
@@ -252,6 +254,7 @@ ln -vs ../usr/bin /work/bin
compilerRT,
runtimes,
clang,
+ boot.Load(Mksh),
boot.Load(Busybox),
})
env = fixupEnviron(env, []string{