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 | 03c4de92818b9f8dd641291928a7c0ceb8590d85 (patch) | |
| tree | af265b0f82ad61bb0a71c70e25b2365b90316183 /build_files/build-initramfs | |
| parent | 4824ba779c139ca57105b5306d74570fe1788814 (diff) | |
| download | AeroCore-OS-03c4de92818b9f8dd641291928a7c0ceb8590d85.tar.gz AeroCore-OS-03c4de92818b9f8dd641291928a7c0ceb8590d85.zip | |
Rebuild initramfs with custom branding
Regenerate initramfs after applying AeroCore image metadata and assets.
Diffstat (limited to 'build_files/build-initramfs')
| -rwxr-xr-x | build_files/build-initramfs | 17 |
1 files changed, 17 insertions, 0 deletions
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 |
