Add full image

Add full image

Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
Bensuperpc 2021-08-08 03:52:31 +02:00
parent 772809af49
commit 0b90985648
6 changed files with 3404 additions and 3 deletions

View File

@ -14,7 +14,7 @@ BIN = ./bin
# These images are built using the "build implicit rule" # These images are built using the "build implicit rule"
STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \ STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \
linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl \ linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \
linux-armv5 linux-armv5-musl linux-m68k-uclibc linux-s390x \ linux-armv5 linux-armv5-musl linux-m68k-uclibc linux-s390x \
linux-armv6 linux-armv6-lts linux-armv6-musl \ linux-armv6 linux-armv6-lts linux-armv6-musl \
linux-armv7l-musl linux-armv7 linux-armv7a \ linux-armv7l-musl linux-armv7 linux-armv7a \
@ -24,7 +24,7 @@ STANDARD_IMAGES = android-arm android-arm64 android-x86 android-x86_64 \
# Generated Dockerfiles. # Generated Dockerfiles.
GEN_IMAGES = android-arm android-arm64 \ GEN_IMAGES = android-arm android-arm64 \
linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl \ linux-x86 linux-x64 linux-x64-clang linux-arm64 linux-arm64-musl linux-arm64-full \
manylinux2014-x64 manylinux2014-x86 \ manylinux2014-x64 manylinux2014-x86 \
manylinux2014-aarch64 web-wasm linux-mips \ manylinux2014-aarch64 web-wasm linux-mips \
windows-static-x86 windows-static-x64 windows-static-x64-posix \ windows-static-x86 windows-static-x64 windows-static-x64-posix \
@ -41,7 +41,7 @@ NON_STANDARD_IMAGES = manylinux2014-x64 manylinux2014-x86 \
manylinux2014-aarch64 web-wasm manylinux2014-aarch64 web-wasm
# Docker composite files # Docker composite files
DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux \ DOCKER_COMPOSITE_SOURCES = common.docker common.debian common.manylinux common.buildroot \
common.crosstool common.windows common-manylinux.crosstool common.dockcross common.label-and-env common.crosstool common.windows common-manylinux.crosstool common.dockcross common.label-and-env
DOCKER_COMPOSITE_FOLDER_PATH = common/ DOCKER_COMPOSITE_FOLDER_PATH = common/
DOCKER_COMPOSITE_PATH = $(addprefix $(DOCKER_COMPOSITE_FOLDER_PATH),$(DOCKER_COMPOSITE_SOURCES)) DOCKER_COMPOSITE_PATH = $(addprefix $(DOCKER_COMPOSITE_FOLDER_PATH),$(DOCKER_COMPOSITE_SOURCES))
@ -94,6 +94,7 @@ $(GEN_IMAGE_DOCKERFILES) Dockerfile: %Dockerfile: %Dockerfile.in $(DOCKER_COMPOS
-e '/common.debian/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.debian' \ -e '/common.debian/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.debian' \
-e '/common.manylinux/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.manylinux' \ -e '/common.manylinux/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.manylinux' \
-e '/common.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.crosstool' \ -e '/common.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.crosstool' \
-e '/common.buildroot/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.buildroot' \
-e '/common-manylinux.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common-manylinux.crosstool' \ -e '/common-manylinux.crosstool/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common-manylinux.crosstool' \
-e '/common.windows/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.windows' \ -e '/common.windows/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.windows' \
-e '/common.dockcross/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.dockcross' \ -e '/common.dockcross/ r $(DOCKER_COMPOSITE_FOLDER_PATH)common.dockcross' \

28
common/common.buildroot Normal file
View File

@ -0,0 +1,28 @@
# Install Debian packages required for `buildroot`.
RUN apt-get update --yes && apt-get install --no-install-recommends --yes \
gawk \
gperf \
help2man \
python3-dev \
texinfo \
unzip \
libtool \
libtool-bin \
&& apt-get clean autoclean --yes \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
COPY \
imagefiles/install-buildroot-toolchain.sh \
buildroot.config \
/dockcross/
# Build and install the toolchain, cleaning up artifacts afterwards.
RUN mkdir /dockcross/buildroot \
&& cd /dockcross/buildroot \
&& /dockcross/install-buildroot-toolchain.sh \
&& rm -rf /dockcross/buildroot /dockcross/install-buildroot-toolchain.sh
# Restore our default workdir (from "dockcross/base").
WORKDIR /work

View File

@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -x
set -e
set -o pipefail
ROOT=${PWD}
REPO_URL="https://github.com/buildroot/buildroot.git"
git clone "$REPO_URL" --recurse-submodules --remote-submodules --depth=1 --branch=2021.08-rc1
cd buildroot
cp /dockcross/buildroot.config .config
make

View File

@ -0,0 +1,41 @@
FROM dockcross/base:latest
# This is for 64-bit ARM Linux machine
# Buildroot version
#ENV BR_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
#include "common.buildroot"
# 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 "aarch64-buildroot-linux-gnu" target.
ENV CROSS_TRIPLE aarch64-buildroot-linux-gnu
ENV CROSS_ROOT /buildroot
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
#ENV PKG_CONFIG_PATH /usr/lib/aarch64-linux-gnu/pkgconfig
# Linux kernel cross compilation variables
ENV PATH ${PATH}:${CROSS_ROOT}/bin
ENV CROSS_COMPILE ${CROSS_TRIPLE}-
ENV ARCH arm64
#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 "aarch64-buildroot-linux-gnu")
set(cross_root /buildroot)
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)

File diff suppressed because it is too large Load Diff