Browse Source

Use arm64 golang download for aarch64 #72

Bob Mottram 7 years ago
parent
commit
52c9c5abc7
2 changed files with 13 additions and 3 deletions
  1. 4
    1
      src/freedombone-image-customise
  2. 9
    2
      src/freedombone-utils-go

+ 4
- 1
src/freedombone-image-customise View File

@@ -1164,9 +1164,12 @@ function image_setup_utils {
1164 1164
     if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
1165 1165
         GOARCH=amd64
1166 1166
     fi
1167
-    if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then
1167
+    if [[ $ARCHITECTURE == *"arm"* ]]; then
1168 1168
         GOARCH=armv6l
1169 1169
     fi
1170
+    if [[ $ARCHITECTURE == *"aarch"* ]]; then
1171
+        GOARCH=arm64
1172
+    fi
1170 1173
     if [ ! $GOARCH ]; then
1171 1174
         echo $'System architecture was not specified when installing Go'
1172 1175
         exit 6734378

+ 9
- 2
src/freedombone-utils-go View File

@@ -144,16 +144,23 @@ function mesh_upgrade_golang {
144 144
     if [[ $ARCHITECTURE == *"amd64" || $ARCHITECTURE == "x86_64" ]]; then
145 145
         GOARCH=amd64
146 146
     fi
147
-    if [[ $ARCHITECTURE == *"arm"* || $ARCHITECTURE == *"aarch"* ]]; then
147
+    if [[ $ARCHITECTURE == *"arm"* ]]; then
148 148
         GOARCH=armv6l
149 149
     fi
150
+    if [[ $ARCHITECTURE == *"aarch"* ]]; then
151
+        GOARCH=arm64
152
+    fi
150 153
     if [ ! $GOARCH ]; then
151 154
         echo $'No architecture specified'
152 155
         ARCHITECTURE=$(uname -m)
153
-        if [[ $ARCHITECTURE == "arm"* || $ARCHITECTURE == *"aarch"* ]]; then
156
+        if [[ $ARCHITECTURE == "arm"* ]]; then
154 157
             GOARCH=armv6l
155 158
             echo $"Using $GOARCH"
156 159
         fi
160
+        if [[ $ARCHITECTURE == *"aarch"* ]]; then
161
+            GOARCH=arm64
162
+            echo $"Using $GOARCH"
163
+        fi
157 164
         if [[ $ARCHITECTURE == "amd"* || $ARCHITECTURE == "x86_64" ]]; then
158 165
             GOARCH=amd64
159 166
             echo $"Using $GOARCH"