Skip to content

Commit 9e495c1

Browse files
toolchain: Debian 13 / GCC 14 / crosstool-NG 1.28 / uClibc-ng 1.0.54
Move the cross-toolchain and build host to a modern base, and standardize all machines on it. The secure-boot signing stack (shim 16.1, host pesign, gnu-efi removal, grub SBAT) is no longer here -- it moved to the EFI/boot stack PR (#1128), since none of it requires GCC 14. - Build host Debian 11 -> Debian 13 (trixie). The old crosstool-NG 1.24 / GCC 8.3 toolchain cannot build on a Debian 13 host, so host and toolchain move together. - crosstool-NG 1.24 -> 1.28.0, GCC 8.3 -> 14, uClibc-ng 1.0.38 -> 1.0.54, binutils 2.45; XTOOLS_LINUX_VERSION decoupling so image-kernel bumps no longer rebuild the toolchain. - mokutil 0.4.0 -> 0.7.2 (adds a libkeyutils dependency). - grub i386-pc kernel.img link fix for binutils >= 2.39 (custom linker script + autogen + autoconf-archive) -- needs the new toolchain. - images.make GCC 14 libstdc++ SONAME (libstdc++.so.6.0.33). - Build pre-6.x kernels under GCC 14 (KERNEL_OLD_GCC_COMPAT): the existing 5.4 kernel is kept and built under the new toolchain via CONFIG_STACK_VALIDATION= + -Wno-error, letting the toolchain move land independently of the kernel bump. Signed-off-by: Brad House <bhouse@nexthop.ai>
1 parent 8442f5b commit 9e495c1

300 files changed

Lines changed: 592 additions & 8242 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: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# ONIE build environment for CI.
22
#
3-
# Debian 11 is required: onie/build-config/Makefile still pulls in
4-
# python2-era tooling (python-all-dev) that is unavailable on newer
5-
# Debian releases.
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.)
68
#
79
# This image builds the generic kvm_x86_64 target with secure boot
8-
# enabled. It includes the secure-boot key-generation and EFI signing
9-
# tooling (gnupg2, efitools, sbsigntool, pesign), and the NSS command-line
10-
# tools the shim signing step shells out to (libnss3-tools:
11-
# pk12util/certutil). shim's ENABLE_SHIM_HASH step uses the host pesign
12-
# (Debian 11 ships pesign 0.112).
13-
FROM debian:11
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
1414
WORKDIR /onie
1515

1616
# Tolerate transient Debian mirror hiccups (connection resets mid-fetch).
@@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y \
2424
autopoint \
2525
bc \
2626
bison \
27-
bsdmainutils \
27+
bsdextrautils \
2828
build-essential \
2929
coreutils \
3030
cpio \
@@ -43,20 +43,15 @@ RUN apt-get update && apt-get install -y \
4343
libelf-dev \
4444
libexpat1 \
4545
libexpat1-dev \
46-
libncurses5 \
47-
libncurses5-dev \
48-
libnspr4-dev \
49-
libnss3-dev \
50-
libnss3-tools \
46+
libncurses-dev \
5147
libpopt-dev \
52-
pesign \
5348
libssl-dev \
5449
libtool \
5550
libtool-bin \
5651
locales \
5752
mtools \
53+
pesign \
5854
pkgconf \
59-
python-all-dev \
6055
python3-all-dev \
6156
python3-sphinx \
6257
python3-venv \

.github/workflows/build-onie.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,18 @@ jobs:
4040
- name: Checkout
4141
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4242

43+
# The GCC 14 / Debian 13 toolchain build plus the full image (restored
44+
# x-tools cache + every package + kernel + recovery ISO) exceeds the
45+
# ~14 GB free on a stock ubuntu-latest runner. Reclaim ~25 GB of
46+
# preinstalled toolchains we do not use so the build has headroom.
47+
- name: Free up runner disk space
48+
run: |
49+
echo "Disk before cleanup:"; df -h /
50+
sudo rm -rf /usr/local/lib/android /opt/hostedtoolcache /usr/share/dotnet \
51+
/usr/local/.ghcup /usr/share/swift /usr/local/share/powershell \
52+
/usr/local/lib/node_modules || true
53+
echo "Disk after cleanup:"; df -h /
54+
4355
- name: Set up Docker Buildx
4456
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4.1.0
4557

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
CT_CONFIG_VERSION="4"
2+
CT_LOCAL_TARBALLS_DIR="${DOWNLOADDIR}"
3+
CT_WORK_DIR="${CT_TOP_DIR}/build"
4+
CT_PREFIX_DIR="${XTOOLS_INSTALL_DIR}/${CT_TARGET}"
5+
CT_STRIP_TARGET_TOOLCHAIN_EXECUTABLES=y
6+
CT_LOG_INFO=y
7+
# CT_LOG_PROGRESS_BAR is not set
8+
CT_ARCH_X86=y
9+
CT_ARCH_64=y
10+
CT_TOOLCHAIN_PKGVERSION="ONIE-${LSB_RELEASE_TAG}"
11+
CT_TARGET_VENDOR="onie"
12+
CT_TARGET_ALIAS="x86_64"
13+
CT_TOOLCHAIN_ENABLE_NLS=y
14+
CT_KERNEL_LINUX=y
15+
CT_BINUTILS_FOR_TARGET=y
16+
CT_LIBC_UCLIBC_NG=y
17+
CT_LIBC_UCLIBC_CONFIG_FILE="${UCLIBC_CONFIG}"
18+
CT_LIBC_UCLIBC_LOCALES=y
19+
CT_GCC_V_14=y
20+
# CT_CC_GCC_LIBMPX is not set
21+
CT_CC_LANG_CXX=y
22+
CT_DEBUG_DUMA=y
23+
CT_DEBUG_GDB=y
24+
CT_DEBUG_LTRACE=y
25+
CT_DEBUG_STRACE=y
26+
CT_GETTEXT_V_0_19_8_1=y
27+
CT_LIBICONV_V_1_15=y
28+
CT_NCURSES_V_6_0=y
29+
CT_COMP_TOOLS_AUTOCONF=y
30+
CT_AUTOCONF_V_2_69=y
31+
CT_COMP_TOOLS_AUTOMAKE=y
32+
CT_AUTOMAKE_V_1_15=y
33+
CT_COMP_TOOLS_LIBTOOL=y
34+
CT_LIBTOOL_V_2_4=y
35+
CT_COMP_TOOLS_M4=y
36+
CT_COMP_TOOLS_MAKE=y
37+
38+
#
39+
# Component versions that match the crosstool-NG 1.28.0 defaults are pinned
40+
# explicitly here so the toolchain spec stays visible and is protected against
41+
# silent drift if crosstool-NG is ever bumped (savedefconfig omits defaults).
42+
#
43+
CT_BINUTILS_V_2_45=y
44+
CT_UCLIBC_NG_V_1_0_54=y
45+
CT_GDB_V_16=y
46+
CT_GMP_V_6_3=y
47+
CT_ISL_V_0_27=y
48+
CT_MPC_V_1_3=y
49+
CT_MPFR_V_4_2=y

0 commit comments

Comments
 (0)