Skip to content

Commit c651ca4

Browse files
Signed-off-by: Brad House <bhouse@nexthop.ai>
1 parent 48db661 commit c651ca4

709 files changed

Lines changed: 15272 additions & 91140 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/onie-build/Dockerfile

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# ONIE build environment for CI.
2+
#
3+
# Debian 13 (trixie) host for the modernized toolchain. Required because
4+
# kernel 6.18's objtool needs a newer host libelf than Debian 11 ships
5+
# (0.183 fails with "elf_update: invalid section alignment"), and
6+
# crosstool-NG 1.28 / GCC 14 align with the trixie host toolchain. (The
7+
# old crosstool-NG 1.24 / GCC 8.3 toolchain could NOT build on trixie.)
8+
#
9+
# This image builds the generic kvm_x86_64 target with secure boot
10+
# enabled. It includes the secure-boot tooling needed to exercise the SB
11+
# build path -- pesign, efitools, sbsigntool and gnupg2 (for key
12+
# generation and EFI signing) -- and meson/ninja, which flashrom 1.x
13+
# requires to build.
14+
FROM debian:13
15+
WORKDIR /onie
16+
17+
# Tolerate transient Debian mirror hiccups (connection resets mid-fetch).
18+
RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries
19+
20+
# Build dependencies for crosstool-NG and the ONIE image.
21+
RUN apt-get update && apt-get install -y \
22+
autoconf \
23+
autoconf-archive \
24+
automake \
25+
autopoint \
26+
bc \
27+
bison \
28+
bsdextrautils \
29+
build-essential \
30+
coreutils \
31+
cpio \
32+
curl \
33+
device-tree-compiler \
34+
dosfstools \
35+
efitools \
36+
fakeroot \
37+
flex \
38+
gawk \
39+
git \
40+
gnupg2 \
41+
gperf \
42+
help2man \
43+
libefivar-dev \
44+
libelf-dev \
45+
libexpat1 \
46+
libexpat1-dev \
47+
libncurses-dev \
48+
libpopt-dev \
49+
libssl-dev \
50+
libtool \
51+
libtool-bin \
52+
locales \
53+
meson \
54+
mtools \
55+
ninja-build \
56+
pesign \
57+
pkgconf \
58+
python3-all-dev \
59+
python3-sphinx \
60+
python3-venv \
61+
rst2pdf \
62+
rsync \
63+
sbsigntool \
64+
stgit \
65+
texinfo \
66+
tree \
67+
u-boot-tools \
68+
unzip \
69+
util-linux \
70+
uuid-dev \
71+
uuid-runtime \
72+
wget \
73+
zip \
74+
xorriso \
75+
&& rm -rf /var/lib/apt/lists/*
76+
77+
# Generate UTF-8 locale (needed for the uclibc / crosstool-NG build).
78+
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
79+
locale-gen
80+
81+
# Create the build user with the same UID/GID as the host invoker so
82+
# build artifacts are not left owned by root. Override at build time
83+
# with --build-arg UID=$(id -u) --build-arg GID=$(id -g).
84+
#
85+
# NOTE: -l avoids docker layer-export hangs for large UIDs.
86+
# (https://github.com/moby/moby/issues/5419#issuecomment-41478290)
87+
ARG UID=1000
88+
ARG GID=1000
89+
RUN groupadd -g $GID build && \
90+
useradd -l -m -u $UID -g $GID -s /bin/bash build && \
91+
chown -R build:build /onie
92+
93+
USER build
94+
95+
# /sbin and /usr/sbin hold tools the build invokes.
96+
RUN echo 'export PATH="/sbin:/usr/sbin:$PATH"' >> ~/.bashrc
97+
98+
# The build runs git commands; give it a default identity.
99+
RUN git config --global user.email "build@example.com" && \
100+
git config --global user.name "Build User"
101+
102+
CMD ["/bin/bash", "--login"]

0 commit comments

Comments
 (0)