]> ruderich.org/simon Gitweb - safcm/safcm.git/commitdiff
Add support for armv7l SoCs like Raspberry Pi 2 and newer
authorMarkus <markus+develop@ceotex.de>
Fri, 2 Apr 2021 20:39:26 +0000 (22:39 +0200)
committerSimon Ruderich <simon@ruderich.org>
Sat, 3 Apr 2021 13:36:52 +0000 (15:36 +0200)
cmd/safcm-remote/build.sh
rpc/dial.go

index 404f48faa9ce621dba88341ecd548472fe8f9908..4f102c9ccbc1a66d0fa8dbebc9f1da8f53e0d3ee 100755 (executable)
@@ -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
index 36092793e005e06991a64fe440b97ca74fac6a88..b723e55c5657e78609d79b8019448636c3de5eef 100644 (file)
@@ -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)
        }