Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
a17ecb9f
Commit
a17ecb9f
authored
Jul 11, 2019
by
Cristian Maglie
Committed by
Massimiliano Pippi
Jul 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added arm64 support (#204)
* Added arm64 support Fix #203 * Fixed typo in test
parent
24fe3c61
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
12 deletions
+19
-12
arduino/cores/tools.go
arduino/cores/tools.go
+11
-8
arduino/cores/tools_test.go
arduino/cores/tools_test.go
+8
-4
No files found.
arduino/cores/tools.go
View file @
a17ecb9f
...
...
@@ -24,7 +24,7 @@ import (
"github.com/arduino/arduino-cli/arduino/resources"
"github.com/arduino/go-paths-helper"
properties
"github.com/arduino/go-properties-orderedmap"
"go.bug.st/relaxed-semver"
semver
"go.bug.st/relaxed-semver"
)
// Tool represents a single Tool, part of a Package.
...
...
@@ -141,13 +141,14 @@ func (tr *ToolRelease) RuntimeProperties() *properties.Map {
}
var
(
regexpArmLinux
=
regexp
.
MustCompile
(
"arm.*-linux-gnueabihf"
)
regexpAmd64
=
regexp
.
MustCompile
(
"x86_64-.*linux-gnu"
)
regexpi386
=
regexp
.
MustCompile
(
"i[3456]86-.*linux-gnu"
)
regexpWindows
=
regexp
.
MustCompile
(
"i[3456]86-.*(mingw32|cygwin)"
)
regexpMac64Bit
=
regexp
.
MustCompile
(
"(i[3456]86|x86_64)-apple-darwin.*"
)
regexpmac32Bit
=
regexp
.
MustCompile
(
"i[3456]86-apple-darwin.*"
)
regexpArmBSD
=
regexp
.
MustCompile
(
"arm.*-freebsd[0-9]*"
)
regexpArmLinux
=
regexp
.
MustCompile
(
"arm.*-linux-gnueabihf"
)
regexpArm64Linux
=
regexp
.
MustCompile
(
"(aarch64|arm64)-linux-gnu"
)
regexpAmd64
=
regexp
.
MustCompile
(
"x86_64-.*linux-gnu"
)
regexpi386
=
regexp
.
MustCompile
(
"i[3456]86-.*linux-gnu"
)
regexpWindows
=
regexp
.
MustCompile
(
"i[3456]86-.*(mingw32|cygwin)"
)
regexpMac64Bit
=
regexp
.
MustCompile
(
"(i[3456]86|x86_64)-apple-darwin.*"
)
regexpmac32Bit
=
regexp
.
MustCompile
(
"i[3456]86-apple-darwin.*"
)
regexpArmBSD
=
regexp
.
MustCompile
(
"arm.*-freebsd[0-9]*"
)
)
func
(
f
*
Flavor
)
isCompatibleWithCurrentMachine
()
bool
{
...
...
@@ -162,6 +163,8 @@ func (f *Flavor) isCompatibleWith(osName, osArch string) bool {
switch
osName
+
","
+
osArch
{
case
"linux,arm"
,
"linux,armbe"
:
return
regexpArmLinux
.
MatchString
(
f
.
OS
)
case
"linux,arm64"
:
return
regexpArm64Linux
.
MatchString
(
f
.
OS
)
case
"linux,amd64"
:
return
regexpAmd64
.
MatchString
(
f
.
OS
)
case
"linux,386"
:
...
...
arduino/cores/tools_test.go
View file @
a17ecb9f
...
...
@@ -34,8 +34,9 @@ func TestFlavorCompatibility(t *testing.T) {
linuxamd64
:=
&
os
{
"linux"
,
"amd64"
}
linuxarm
:=
&
os
{
"linux"
,
"arm"
}
linuxarmbe
:=
&
os
{
"linux"
,
"armbe"
}
linuxarm64
:=
&
os
{
"linux"
,
"arm64"
}
darwini386
:=
&
os
{
"darwin"
,
"386"
}
darwinamd64
6
:=
&
os
{
"darwin"
,
"amd64"
}
darwinamd64
:=
&
os
{
"darwin"
,
"amd64"
}
freebsdi386
:=
&
os
{
"freebsd"
,
"386"
}
freebsdamd64
:=
&
os
{
"freebsd"
,
"amd64"
}
oses
:=
[]
*
os
{
...
...
@@ -45,8 +46,9 @@ func TestFlavorCompatibility(t *testing.T) {
linuxamd64
,
linuxarm
,
linuxarmbe
,
linuxarm64
,
darwini386
,
darwinamd64
6
,
darwinamd64
,
freebsdi386
,
freebsdamd64
,
}
...
...
@@ -57,8 +59,8 @@ func TestFlavorCompatibility(t *testing.T) {
}
tests
:=
[]
*
test
{
{
&
Flavor
{
OS
:
"i686-mingw32"
},
[]
*
os
{
windowsi386
,
windowsx8664
}},
{
&
Flavor
{
OS
:
"i386-apple-darwin11"
},
[]
*
os
{
darwini386
,
darwinamd64
6
}},
{
&
Flavor
{
OS
:
"x86_64-apple-darwin"
},
[]
*
os
{
darwinamd64
6
}},
{
&
Flavor
{
OS
:
"i386-apple-darwin11"
},
[]
*
os
{
darwini386
,
darwinamd64
}},
{
&
Flavor
{
OS
:
"x86_64-apple-darwin"
},
[]
*
os
{
darwinamd64
}},
// Raspberry PI, BBB or other ARM based host
// PI: "arm-linux-gnueabihf"
...
...
@@ -74,6 +76,8 @@ func TestFlavorCompatibility(t *testing.T) {
{
&
Flavor
{
OS
:
"i686-pc-linux-gnu"
},
[]
*
os
{
linuxi386
}},
{
&
Flavor
{
OS
:
"x86_64-linux-gnu"
},
[]
*
os
{
linuxamd64
}},
{
&
Flavor
{
OS
:
"x86_64-pc-linux-gnu"
},
[]
*
os
{
linuxamd64
}},
{
&
Flavor
{
OS
:
"aarch64-linux-gnu"
},
[]
*
os
{
linuxarm64
}},
{
&
Flavor
{
OS
:
"arm64-linux-gnu"
},
[]
*
os
{
linuxarm64
}},
}
check
:=
func
(
test
*
test
,
os
*
os
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment