-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathDockerfile
More file actions
84 lines (71 loc) · 2.24 KB
/
Copy pathDockerfile
File metadata and controls
84 lines (71 loc) · 2.24 KB
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
FROM debian:trixie
# Set environment variables
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=UTC
ENV IMG_OUT=/artifacts/images
ENV UBOOT_OUT=/artifacts/u-boot
ENV LINUX_OUT=/artifacts/linux
# Add arm64 architecture for cross-compilation
RUN dpkg --add-architecture arm64 && apt-get update
# Upgrade base system
RUN apt-get upgrade -y
# Prerequisites
RUN apt-get install -y \
git \
build-essential \
crossbuild-essential-arm64 \
bison \
flex \
parted \
fdisk \
btrfs-progs \
dosfstools \
mtools \
python3-dev \
python3-libfdt \
python3-setuptools \
swig \
libssl-dev \
gnutls-dev \
python3-pyelftools \
qemu-user-binfmt \
bc \
imagemagick \
libdw-dev \
libelf-dev \
debhelper \
device-tree-compiler \
libssl-dev:arm64 \
rsync \
wget \
mmdebstrap \
systemd-container \
systemd-resolved \
pipx \
pigz \
zstd \
golang \
libglib2.0-dev \
libostree-dev \
fakemachine
# Rust for zeekstd below and for flipctl during the ospack build, from backports rather
# than trixie: slint 1.17.1 wants rustc 1.92 and trixie has 1.85. libstd-rust-dev:arm64
# is the standard library for the target, which is what lets build-flipctl.sh cross-build
# on an amd64 builder.
RUN echo 'deb http://deb.debian.org/debian trixie-backports main' \
> /etc/apt/sources.list.d/backports.list \
&& apt-get update \
&& apt-get install -y -t trixie-backports \
cargo rustc libstd-rust-dev libstd-rust-dev:arm64
RUN go install -v github.com/go-debos/debos/cmd/debos@latest
RUN install -m 755 ~/go/bin/debos /usr/local/bin
RUN cargo install --git https://github.com/rorosen/zeekstd.git zeekstd_cli
RUN install -m 755 ~/.cargo/bin/zeekstd /usr/local/bin/
RUN pipx install --global git+https://github.com/flipperdevices/bmaptool.git@flipper-devel
# Clean up apt cache to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/* ~/.cargo ~/go
# Clone the flipperone-linux-build-scripts repository
WORKDIR /flipperone-linux-build-scripts
RUN git clone --depth=1 https://github.com/flipperdevices/flipperone-linux-build-scripts .
# Entry point
ENTRYPOINT ./build-uboot.sh && ./build-kernel-mainline.sh && ./build-kernel-bsp.sh && ./build-images.sh