diff options
| author | tranch <tranch.xiao@gmail.com> | 2026-07-12 23:35:37 +0800 |
|---|---|---|
| committer | tranch <tranch.xiao@gmail.com> | 2026-07-12 23:35:37 +0800 |
| commit | 84df0042ca51743e2ef228d25a664a139ce8f9b3 (patch) | |
| tree | af265b0f82ad61bb0a71c70e25b2365b90316183 | |
| parent | 42a6ff3286804854c1c21a7e62158f09e19a9b09 (diff) | |
| download | AeroCore-OS-84df0042ca51743e2ef228d25a664a139ce8f9b3.tar.gz AeroCore-OS-84df0042ca51743e2ef228d25a664a139ce8f9b3.zip | |
Rebuild initramfs with custom branding
Regenerate initramfs after applying AeroCore image metadata and assets.
| -rw-r--r-- | Containerfile | 3 | ||||
| -rwxr-xr-x | build_files/build-initramfs | 17 |
2 files changed, 19 insertions, 1 deletions
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 |
