-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ARM README #21737
Update ARM README #21737
Changes from 4 commits
f9fdc03
5174fd1
ab60fb2
2566e43
80e9cc0
8e48887
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
# Julia binaries for ARM | ||
# Julia on ARM (Linux) | ||
|
||
[Nightly builds](https://status.julialang.org/download/linux-arm) are | ||
available for ARMv7-A. | ||
|
||
# Hardware requirements | ||
Julia fully supports ARMv8 (AArch64) processors, and supports ARMv7 and ARMv6 | ||
(AArch32) with some caveats. This file provides general guidelines for compilation, | ||
in addition to instructions for specific devices. | ||
|
||
Julia requires at least `armv6` and `vfpv2` instruction sets. It's recommended | ||
to use at least `armv7-a`. `armv5` or soft float are not supported. | ||
A list of [known issues](https://github.com/JuliaLang/julia/labels/arm) for ARM is | ||
available. If you encounter difficulties, please create an issue including the output | ||
from `cat /proc/cpuinfo`. | ||
|
||
# Building Julia on ARM | ||
|
||
Julia has been compiled on several ARMv7 / Cortex A15 Samsung | ||
Chromebooks running Ubuntu Linux under Crouton, Raspberry Pi systems | ||
and Odroid boards. This is a work in progress - several tests are | ||
known to fail, and backtraces are not available. | ||
## Building Julia | ||
|
||
Julia on ARM can be built by simply typing `make`, which will download all | ||
the relevant libraries. This is the *recommended* way, and it will take a | ||
few hours. | ||
Julia has been successfully compiled on several ARMv7 / Cortex A15 Samsung Chromebooks | ||
running Ubuntu Linux under Crouton, a number of Raspberry Pi variants, Odroid boards, | ||
and the nVidia Jetson TX2. | ||
|
||
If you get SIGILL during sysimg.o creation, it is likely that your cpu | ||
does not support VFP. File an issue on the Julia issue tracker with | ||
the contents of /proc/cpuinfo. | ||
In most cases, Julia can be successfully built by following the platform independent | ||
[build instructions](https://github.com/JuliaLang/julia/blob/master/README.md). | ||
|
||
This is the list of known issues on ARM: | ||
[https://github.com/JuliaLang/julia/labels/arm](https://github.com/JuliaLang/julia/labels/arm) | ||
|
||
# Build dependencies | ||
### Build dependencies | ||
|
||
We recommend using at least Ubuntu 14.04 and gcc 4.8, which is part of the | ||
standard `build-essentials`. | ||
|
@@ -45,64 +37,69 @@ override USE_SYSTEM_MPFR=1 | |
override USE_SYSTEM_ARPACK=1 | ||
```` | ||
|
||
The following command will install all the necessary libraries on Ubuntu. | ||
The following command will install all the necessary libraries on Ubuntu: | ||
|
||
```` | ||
sudo apt-get install libblas3gf liblapack3gf libarpack2 libfftw3-dev libgmp3-dev \ | ||
libmpfr-dev libblas-dev liblapack-dev cmake gcc-4.8 \ | ||
g++-4.8 gfortran libgfortran3 m4 libedit-dev | ||
```` | ||
|
||
Note that OpenBLAS only supports ARMv7. For older ARM variants, using the reference BLAS | ||
may be the simplest thing to do. | ||
If you run into issues building LLVM, see [these notes](http://llvm.org/docs/HowToBuildOnARM.html). | ||
|
||
|
||
## 32-bit (ARMv6, ARMv7) | ||
|
||
# ARM specific build problems | ||
Julia requires at least the `armv6` and `vfpv2` instruction sets. It's recommended to use `armv7-a`. | ||
`armv5` or soft float are not supported. | ||
|
||
If you run into issues building LLVM, see these notes: | ||
[http://llvm.org/docs/HowToBuildOnARM.html](http://llvm.org/docs/HowToBuildOnARM.html) | ||
### Binaries | ||
|
||
## Raspberry Pi 1 / Raspberry Pi Zero | ||
[Nightly builds](https://status.julialang.org/download/linux-arm) are | ||
available for ARMv7-A. | ||
|
||
### Device specific instructions | ||
|
||
Note: These chips use ARMv6, which is not well supported at the moment. However it is | ||
possible to get a working Julia build. | ||
#### Raspberry Pi 1 / Raspberry Pi Zero | ||
|
||
The Raspberry Pi ARM CPU type is not detected by LLVM. Before starting the | ||
build, it is recommended to explicitly set the CPU target by adding the | ||
following to `Make.user`: | ||
The type of ARM CPU used in the Raspberry Pi is not detected by LLVM. Explicitly set the | ||
CPU target by adding the following to `Make.user`: | ||
|
||
```` | ||
JULIA_CPU_TARGET=arm1176jzf-s | ||
```` | ||
|
||
It is also preferable to use various system provided dependencies on | ||
ARMv6 as described in [Build Dependencies](#build-dependencies). | ||
It is preferable to use various system provided dependencies on ARMv6 as described in | ||
[Build Dependencies](#build-dependencies). | ||
|
||
You may need to increase the swap file size: edit the `/etc/dphys-swapfile`, changing the line | ||
To complete the build, you may need to increase the swap file size. To do so, edit | ||
`/etc/dphys-swapfile`, changing the line: | ||
|
||
CONF_SWAPSIZE=100 | ||
|
||
to | ||
to: | ||
|
||
CONF_SWAPSIZE=512 | ||
|
||
Then restart the swapfile service: | ||
before restarting the swapfile service: | ||
|
||
sudo /etc/init.d/dphys-swapfile stop | ||
sudo /etc/init.d/dphys-swapfile start | ||
|
||
## Raspberry Pi 2 | ||
#### Raspberry Pi 2 | ||
|
||
For Raspberry Pi 2, which is ARMv7, the default build should work. However, the | ||
CPU type is also not detected by LLVM. Fix this by adding | ||
`JULIA_CPU_TARGET=cortex-a7` to `Make.user`. | ||
The type of ARM CPU used in the Raspberry Pi 2 is not detected by LLVM. Explicitly set the | ||
CPU target by adding the following to `Make.user`: | ||
|
||
```JULIA_CPU_TARGET=cortex-a7``` | ||
|
||
Depending on the exact compiler and distribution, there might be a build failure | ||
due to unsupported inline assembly. In that case, add `MARCH=armv7-a` to | ||
`Make.user`. | ||
|
||
If building LLVM fails, you can download binaries from the LLVM website: | ||
|
||
1. Download the [LLVM 3.7.0 binaries for ARMv7a] (http://llvm.org/releases/3.7.0/clang+llvm-3.7.0-armv7a-linux-gnueabihf.tar.xz) and extract them in a local directory. | ||
1. Download the [LLVM 3.9.0 binaries for ARMv7a] (http://llvm.org/releases/3.9.0/clang+llvm-3.9.0-armv7a-linux-gnueabihf.tar.xz) and extract them in a local directory. | ||
2. Add the following to `Make.user` (adjusting the path to the `llvm-config` binary): | ||
|
||
``` | ||
|
@@ -112,9 +109,9 @@ If building LLVM fails, you can download binaries from the LLVM website: | |
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (A few lines up) I think we want LLVM 3.9.0 now. |
||
Please do let us know if you had to download a pre-built LLVM in [#10235](https://github.com/JuliaLang/julia/issues/10235). | ||
|
||
## Chromebook | ||
#### Chromebook | ||
|
||
On Chromebooks, you have to first install Crouton. If you do not have | ||
On Chromebooks, you have to first install Crouton. If you do not have | ||
an Ubuntu chroot running on your Chromebook using Crouton, you can do | ||
so by following these tutorials. | ||
|
||
|
@@ -125,47 +122,35 @@ These tutorials will end up installing Ubuntu 12.04, and you have to | |
upgrade to Ubuntu 14.04, or install Ubuntu 14.04 from scratch by | ||
finding appropriate `crouton` help. | ||
|
||
## Scaleway cloud hosted ARM servers | ||
#### Scaleway cloud hosted ARM servers | ||
|
||
On the current [Scaleway](http://scaleway.com) ARM servers, the Julia | ||
build works out of the box. | ||
|
||
## nVidia Jetson TX2 | ||
|
||
Julia builds and runs on the [nVidia Jetson TX2](http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html) platform with minimal configuration changes. A full multi-threaded build, including LLVM, will complete in around two hours. All tests pass and CUDA functionality is available through, e.g., [CUDAdrv](https://github.com/JuliaGPU/CUDAdrv.jl). | ||
|
||
Starting from the default configuration flashed by [Jetpack 3.0](https://developer.nvidia.com/embedded/jetpack): | ||
## AArch64 (ARMv8) | ||
|
||
``` | ||
sudo apt-get install libssl-dev | ||
``` | ||
|
||
### Julia 0.5.1 | ||
|
||
The easiest method to build Julia 0.5.1 is to use system provided versions of BLAS and LAPACK: | ||
|
||
``` | ||
sudo apt-get install libopenblas-dev liblapack-dev | ||
``` | ||
|
||
Configure Make.user as follows: | ||
Configure `Make.user` as follows: | ||
|
||
``` | ||
MARCH=armv8-a | ||
JULIA_CPU_TARGET=cortex-a57 | ||
override USE_SYSTEM_BLAS=1 | ||
override USE_SYSTEM_LAPACK=1 | ||
``` | ||
|
||
Note that package manager functions fail with an error regarding SSL certificates. This can be overcome by following the instructions in [this comment](https://github.com/JuliaLang/julia/issues/13399#issuecomment-182018321). | ||
### Device specific instructions | ||
|
||
#### nVidia Jetson TX2 | ||
|
||
### Julia 0.6 beta | ||
Julia builds and runs on the [nVidia Jetson TX2](http://www.nvidia.com/object/embedded-systems-dev-kits-modules.html) | ||
platform with minimal configuration changes. | ||
|
||
Configure Make.user as follows: | ||
After configuring `Make.user` as per the `AArch64` instructions in this document, | ||
follow the general [build instructions](https://github.com/JuliaLang/julia/blob/master/README.md). | ||
The majority of the build dependencies specified in the instructions are installed by | ||
the default configuration flashed by [Jetpack 3.0](https://developer.nvidia.com/embedded/jetpack). The remaining tools can be installed by issuing the following command: | ||
|
||
``` | ||
MARCH=armv8-a | ||
JULIA_CPU_TARGET=cortex-a57 | ||
sudo apt-get install gfortran wget cmake | ||
``` | ||
|
||
No further changes are required. | ||
A full multi-threaded build, including LLVM, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably more accurate to be called parallel build. It's not multi-threaded.... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed. Fixed. |
||
will complete in around two hours. All tests pass and CUDA functionality is available | ||
through, e.g., [CUDAdrv](https://github.com/JuliaGPU/CUDAdrv.jl). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be included here (since not everyone has access to these system) but the aarch64 systems I've tested include Jetson TX1 (the first successful build), X-Gene1, Overdrive 3000 (buildbot), Cavium ThunderX (from packet.net).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you like me to split the tested platforms between the AArch32/64 sections and add the platforms you've tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That could be better I guess though not mandatory.