-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuildCross
75 lines (64 loc) · 1.69 KB
/
buildCross
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
ARG LINUX_VERSION
ARG LINUX_ARCHITECTURE
ARG DOCKER_SOURCE
ARG BUILD_DESC
FROM balenalib/${DOCKER_SOURCE}:${LINUX_VERSION}-build
ARG LINUX_VERSION
ARG LINUX_ARCHITECTURE
ARG DOCKER_SOURCE
ARG BUILD_DESC
LABEL maintainer="HyperHDR" \
org.opencontainers.image.title="${DOCKER_SOURCE} (${LINUX_VERSION})" \
org.opencontainers.image.description="HyperHDR build environment ${BUILD_DESC}" \
org.opencontainers.image.url="https://github.com/awawa-dev" \
org.opencontainers.image.source="https://github.com/awawa-dev/HyperHDR.dev.docker" \
org.opencontainers.image.vendor="HyperHDR"
ENV QEMU_EXECVE 1
RUN [ "cross-build-start" ]
# install hyperhdr deps packages
RUN apt update
RUN apt upgrade
RUN if [ "$LINUX_ARCHITECTURE" = "arm-aarch64" ]; \
then apt install libssl-dev; \
else echo skip libssl-dev; \
fi
RUN apt --assume-yes install \
build-essential \
cmake \
git \
libasound2-dev \
libegl-dev \
libflatbuffers-dev flatbuffers-compiler \
libftdi1-dev \
libgl-dev \
libglvnd-dev \
liblzma-dev \
libcec-dev \
libp8-platform-dev \
libudev-dev \
libpipewire-0.3-dev \
libssl-dev \
libsystemd-dev \
libqt5serialport5-dev \
libturbojpeg0-dev \
libusb-1.0-0-dev \
libx11-dev \
libzstd-dev \
qtbase5-dev \
wget \
unzip \
pkg-config \
python3
# python3-minimal
RUN apt --assume-yes install libraspberrypi-dev || exit 0
RUN mkdir -p /scripts
COPY build.sh /scripts
WORKDIR /scripts
RUN chmod +x /scripts/build.sh
RUN /scripts/build.sh
RUN if [ "$LINUX_ARCHITECTURE" = "arm-64bit-aarch64" ]; \
then ln -s /usr/bin/qemu-aarch64-static /scripts/entrypoint; \
else ln -s /usr/bin/qemu-arm-static /scripts/entrypoint; \
fi
RUN [ "cross-build-end" ]
ENTRYPOINT [ "/scripts/entrypoint" ]