-
Notifications
You must be signed in to change notification settings - Fork 7
/
debian-armv6
86 lines (74 loc) · 2.6 KB
/
debian-armv6
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
76
77
78
79
80
81
82
83
84
85
86
ARG SUITE="buster"
ARG QT_VERSION="5"
ARG REPOSITORY="https://github.com/hyperion-project"
FROM balenalib/rpi-raspbian:${SUITE}
ARG SUITE
ARG QT_VERSION
ARG REPOSITORY
ARG TARGETPLATFORM
ENV QEMU_EXECVE=1
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
ENV APT_INSTALL="apt-get -y install --no-install-recommends"
ENV APT_UPDATE="apt-get -y update"
LABEL maintainer="Hyperion Project <[email protected]>" \
org.opencontainers.image.title="Debian ${SUITE} ${TARGETPLATFORM} - QT ${QT_VERSION}" \
org.opencontainers.image.description="Compilation environment to build Hyperion for Debian ${SUITE}" \
org.opencontainers.image.url="${REPOSITORY}" \
org.opencontainers.image.source="${REPOSITORY}/hyperion.docker-ci" \
org.opencontainers.image.vendor="Hyperion Project" \
org.opencontainers.image.documentation="https://docs.hyperion-project.org" \
org.opencontainers.image.licenses="MIT"
# update
RUN $APT_UPDATE
# install qt5 or qt6 (qt6 is not available on debian buster/bullseye)
RUN if [ "$SUITE" = "bookworm" ] && [ "$QT_VERSION" = "6" ]; then \
$APT_INSTALL qt6-base-dev libqt6serialport6-dev libxkbcommon-dev libvulkan-dev libgl1-mesa-dev; \
else \
$APT_INSTALL qtbase5-dev libqt5serialport5-dev libqt5sql5-sqlite libqt5svg5-dev; \
fi
# install deps
RUN $APT_INSTALL \
devscripts \
fakeroot \
debhelper \
libdistro-info-perl \
git \
curl \
python3-dev \
build-essential \
ninja-build \
libusb-1.0-0-dev \
libcec-dev \
libp8-platform-dev \
libudev-dev \
libavahi-core-dev \
libavahi-compat-libdnssd-dev \
zlib1g-dev \
libasound2-dev \
libjpeg-dev \
libturbojpeg0-dev \
libmbedtls-dev \
libftdi1-dev \
libssl-dev \
libraspberrypi-dev \
libglib2.0-dev
# Compile and install CMake
ENV CMAKE_VERSION="3.28.3"
ENV CMAKE_URL="https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}"
RUN set -xe \
&& mkdir -p /tmp/cmake \
&& cd /tmp/cmake \
&& curl -kL ${CMAKE_URL}.tar.gz | tar zxf - -C . --strip-components 1 \
&& ./bootstrap --prefix=/usr \
&& make -j $(nproc) \
&& make install \
&& cd \
&& rm -rf /tmp/cmake
# Show cmake version
RUN cmake --version
# download qemu and set exec flag
RUN curl -kL https://github.com/balena-io/qemu/releases/download/v7.0.0%2Bbalena1/qemu-7.0.0.balena1-arm.tar.gz | tar zxvf - -C . --strip-components 1 && mv qemu-arm-static /usr/bin/qemu-static && chmod +x /usr/bin/qemu-static
# cleanup
RUN apt-get clean -q -y && apt-get autoremove -y && rm -rf /var/lib/apt/lists/*
# set entrypoint
ENTRYPOINT [ "/usr/bin/qemu-static" ]