internal/rosa: tamago toolchain artifact
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m39s
Test / Hakurei (push) Successful in 4m1s
Test / ShareFS (push) Successful in 4m1s
Test / Hpkg (push) Successful in 4m36s
Test / Sandbox (race detector) (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 6m12s
Test / Flake checks (push) Successful in 1m37s
All checks were successful
Test / Create distribution (push) Successful in 1m0s
Test / Sandbox (push) Successful in 2m39s
Test / Hakurei (push) Successful in 4m1s
Test / ShareFS (push) Successful in 4m1s
Test / Hpkg (push) Successful in 4m36s
Test / Sandbox (race detector) (push) Successful in 5m4s
Test / Hakurei (race detector) (push) Successful in 6m12s
Test / Flake checks (push) Successful in 1m37s
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:
@@ -74,6 +74,7 @@ const (
|
|||||||
Sed
|
Sed
|
||||||
Setuptools
|
Setuptools
|
||||||
SquashfsTools
|
SquashfsTools
|
||||||
|
TamaGo
|
||||||
Toybox
|
Toybox
|
||||||
toyboxEarly
|
toyboxEarly
|
||||||
Unzip
|
Unzip
|
||||||
@@ -187,6 +188,7 @@ func ResolveName(name string) (p PArtifact, ok bool) {
|
|||||||
"sed": Sed,
|
"sed": Sed,
|
||||||
"setuptools": Setuptools,
|
"setuptools": Setuptools,
|
||||||
"squashfs-tools": SquashfsTools,
|
"squashfs-tools": SquashfsTools,
|
||||||
|
"tamago": TamaGo,
|
||||||
"toybox": Toybox,
|
"toybox": Toybox,
|
||||||
"unzip": Unzip,
|
"unzip": Unzip,
|
||||||
"util-linux": UtilLinux,
|
"util-linux": UtilLinux,
|
||||||
|
|||||||
36
internal/rosa/tamago.go
Normal file
36
internal/rosa/tamago.go
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
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
|
||||||
|
./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 }
|
||||||
Reference in New Issue
Block a user