All checks were successful
Test / Create distribution (push) Successful in 59s
Test / Sandbox (push) Successful in 2m42s
Test / ShareFS (push) Successful in 3m59s
Test / Hpkg (push) Successful in 4m32s
Test / Sandbox (race detector) (push) Successful in 5m0s
Test / Hakurei (race detector) (push) Successful in 5m52s
Test / Hakurei (push) Successful in 2m46s
Test / Flake checks (push) Successful in 1m54s
This compiles surprisingly quickly and required no workarounds, unlike busybox. Signed-off-by: Ophestra <cat@gensokyo.uk>
54 lines
1.1 KiB
Go
54 lines
1.1 KiB
Go
package rosa
|
|
|
|
import "hakurei.app/internal/pkg"
|
|
|
|
func (t Toolchain) newToybox() pkg.Artifact {
|
|
const (
|
|
version = "0.8.13"
|
|
checksum = "rZ1V1ATDte2WeQZanxLVoiRGdfPXhMlEo5-exX-e-ml8cGn9qOv0ABEUVZpX3wTI"
|
|
)
|
|
return t.New("toybox-"+version, false, stage3Concat(t, []pkg.Artifact{},
|
|
t.Load(Make),
|
|
t.Load(Bash),
|
|
|
|
t.Load(KernelHeaders),
|
|
), nil, stage3Concat(t, []string{},
|
|
"ROSA_CHECK=make USER=cure tests",
|
|
), `
|
|
ln -s ../system/bin/bash /bin/ || true
|
|
cd /usr/src/toybox
|
|
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
|
|
echo '
|
|
CONFIG_EXPR=y
|
|
CONFIG_TR=y
|
|
CONFIG_AWK=y
|
|
CONFIG_DIFF=y
|
|
' >> .config
|
|
make \
|
|
"-j$(nproc)" \
|
|
LDFLAGS="${LDFLAGS} -static"
|
|
${ROSA_CHECK}
|
|
PREFIX=/work/system/bin make install_flat
|
|
|
|
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,
|
|
)))
|
|
}
|
|
func init() { artifactsF[Toybox] = Toolchain.newToybox }
|