Skip to content

Commit 54e8de1

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

697 files changed

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

0 commit comments

Comments
 (0)