From: Markus Date: Fri, 2 Apr 2021 20:39:26 +0000 (+0200) Subject: Add support for armv7l SoCs like Raspberry Pi 2 and newer X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=ac30b1856db3d63705270ddf26ff0b7b56c9c9c9;p=safcm%2Fsafcm.git Add support for armv7l SoCs like Raspberry Pi 2 and newer --- diff --git a/cmd/safcm-remote/build.sh b/cmd/safcm-remote/build.sh index 404f48f..4f102c9 100755 --- a/cmd/safcm-remote/build.sh +++ b/cmd/safcm-remote/build.sh @@ -25,10 +25,15 @@ build() { GOOS="$1" GOARCH="$2" go build -o "$dest/$1-$2" } +build_arm() { + GOOS="$1" GOARCH="$2" GOARM="$3" go build -o "$dest/$1-${2}v${3}l" +} + dest=../../remote/helpers mkdir -p "$dest" build linux amd64 +build_arm linux arm 7 # TODO: support more operating systems and architectures diff --git a/rpc/dial.go b/rpc/dial.go index 3609279..b723e55 100644 --- a/rpc/dial.go +++ b/rpc/dial.go @@ -276,6 +276,8 @@ func connGetGoarch(stdin io.Writer, stdout *bufio.Reader) (string, error) { switch x { case "x86_64": goarch = "amd64" + case "armv7l": + goarch = "armv7l" default: return "", fmt.Errorf("unsupported arch %q (`uname -m`)", x) }