-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathDockerfile
More file actions
74 lines (60 loc) · 1.75 KB
/
Dockerfile
File metadata and controls
74 lines (60 loc) · 1.75 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
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 for building the bootloader
RUN apt-get install -y \
git \
build-essential \
crossbuild-essential-arm64 \
bison \
flex \
python3-dev \
python3-libfdt \
python3-setuptools \
swig \
libssl-dev \
gnutls-dev \
python3-pyelftools
# Prerequisites for building the kernel
RUN apt-get install -y \
bc \
imagemagick \
libdw-dev \
libelf-dev \
debhelper \
device-tree-compiler \
libssl-dev:arm64 \
rsync
# Prerequisites for fetching vendor DTS files (if using a Rockchip BSP kernel)
RUN apt-get install -y \
wget
# Prerequisites for assembling complete disk images
RUN apt-get install -y \
mmdebstrap \
systemd-resolved \
bmap-tools \
pigz \
cargo \
golang \
libglib2.0-dev \
libostree-dev \
fakemachine
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/
# Clean up apt cache to reduce image size
RUN apt-get clean && rm -rf /var/lib/apt/lists/* ~/.cargo ~/go
# Clone the rk3576-linux-build repository
WORKDIR /rk3576-linux-build
RUN git clone --depth=1 https://github.com/flipperdevices/rk3576-linux-build .
# Entry point
ENTRYPOINT ./build-uboot.sh && ./build-kernel-mainline.sh && ./build-kernel-bsp.sh && ./build-images.sh