mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 16:24:27 +01:00
arm64: Initial addition
This commit is contained in:
parent
fac0bbe9ed
commit
a5c84b842f
7
Makefile
7
Makefile
@ -18,6 +18,9 @@ linux-x86:
|
||||
linux-x64:
|
||||
$(DOCKER) build -t $(IMAGE)-linux-x64 linux-x64
|
||||
|
||||
linux-arm64: base linux-arm64/Dockerfile linux-arm64/Toolchain.cmake
|
||||
$(DOCKER) build -t $(IMAGE)-linux-arm64 linux-arm64
|
||||
|
||||
linux-armv5: base linux-armv5/Dockerfile linux-armv5/Toolchain.cmake
|
||||
$(DOCKER) build -t $(IMAGE)-linux-armv5 linux-armv5
|
||||
|
||||
@ -39,6 +42,6 @@ windows-x64: base windows-x64/Dockerfile windows-x64/settings.mk
|
||||
base: Dockerfile
|
||||
$(DOCKER) build -t $(IMAGE)-base .
|
||||
|
||||
all: base android-arm darwin-x64 linux-x86 linux-x64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
all: base android-arm darwin-x64 linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
|
||||
.PHONY: all base android-arm darwin-x64 linux-x86 linux-x64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
.PHONY: all base android-arm darwin-x64 linux-x86 linux-x64 linux-arm64 linux-armv5 linux-armv6 linux-armv7 windows-x86 windows-x64
|
||||
|
@ -122,6 +122,13 @@ thewtex/cross-compiler-android-arm
|
||||
thewtex/cross-compiler-browser-asmjs
|
||||
|browser-asmjs-images| The Emscripten JavaScript cross compiler.
|
||||
|
||||
.. |linux-arm64-images| image:: https://badge.imagelayers.io/thewtex/cross-compiler-linux-arm64:latest.svg
|
||||
:target: https://imagelayers.io/?images=thewtex/cross-compiler-linux-arm64:latest
|
||||
|
||||
thewtex/cross-compiler-linux-arm64
|
||||
|linux-arm64-images| Linux arm64 cross compiler toolchain for legacy devices
|
||||
like the Parrot AR Drone.
|
||||
|
||||
.. |linux-armv5-images| image:: https://badge.imagelayers.io/thewtex/cross-compiler-linux-armv5:latest.svg
|
||||
:target: https://imagelayers.io/?images=thewtex/cross-compiler-linux-armv5:latest
|
||||
|
||||
|
@ -12,6 +12,7 @@ dependencies:
|
||||
- docker pull thewtex/cross-compiler-base
|
||||
- docker pull thewtex/cross-compiler-android-arm
|
||||
- docker pull thewtex/cross-compiler-browser-asmjs
|
||||
- docker pull thewtex/cross-compiler-linux-arm64
|
||||
- docker pull thewtex/cross-compiler-linux-armv5
|
||||
- docker pull thewtex/cross-compiler-linux-armv6
|
||||
- docker pull thewtex/cross-compiler-linux-armv7
|
||||
@ -32,6 +33,9 @@ test:
|
||||
- make browser-asmjs
|
||||
- docker run --rm thewtex/cross-compiler-browser-asmjs > ./dockcross-browser-asmjs && chmod +x ./dockcross-browser-asmjs
|
||||
- ./dockcross-browser-asmjs python test/run.py --emulator /usr/bin/node --exe-suffix ".js"
|
||||
- make linux-arm64
|
||||
- docker run --rm thewtex/cross-compiler-linux-arm64 > ./dockcross-linux-arm64 && chmod +x ./dockcross-linux-arm64
|
||||
- ./dockcross-linux-arm64 python test/run.py --emulator /usr/bin/qemu-arm
|
||||
- make linux-armv5
|
||||
- docker run --rm thewtex/cross-compiler-linux-armv5 > ./dockcross-linux-armv5 && chmod +x ./dockcross-linux-armv5
|
||||
- ./dockcross-linux-armv5 python test/run.py --emulator /usr/bin/qemu-arm
|
||||
@ -68,6 +72,7 @@ deployment:
|
||||
- docker push thewtex/cross-compiler-base
|
||||
- docker push thewtex/cross-compiler-android-arm
|
||||
- docker push thewtex/cross-compiler-browser-asmjs
|
||||
- docker push thewtex/cross-compiler-linux-arm64
|
||||
- docker push thewtex/cross-compiler-linux-armv5
|
||||
- docker push thewtex/cross-compiler-linux-armv6
|
||||
- docker push thewtex/cross-compiler-linux-armv7
|
||||
|
44
linux-arm64/Dockerfile
Normal file
44
linux-arm64/Dockerfile
Normal file
@ -0,0 +1,44 @@
|
||||
FROM thewtex/cross-compiler-base
|
||||
MAINTAINER Matt McCormick "matt.mccormick@kitware.com"
|
||||
|
||||
# Add the cross compiler sources
|
||||
RUN echo "deb http://emdebian.org/tools/debian/ jessie main" >> /etc/apt/sources.list && \
|
||||
dpkg --add-architecture arm64 && \
|
||||
curl http://emdebian.org/tools/debian/emdebian-toolchain-archive.key | apt-key add -
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
crossbuild-essential-arm64 \
|
||||
gfortran-aarch64-linux-gnu \
|
||||
libbz2-dev:arm64 \
|
||||
libexpat1-dev:arm64 \
|
||||
ncurses-dev:arm64 \
|
||||
libssl-dev:arm64
|
||||
|
||||
WORKDIR /usr/src
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y libglib2.0-dev zlib1g-dev libpixman-1-dev && \
|
||||
curl -L http://wiki.qemu-project.org/download/qemu-2.5.0.tar.bz2 | tar xj && \
|
||||
cd qemu-2.5.0 && \
|
||||
./configure --target-list=aarch64-linux-user --prefix=/usr && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd .. && rm -rf qemu-2.5.0
|
||||
|
||||
ENV CROSS_TRIPLE aarch64-linux-gnu
|
||||
ENV CROSS_ROOT /usr/${CROSS_TRIPLE}
|
||||
ENV AS=/usr/bin/${CROSS_TRIPLE}-as \
|
||||
AR=/usr/bin/${CROSS_TRIPLE}-ar \
|
||||
CC=/usr/bin/${CROSS_TRIPLE}-gcc \
|
||||
CPP=/usr/bin/${CROSS_TRIPLE}-cpp \
|
||||
CXX=/usr/bin/${CROSS_TRIPLE}-g++ \
|
||||
LD=/usr/bin/${CROSS_TRIPLE}-ld
|
||||
|
||||
ENV DEFAULT_DOCKCROSS_IMAGE thewtex/cross-compiler-linux-arm64
|
||||
WORKDIR /build
|
||||
|
||||
# Note: Toolchain file support is currently in debian Experimental according to:
|
||||
# https://wiki.debian.org/CrossToolchains#In_jessie_.28Debian_8.29
|
||||
# We can switch to that when it becomes stable.
|
||||
COPY Toolchain.cmake /usr/lib/${CROSS_TRIPLE}/
|
||||
ENV CMAKE_TOOLCHAIN_FILE /usr/lib/${CROSS_TRIPLE}/Toolchain.cmake
|
15
linux-arm64/Toolchain.cmake
Normal file
15
linux-arm64/Toolchain.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_VERSION 1)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
set(cross_triple "aarch64-linux-gnu")
|
||||
|
||||
set(CMAKE_C_COMPILER /usr/bin/${cross_triple}-cc)
|
||||
set(CMAKE_CXX_COMPILER /usr/bin/${cross_triple}-c++)
|
||||
set(CMAKE_Fortran_COMPILER /usr/bin/${cross_triple}-gfortran)
|
||||
|
||||
# Discard path returned by pkg-config and associated with HINTS in module
|
||||
# like FindOpenSSL.
|
||||
set(CMAKE_IGNORE_PATH /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/lib/)
|
||||
|
||||
set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64)
|
Loading…
Reference in New Issue
Block a user