afbdf0a44e
This image is a little special because it takes a long time to build. As such most users don't want to be doing that and just pull random binaries from the ether as intended by the container gods. This involves someone with credentials and a beefy machine running: make docker-image-debian-hexagon-cross V=1 NOCACHE=1 J=30 docker tag qemu/debian-hexagon-cross registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross docker push registry.gitlab.com/qemu-project/qemu/qemu/debian-hexagon-cross With a suitable binary in the "cloud" a normal user will run: make docker-image-debian-hexagon-cross or have it run for them through the dependency mechanism of our over-engineered makefiles and get the binary they wanted. There are a few wrinkles of course including needing to tweak the final image to have the credentials of the user so we can actually do our cross compiles. Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Willian Rampazzo <willianr@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Cc: Alessandro Di Federico <ale@rev.ng> Cc: Philippe Mathieu-Daudé <f4bug@amsat.org> Cc: Brian Cain <bcain@quicinc.com> Message-Id: <20210512102051.12134-7-alex.bennee@linaro.org>
46 lines
1.6 KiB
Docker
46 lines
1.6 KiB
Docker
#
|
|
# Docker Hexagon cross-compiler target
|
|
#
|
|
# This docker target is used for building hexagon tests. As it also
|
|
# needs to be able to build QEMU itself in CI we include it's
|
|
# build-deps. It is also a "stand-alone" image so as not to be
|
|
# triggered by re-builds on other base images given it takes a long
|
|
# time to build.
|
|
#
|
|
FROM qemu/debian10
|
|
|
|
# Install common build utilities
|
|
RUN apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt install -y --no-install-recommends \
|
|
bison \
|
|
cmake \
|
|
flex \
|
|
lld \
|
|
rsync \
|
|
wget
|
|
|
|
ENV TOOLCHAIN_INSTALL /usr/local
|
|
ENV ROOTFS /usr/local
|
|
|
|
ENV LLVM_URL https://github.com/llvm/llvm-project/archive/bfcd21876adc3498065e4da92799f613e730d475.tar.gz
|
|
ENV MUSL_URL https://github.com/quic/musl/archive/aff74b395fbf59cd7e93b3691905aa1af6c0778c.tar.gz
|
|
ENV LINUX_URL https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.18.tar.xz
|
|
|
|
ADD build-toolchain.sh /root/hexagon-toolchain/build-toolchain.sh
|
|
|
|
RUN cd /root/hexagon-toolchain && ./build-toolchain.sh
|
|
|
|
FROM debian:buster-slim
|
|
# Duplicate deb line as deb-src
|
|
RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
|
|
# Install QEMU build deps for use in CI
|
|
RUN apt update && \
|
|
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy git ninja-build && \
|
|
DEBIAN_FRONTEND=noninteractive eatmydata \
|
|
apt build-dep -yy --arch-only qemu
|
|
COPY --from=0 /usr/local /usr/local
|
|
ENV PATH $PATH:/usr/local/bin/
|