From 363ea4796e4393edfe6a5303a8f71ab2038c12a3 Mon Sep 17 00:00:00 2001 From: Bensuperpc Date: Sat, 15 May 2021 10:26:51 +0200 Subject: [PATCH] Add full image option --- Makefile | 32 +++++++++++++++++++++++---- linux-armv6-rpi1.full/Dockerfile.in | 10 +++++++++ linux-armv6-rpi1.full/Toolchain.cmake | 20 +++++++++++++++++ linux-armv6-rpi1/Dockerfile.in | 5 ----- linux-armv7-rpi2.full/Dockerfile.in | 13 +++++++++++ linux-armv7-rpi2.full/Toolchain.cmake | 20 +++++++++++++++++ linux-armv7-rpi2/Dockerfile.in | 5 ----- linux-armv7.full/Dockerfile.in | 12 ++++++++++ linux-armv7.full/Toolchain.cmake | 20 +++++++++++++++++ linux-armv7/Dockerfile.in | 5 ----- linux-armv7a.full/Dockerfile.in | 12 ++++++++++ linux-armv7a.full/README.rst | 11 +++++++++ linux-armv7a.full/Toolchain.cmake | 21 ++++++++++++++++++ linux-armv7a/Dockerfile.in | 5 ----- linux-armv8-rpi3.full/Dockerfile.in | 12 ++++++++++ linux-armv8-rpi3.full/Toolchain.cmake | 20 +++++++++++++++++ linux-armv8-rpi4.full/Dockerfile.in | 12 ++++++++++ linux-armv8-rpi4.full/Toolchain.cmake | 20 +++++++++++++++++ linux-armv8-rpi4/Dockerfile.in | 2 -- 19 files changed, 231 insertions(+), 26 deletions(-) create mode 100644 linux-armv6-rpi1.full/Dockerfile.in create mode 100644 linux-armv6-rpi1.full/Toolchain.cmake create mode 100644 linux-armv7-rpi2.full/Dockerfile.in create mode 100644 linux-armv7-rpi2.full/Toolchain.cmake create mode 100644 linux-armv7.full/Dockerfile.in create mode 100644 linux-armv7.full/Toolchain.cmake create mode 100644 linux-armv7a.full/Dockerfile.in create mode 100644 linux-armv7a.full/README.rst create mode 100644 linux-armv7a.full/Toolchain.cmake create mode 100644 linux-armv8-rpi3.full/Dockerfile.in create mode 100644 linux-armv8-rpi3.full/Toolchain.cmake create mode 100644 linux-armv8-rpi4.full/Dockerfile.in create mode 100644 linux-armv8-rpi4.full/Toolchain.cmake diff --git a/Makefile b/Makefile index fb95759..c6fe4eb 100644 --- a/Makefile +++ b/Makefile @@ -13,11 +13,15 @@ ORG = bensuperpc BIN = ./bin # These images are built using the "build implicit rule" +# EXTEND_STANDARD_IMAGES = linux-armv8-rpi4-all linux-armv8-rpi3-all + STANDARD_IMAGES = avr linux-s390x android-arm android-arm64 android-x86 android-x86_64 linux-x86 linux-x64 linux-x64-clang linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-armv5 linux-m68k linux-armv5-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7 linux-armv7a linux-armv7-rpi2 linux-armv7l-musl linux-mips linux-mips64 linux-mips64el-n64 linux-mipsel linux-ppc32 linux-ppc64 linux-riscv64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix # Generated Dockerfiles. GEN_IMAGES = avr linux-s390x android-arm android-arm64 linux-x86 linux-x64 linux-x64-clang linux-mips linux-mips64 linux-mipsel manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 linux-m68k web-wasm linux-armv8 linux-armv8-musl linux-armv8-rpi3 linux-armv8-rpi4 linux-ppc32 linux-ppc64 windows-static-x86 windows-static-x64 windows-static-x64-posix windows-shared-x86 windows-shared-x64 windows-shared-x64-posix linux-mips64el-n64 linux-armv7 linux-armv7a linux-armv7l-musl linux-armv6-rpi1 linux-armv6-musl linux-armv6-rpi-old linux-armv7-rpi2 linux-armv5 linux-armv5-musl linux-riscv64 -GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) +EXT_GEN_IMAGES = linux-armv8-rpi4.full linux-armv8-rpi3.full linux-armv7-rpi2.full linux-armv7.full linux-armv7a.full linux-armv6-rpi1.full + +GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(EXT_GEN_IMAGES)) $(addsuffix /Dockerfile,$(GEN_IMAGES)) # These images are expected to have explicit rules for *both* build and testing NON_STANDARD_IMAGES = web-wasm manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 @@ -25,7 +29,7 @@ NON_STANDARD_IMAGES = web-wasm manylinux2014-x64 manylinux2014-x86 manylinux2014 DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross common.lib common.label-and-env # This list all available images -IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) +IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) $(EXTEND_IMAGES) # Optional arguments for test runner (test/run.py) associated with "testing implicit rule" linux-ppc64.test_ARGS = --languages C @@ -229,12 +233,32 @@ $(addsuffix .test,$(STANDARD_IMAGES)): $$(basename $$@) $(DOCKER) run $(RM) bensuperpc/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@) $(BIN)/dockcross-$(basename $@) python3 test/run.py $($@_ARGS) +.SECONDEXPANSION: +$(addsuffix .full,$(STANDARD_IMAGES)): %: %/Dockerfile $$(basename $$@) + mkdir -p $@/imagefiles && cp -r imagefiles $@/ + $(DOCKER) build -t $(ORG)/$@:latest \ + --build-arg IMAGE=$(ORG)/$@ \ + --build-arg DOCKER_IMAGE=$(ORG)/$(patsubst %.full,%,$@):latest \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + $@ + $(DOCKER) build -t $(ORG)/$@:$(TAG) \ + --build-arg IMAGE=$(ORG)/$@ \ + --build-arg DOCKER_IMAGE=$(ORG)/$(patsubst %.full,%,$@):latest \ + --build-arg VERSION=$(TAG) \ + --build-arg VCS_REF=`git rev-parse --short HEAD` \ + --build-arg VCS_URL=`git config --get remote.origin.url` \ + --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ + $@ + rm -rf $@/imagefiles + # # testing prerequisites implicit rule # test.prerequisites: mkdir -p $(BIN) -$(addsuffix .test,base $(IMAGES)): test.prerequisites +$(addsuffix .test,base,.full $(IMAGES)): test.prerequisites -.PHONY: base images $(IMAGES) test %.test +.PHONY: base images $(IMAGES) test %.test %.full diff --git a/linux-armv6-rpi1.full/Dockerfile.in b/linux-armv6-rpi1.full/Dockerfile.in new file mode 100644 index 0000000..59168a5 --- /dev/null +++ b/linux-armv6-rpi1.full/Dockerfile.in @@ -0,0 +1,10 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv6-rpi1:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv6 + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv6-rpi1.full/Toolchain.cmake b/linux-armv6-rpi1.full/Toolchain.cmake new file mode 100644 index 0000000..18f624c --- /dev/null +++ b/linux-armv6-rpi1.full/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR arm) +set(cross_triple "armv6-rpi-linux-gnueabihf") +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm) + diff --git a/linux-armv6-rpi1/Dockerfile.in b/linux-armv6-rpi1/Dockerfile.in index 7c05a00..6b92a26 100644 --- a/linux-armv6-rpi1/Dockerfile.in +++ b/linux-armv6-rpi1/Dockerfile.in @@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -ENV OPENSSL_ARCH linux-armv4 -ENV OPENSSL_TARGET armv6 - -#include "common.lib" - #include "common.label-and-env" diff --git a/linux-armv7-rpi2.full/Dockerfile.in b/linux-armv7-rpi2.full/Dockerfile.in new file mode 100644 index 0000000..30c52af --- /dev/null +++ b/linux-armv7-rpi2.full/Dockerfile.in @@ -0,0 +1,13 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv7-rpi2:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +# This is for 32-bit ARMv7 Linux + + +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv7-rpi2.full/Toolchain.cmake b/linux-armv7-rpi2.full/Toolchain.cmake new file mode 100644 index 0000000..7bdd980 --- /dev/null +++ b/linux-armv7-rpi2.full/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR arm) +set(cross_triple "armv7-rpi2-linux-gnueabihf") +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm) + diff --git a/linux-armv7-rpi2/Dockerfile.in b/linux-armv7-rpi2/Dockerfile.in index 7d97ae5..9006908 100644 --- a/linux-armv7-rpi2/Dockerfile.in +++ b/linux-armv7-rpi2/Dockerfile.in @@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -ENV OPENSSL_ARCH linux-armv4 -ENV OPENSSL_TARGET armv7-a - -#include "common.lib" - #include "common.label-and-env" diff --git a/linux-armv7.full/Dockerfile.in b/linux-armv7.full/Dockerfile.in new file mode 100644 index 0000000..96a4dbc --- /dev/null +++ b/linux-armv7.full/Dockerfile.in @@ -0,0 +1,12 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv7:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +# This is for 32-bit ARMv7 Linux + +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv7.full/Toolchain.cmake b/linux-armv7.full/Toolchain.cmake new file mode 100644 index 0000000..cbd9219 --- /dev/null +++ b/linux-armv7.full/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR arm) +set(cross_triple "arm-cortexa5-linux-gnueabihf") +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm) + diff --git a/linux-armv7/Dockerfile.in b/linux-armv7/Dockerfile.in index b9ca8d6..993cda6 100644 --- a/linux-armv7/Dockerfile.in +++ b/linux-armv7/Dockerfile.in @@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -ENV OPENSSL_ARCH linux-armv4 -ENV OPENSSL_TARGET armv7-a - -#include "common.lib" - #include "common.label-and-env" diff --git a/linux-armv7a.full/Dockerfile.in b/linux-armv7a.full/Dockerfile.in new file mode 100644 index 0000000..137c0bf --- /dev/null +++ b/linux-armv7a.full/Dockerfile.in @@ -0,0 +1,12 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv7a:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +# This is for 32-bit ARMv7 Linux + +ENV OPENSSL_ARCH linux-armv4 +ENV OPENSSL_TARGET armv7-a + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv7a.full/README.rst b/linux-armv7a.full/README.rst new file mode 100644 index 0000000..302e3b7 --- /dev/null +++ b/linux-armv7a.full/README.rst @@ -0,0 +1,11 @@ +dockcross image for ARMv7-A +=========================== + +Toolchain configured for ARMv7-A used in Beaglebone Black single board PC with TI SoC AM3358 on board, Cortex-A8. Code compiled with dockcross armv7 image crashes on Beaglebone, see https://github.com/dockcross/dockcross/issues/290 + +Difference with dockcross armv7 toolchain: ARCH_CPU="cortex-a8", ARCH_FPU="neon". + +Only NEON is enabled, though TI docs says it is possible to use both VFPv3 and NEON http://processors.wiki.ti.com/index.php/Using_NEON_and_VFPv3_on_Cortex-A8 + +I do not know how to configure CrossTool-NG for VFPv3+NEON. Feel you free to submit a fix) + diff --git a/linux-armv7a.full/Toolchain.cmake b/linux-armv7a.full/Toolchain.cmake new file mode 100644 index 0000000..0e71566 --- /dev/null +++ b/linux-armv7a.full/Toolchain.cmake @@ -0,0 +1,21 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR arm) +set(cross_triple "arm-cortexa9_neon-linux-gnueabihf") +#arm-cortexa9_neon-linux-gnueabihf +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-arm) + diff --git a/linux-armv7a/Dockerfile.in b/linux-armv7a/Dockerfile.in index 81acf02..441615f 100644 --- a/linux-armv7a/Dockerfile.in +++ b/linux-armv7a/Dockerfile.in @@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV ARCH arm -ENV OPENSSL_ARCH linux-armv4 -ENV OPENSSL_TARGET armv7-a - -#include "common.lib" - #include "common.label-and-env" diff --git a/linux-armv8-rpi3.full/Dockerfile.in b/linux-armv8-rpi3.full/Dockerfile.in new file mode 100644 index 0000000..6fe2fac --- /dev/null +++ b/linux-armv8-rpi3.full/Dockerfile.in @@ -0,0 +1,12 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv8-rpi3:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +# This is for 64-bit ARM Linux machine Raspberry PI 4 + +ENV OPENSSL_ARCH linux-aarch64 +ENV OPENSSL_TARGET armv8-a + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv8-rpi3.full/Toolchain.cmake b/linux-armv8-rpi3.full/Toolchain.cmake new file mode 100644 index 0000000..f66096c --- /dev/null +++ b/linux-armv8-rpi3.full/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(cross_triple "armv8-rpi3-linux-gnueabihf") +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64) diff --git a/linux-armv8-rpi4.full/Dockerfile.in b/linux-armv8-rpi4.full/Dockerfile.in new file mode 100644 index 0000000..c396055 --- /dev/null +++ b/linux-armv8-rpi4.full/Dockerfile.in @@ -0,0 +1,12 @@ +ARG DOCKER_IMAGE=bensuperpc/linux-armv8-rpi4:latest +FROM $DOCKER_IMAGE +MAINTAINER Bensuperpc "bensuperpc@gmail.com" + +# This is for 64-bit ARM Linux machine Raspberry PI 4 + +ENV OPENSSL_ARCH linux-aarch64 +ENV OPENSSL_TARGET armv8-a + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-armv8-rpi4.full/Toolchain.cmake b/linux-armv8-rpi4.full/Toolchain.cmake new file mode 100644 index 0000000..67e90a4 --- /dev/null +++ b/linux-armv8-rpi4.full/Toolchain.cmake @@ -0,0 +1,20 @@ +set(CMAKE_SYSTEM_NAME Linux) +set(CMAKE_SYSTEM_VERSION 1) +set(CMAKE_SYSTEM_PROCESSOR aarch64) + +set(cross_triple "armv8-rpi4-linux-gnueabihf") +set(cross_root /usr/xcc/${cross_triple}) + +set(CMAKE_C_COMPILER $ENV{CC}) +set(CMAKE_CXX_COMPILER $ENV{CXX}) +set(CMAKE_Fortran_COMPILER $ENV{FC}) + +set(CMAKE_CXX_FLAGS "-I ${cross_root}/include/") + +set(CMAKE_FIND_ROOT_PATH ${cross_root} ${cross_root}/${cross_triple}) +set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH) +set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE BOTH) +set(CMAKE_SYSROOT ${cross_root}/${cross_triple}/sysroot) + +set(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-aarch64) diff --git a/linux-armv8-rpi4/Dockerfile.in b/linux-armv8-rpi4/Dockerfile.in index a61761f..333ed80 100644 --- a/linux-armv8-rpi4/Dockerfile.in +++ b/linux-armv8-rpi4/Dockerfile.in @@ -41,6 +41,4 @@ ENV ARCH arm64 ENV OPENSSL_ARCH linux-aarch64 ENV OPENSSL_TARGET armv8-a -#include "common.lib" - #include "common.label-and-env"