1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
package rosa
import (
"runtime"
"hakurei.app/internal/pkg"
)
func (t Toolchain) newTamaGo() (pkg.Artifact, string) {
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,
))), version
}
func init() {
artifactsM[TamaGo] = Metadata{
f: Toolchain.newTamaGo,
Name: "tamago",
Description: "a Go toolchain extended with support for bare metal execution",
Website: "https://github.com/usbarmory/tamago-go",
}
}
|