Add full image option

This commit is contained in:
Bensuperpc 2021-05-15 10:26:51 +02:00
parent 6a70cee0fe
commit 363ea4796e
19 changed files with 231 additions and 26 deletions

View File

@ -13,11 +13,15 @@ ORG = bensuperpc
BIN = ./bin BIN = ./bin
# These images are built using the "build implicit rule" # 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 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. # 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_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 # These images are expected to have explicit rules for *both* build and testing
NON_STANDARD_IMAGES = web-wasm manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 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 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 # 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" # Optional arguments for test runner (test/run.py) associated with "testing implicit rule"
linux-ppc64.test_ARGS = --languages C 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 $@) $(DOCKER) run $(RM) bensuperpc/$(basename $@) > $(BIN)/dockcross-$(basename $@) && chmod +x $(BIN)/dockcross-$(basename $@)
$(BIN)/dockcross-$(basename $@) python3 test/run.py $($@_ARGS) $(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 # testing prerequisites implicit rule
# #
test.prerequisites: test.prerequisites:
mkdir -p $(BIN) 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

View File

@ -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"

View File

@ -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)

View File

@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH arm ENV ARCH arm
ENV OPENSSL_ARCH linux-armv4
ENV OPENSSL_TARGET armv6
#include "common.lib"
#include "common.label-and-env" #include "common.label-and-env"

View File

@ -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"

View File

@ -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)

View File

@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH arm ENV ARCH arm
ENV OPENSSL_ARCH linux-armv4
ENV OPENSSL_TARGET armv7-a
#include "common.lib"
#include "common.label-and-env" #include "common.label-and-env"

View File

@ -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"

View File

@ -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)

View File

@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH arm ENV ARCH arm
ENV OPENSSL_ARCH linux-armv4
ENV OPENSSL_TARGET armv7-a
#include "common.lib"
#include "common.label-and-env" #include "common.label-and-env"

View File

@ -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"

View File

@ -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)

View File

@ -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)

View File

@ -37,9 +37,4 @@ ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}- ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH arm ENV ARCH arm
ENV OPENSSL_ARCH linux-armv4
ENV OPENSSL_TARGET armv7-a
#include "common.lib"
#include "common.label-and-env" #include "common.label-and-env"

View File

@ -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"

View File

@ -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)

View File

@ -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"

View File

@ -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)

View File

@ -41,6 +41,4 @@ ENV ARCH arm64
ENV OPENSSL_ARCH linux-aarch64 ENV OPENSSL_ARCH linux-aarch64
ENV OPENSSL_TARGET armv8-a ENV OPENSSL_TARGET armv8-a
#include "common.lib"
#include "common.label-and-env" #include "common.label-and-env"