From 84df0042ca51743e2ef228d25a664a139ce8f9b3 Mon Sep 17 00:00:00 2001 From: tranch Date: Sun, 12 Jul 2026 23:35:37 +0800 Subject: Rebuild initramfs with custom branding Regenerate initramfs after applying AeroCore image metadata and assets. --- Containerfile | 3 ++- build_files/build-initramfs | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100755 build_files/build-initramfs diff --git a/Containerfile b/Containerfile index cdcd945..1f09ba1 100644 --- a/Containerfile +++ b/Containerfile @@ -41,7 +41,8 @@ RUN --mount=type=bind,from=ctx,source=/,target=/ctx \ --mount=type=cache,dst=/var/log \ --mount=type=tmpfs,dst=/tmp \ /ctx/build.sh && \ - /ctx/image-info + /ctx/image-info && \ + /ctx/build-initramfs ### LINTING ## Verify final image and contents are correct. diff --git a/build_files/build-initramfs b/build_files/build-initramfs new file mode 100755 index 0000000..9eec951 --- /dev/null +++ b/build_files/build-initramfs @@ -0,0 +1,17 @@ +#!/usr/bin/bash + +set -eoux pipefail + +echo "::group::Executing build-initramfs" +trap 'echo "::endgroup::"' EXIT + +if [[ "${KERNEL_FLAVOR:-}" == "surface" ]]; then + KERNEL_SUFFIX="surface" +else + KERNEL_SUFFIX="" +fi + +QUALIFIED_KERNEL="$(dnf5 repoquery --installed --queryformat='%{evr}.%{arch}' "kernel${KERNEL_SUFFIX:+-${KERNEL_SUFFIX}}")" +/usr/bin/dracut --no-hostonly --kver "$QUALIFIED_KERNEL" --reproducible --zstd -v --add ostree --add fido2 -f "/usr/lib/modules/$QUALIFIED_KERNEL/initramfs.img" + +chmod 0600 /usr/lib/modules/"$QUALIFIED_KERNEL"/initramfs.img -- cgit v1.2.3