diff --git a/Makefile b/Makefile index f499d5a..15dad4c 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ GEN_IMAGE_DOCKERFILES = $(addsuffix /Dockerfile,$(GEN_IMAGES)) # These images are expected to have explicit rules for *both* build and testing NON_STANDARD_IMAGES = web-wasm manylinux1-x64 manylinux1-x86 manylinux2010-x64 manylinux2010-x86 manylinux2014-x64 manylinux2014-x86 manylinux2014-aarch64 -DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.crosstool common.windows common-manylinux.crosstool common.dockcross 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 IMAGES = $(STANDARD_IMAGES) $(NON_STANDARD_IMAGES) @@ -69,6 +69,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS -e '/common-manylinux.crosstool/ r common-manylinux.crosstool' \ -e '/common.windows/ r common.windows' \ -e '/common.dockcross/ r common.dockcross' \ + -e '/common.lib/ r common.lib' \ -e '/common.label-and-env/ r common.label-and-env' \ $< > $@ diff --git a/common.docker b/common.docker index b083031..8dbe847 100644 --- a/common.docker +++ b/common.docker @@ -1,7 +1,7 @@ WORKDIR /usr/src ARG GIT_VERSION=2.31.1 -ARG CMAKE_VERSION=3.17.1 +ARG CMAKE_VERSION=3.20.2 # Version from official repos ARG CMAKE_VERSION_OFF=3.20.2 diff --git a/common.lib b/common.lib new file mode 100644 index 0000000..ad6ef30 --- /dev/null +++ b/common.lib @@ -0,0 +1,36 @@ +# Libraries scripts + +# Boost lib +RUN cd /tmp/ && git clone https://github.com/boostorg/boost.git && cd boost && git checkout boost-1.76.0 && git submodule update --init && \ + cd /tmp/boost/ && ./bootstrap.sh --without-libraries=mpi,python,regex,iostreams && \ + cd /tmp/boost/ && echo "using gcc : 8.4 : ${CXX} ; " >> tools/build/src/user-config.jam && \ + cd /tmp/boost/ && ./b2 install --toolset=gcc-8.4 --prefix=/usr/local/boost threading=multi link=static && \ + rm -rf /tmp/boost/ + +# OpenCV lib +RUN cd /tmp/ && git clone https://github.com/opencv/opencv.git && git clone https://github.com/opencv/opencv_contrib.git && \ + cd /tmp/ && git -C opencv checkout 4.5.2 && git -C opencv_contrib checkout 4.5.2 && \ + cd /tmp/opencv/ && mkdir -p build && cmake -Bbuild -H. \ + -GNinja \ + -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \ + -D CMAKE_BUILD_TYPE=RELEASE \ + -D OPENCV_ENABLE_NONFREE=ON \ + -D WITH_V4L=OFF \ + -D WITH_QT=OFF \ + -D WITH_OPENGL=OFF \ + -D WITH_FFMPEG=OFF \ + -D BUILD_EXAMPLES=ON \ + -D BUILD_DOCS=ON \ + -D BUILD_PERF_TESTS=OFF \ + -D BUILD_TESTS=ON \ + -D BUILD_NEW_PYTHON_SUPPORT=OFF \ + -D BUILD_opencv_python3=OFF \ + -D HAVE_opencv_python3=OFF \ + -D PYTHON_DEFAULT_EXECUTABLE="" && \ + cd /tmp/opencv && ninja -Cbuild && \ + cd /tmp/opencv/build && \ + ninja install && \ + rm -rf /tmp/opencv/ && rm -rf /tmp/opencv_contrib + + + diff --git a/imagefiles/install-cmake-binary.sh b/imagefiles/install-cmake-binary.sh index 9c34087..d062602 100755 --- a/imagefiles/install-cmake-binary.sh +++ b/imagefiles/install-cmake-binary.sh @@ -36,7 +36,10 @@ fi cd /usr/src CMAKE_ROOT=cmake-${CMAKE_VERSION}-Centos5-${ARCH} -url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz +#Change the url when there is a new version (Currently 3.17.1 of April 2020) +#url=https://github.com/dockbuild/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz +url=https://github.com/bensuperpc/CMake/releases/download/v${CMAKE_VERSION}/${CMAKE_ROOT}.tar.gz + echo "Downloading $url" curl -# -LO $url diff --git a/imagefiles/install-python-packages.sh b/imagefiles/install-python-packages.sh index 088a4e7..db5523f 100755 --- a/imagefiles/install-python-packages.sh +++ b/imagefiles/install-python-packages.sh @@ -23,7 +23,6 @@ cd /tmp # Todo: Need to update base image from Debian Stretch for the required Python # 3.6 or later curl -# -LO https://bootstrap.pypa.io/pip/get-pip.py -#curl -# -LO https://bootstrap.pypa.io/pip/2.7/get-pip.py ${PYTHON} get-pip.py --ignore-installed rm get-pip.py diff --git a/linux-armv8-rpi4/crosstool-ng.config b/linux-armv8-rpi4/crosstool-ng.config index c535423..875232b 100644 --- a/linux-armv8-rpi4/crosstool-ng.config +++ b/linux-armv8-rpi4/crosstool-ng.config @@ -167,7 +167,7 @@ CT_ARCH_LE=y CT_ARCH_ENDIAN="little" CT_ARCH_SUPPORTS_32=y CT_ARCH_SUPPORTS_64=y -CT_ARCH_DEFAULT_32=y +CT_ARCH_DEFAULT_64=y CT_ARCH_BITNESS=64 # CT_ARCH_32 is not set CT_ARCH_64=y diff --git a/linux-armv8/crosstool-ng.config b/linux-armv8/crosstool-ng.config index 8485ffc..fc2c18b 100644 --- a/linux-armv8/crosstool-ng.config +++ b/linux-armv8/crosstool-ng.config @@ -167,7 +167,7 @@ CT_ARCH_LE=y CT_ARCH_ENDIAN="little" CT_ARCH_SUPPORTS_32=y CT_ARCH_SUPPORTS_64=y -CT_ARCH_DEFAULT_32=y +CT_ARCH_DEFAULT_64=y CT_ARCH_BITNESS=64 # CT_ARCH_32 is not set CT_ARCH_64=y diff --git a/linux-mips64/Dockerfile.in.with_lib b/linux-mips64/Dockerfile.in.with_lib new file mode 100644 index 0000000..0c34c31 --- /dev/null +++ b/linux-mips64/Dockerfile.in.with_lib @@ -0,0 +1,39 @@ +FROM dockcross/base:latest + +# This is for 64-bit Little-Endian MIPS devices with hard floating point enabled + +#include "common.crosstool" + +# The cross-compiling emulator +RUN apt-get update \ +&& apt-get install -y \ + qemu-user \ + qemu-user-static \ +&& apt-get clean --yes + +# The CROSS_TRIPLE is a configured alias of the "mips64el-unknown-linux-gnu" target. +ENV CROSS_TRIPLE mips64el-unknown-linux-gnu + +ENV CROSS_ROOT ${XCC_PREFIX}/${CROSS_TRIPLE} +ENV AS=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-as \ + AR=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ar \ + CC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gcc \ + CPP=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-cpp \ + CXX=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-g++ \ + LD=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-ld \ + FC=${CROSS_ROOT}/bin/${CROSS_TRIPLE}-gfortran + +ENV QEMU_LD_PREFIX "${CROSS_ROOT}/${CROSS_TRIPLE}/sysroot" +ENV QEMU_SET_ENV "LD_LIBRARY_PATH=${CROSS_ROOT}/lib:${QEMU_LD_PREFIX}" + +COPY Toolchain.cmake ${CROSS_ROOT}/ +ENV CMAKE_TOOLCHAIN_FILE ${CROSS_ROOT}/Toolchain.cmake + +# Linux kernel cross compilation variables +ENV PATH ${PATH}:${CROSS_ROOT}/bin +ENV CROSS_COMPILE ${CROSS_TRIPLE}- +ENV ARCH mips + +#include "common.lib" + +#include "common.label-and-env" diff --git a/linux-mips64/crosstool-ng.config b/linux-mips64/crosstool-ng.config index ce3d8cf..4645626 100644 --- a/linux-mips64/crosstool-ng.config +++ b/linux-mips64/crosstool-ng.config @@ -143,7 +143,7 @@ CT_ARCH_MIPS_PKG_KSYM="" CT_ARCH_mips_o32=y # CT_ARCH_mips_n32 is not set # CT_ARCH_mips_n64 is not set -CT_ARCH_mips_ABI="32" +CT_ARCH_mips_ABI="64" CT_ALL_ARCH_CHOICES="ALPHA ARC ARM AVR M68K MICROBLAZE MIPS MOXIE MSP430 NIOS2 POWERPC RISCV S390 SH SPARC X86 XTENSA" CT_ARCH_SUFFIX="" # CT_OMIT_TARGET_VENDOR is not set @@ -162,7 +162,7 @@ CT_ARCH_LE=y CT_ARCH_ENDIAN="little" CT_ARCH_SUPPORTS_32=y CT_ARCH_SUPPORTS_64=y -CT_ARCH_DEFAULT_32=y +CT_ARCH_DEFAULT_64=y CT_ARCH_BITNESS=64 # CT_ARCH_32 is not set CT_ARCH_64=y @@ -185,7 +185,7 @@ CT_ARCH_FPU="" # CT_ARCH_FLOAT_SW is not set CT_TARGET_CFLAGS="" CT_TARGET_LDFLAGS="" -CT_ARCH_FLOAT="hard" +CT_ARCH_FLOAT="auto" # # Toolchain options diff --git a/linux-ppc64/crosstool-ng.config b/linux-ppc64/crosstool-ng.config index 41c4a31..0016941 100644 --- a/linux-ppc64/crosstool-ng.config +++ b/linux-ppc64/crosstool-ng.config @@ -161,7 +161,7 @@ CT_ARCH_BE=y CT_ARCH_ENDIAN="big" CT_ARCH_SUPPORTS_32=y CT_ARCH_SUPPORTS_64=y -CT_ARCH_DEFAULT_32=y +CT_ARCH_DEFAULT_64=y CT_ARCH_BITNESS=64 # CT_ARCH_32 is not set CT_ARCH_64=y diff --git a/linux-ppc64le/crosstool-ng.config b/linux-ppc64le/crosstool-ng.config index 2156ecb..7d44aaf 100644 --- a/linux-ppc64le/crosstool-ng.config +++ b/linux-ppc64le/crosstool-ng.config @@ -161,7 +161,7 @@ CT_ARCH_LE=y CT_ARCH_ENDIAN="little" CT_ARCH_SUPPORTS_32=y CT_ARCH_SUPPORTS_64=y -CT_ARCH_DEFAULT_32=y +CT_ARCH_DEFAULT_64=y CT_ARCH_BITNESS=64 # CT_ARCH_32 is not set CT_ARCH_64=y