From ac30b1856db3d63705270ddf26ff0b7b56c9c9c9 Mon Sep 17 00:00:00 2001 From: Markus Date: Fri, 2 Apr 2021 22:39:26 +0200 Subject: [PATCH] Add support for armv7l SoCs like Raspberry Pi 2 and newer --- cmd/safcm-remote/build.sh | 5 +++++ rpc/dial.go | 2 ++ 2 files changed, 7 insertions(+) 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) } -- 2.44.1