internal/rosa: tamago toolchain artifact
All checks were successful
Test / Create distribution (push) Successful in 1m20s
Test / Sandbox (push) Successful in 3m12s
Test / Hakurei (push) Successful in 4m27s
Test / ShareFS (push) Successful in 4m36s
Test / Hpkg (push) Successful in 5m7s
Test / Sandbox (race detector) (push) Successful in 5m29s
Test / Hakurei (race detector) (push) Successful in 6m38s
Test / Flake checks (push) Successful in 1m41s

Currently used by the (wip) bootloader, might not make it into the final OS.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-02-18 18:42:53 +09:00
parent 58801b44d4
commit 149dfbb6af
3 changed files with 45 additions and 0 deletions

40
internal/rosa/tamago.go Normal file
View File

@@ -0,0 +1,40 @@
package rosa
import (
"runtime"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newTamaGo() pkg.Artifact {
const (
version = "1.26.0"
checksum = "5XkfbpTpSdPJfwtTfUegfdu4LUy8nuZ7sCondiRIxTJI9eQONi8z_O_dq9yDkjw8"
)
return t.New("tamago-go"+version, 0, []pkg.Artifact{
t.Load(Bash),
t.Load(Go),
}, nil, []string{
"CC=cc",
"GOCACHE=/tmp/gocache",
}, `
mkdir /work/system # "${TMPDIR}"
cp -r /usr/src/tamago /work/system
cd /work/system/tamago/src
chmod -R +w ..
sed -i \
's,/lib/ld-musl-`+linuxArch()+`.so.1,/system/bin/linker,' \
cmd/link/internal/`+runtime.GOARCH+`/obj.go
rm \
os/root_unix_test.go
./all.bash
`, pkg.Path(AbsUsrSrc.Append("tamago"), false, pkg.NewHTTPGetTar(
nil, "https://github.com/usbarmory/tamago-go/archive/refs/tags/"+
"tamago-go"+version+".tar.gz",
mustDecode(checksum),
pkg.TarGzip,
)))
}
func init() { artifactsF[TamaGo] = Toolchain.newTamaGo }