From 73853aae3603b6314b9f28eebbc03bcf69163d42 Mon Sep 17 00:00:00 2001 From: JarbasAi Date: Sun, 12 Jul 2026 22:11:34 +0100 Subject: [PATCH] fix(ci): pick the kernel8 initramfs in the Tier 3 boot test The boot partition carries one initramfs per kernel flavor, so the initramfs* glob passes multiple sources to cp and the copy fails. Select initramfs8 (matching kernel8.img), falling back to the first match on older layouts. --- scripts/ci/qemu_boot_test.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/ci/qemu_boot_test.sh b/scripts/ci/qemu_boot_test.sh index 747102c2..610b3f47 100755 --- a/scripts/ci/qemu_boot_test.sh +++ b/scripts/ci/qemu_boot_test.sh @@ -49,11 +49,17 @@ mount_image "$IMG" ro BOOT_DIR="$MNT/boot/firmware" [[ -d "$BOOT_DIR" ]] || BOOT_DIR="$MNT/boot" cp "$BOOT_DIR/kernel8.img" "$WORK/kernel8.img" || fail "kernel8.img not found in boot partition" +# the boot partition carries one initramfs per kernel flavor +# (initramfs7/initramfs8/initramfs_2712...); we boot kernel8.img so pick +# initramfs8, falling back to the first match on older layouts INITRD="" -if compgen -G "$BOOT_DIR/initramfs*" >/dev/null; then - cp "$BOOT_DIR"/initramfs* "$WORK/initrd" - INITRD="$WORK/initrd" -fi +for cand in "$BOOT_DIR/initramfs8" "$BOOT_DIR"/initramfs*; do + if [[ -f "$cand" ]]; then + cp "$cand" "$WORK/initrd" + INITRD="$WORK/initrd" + break + fi +done # keep a decompressed raw image copy for qemu (mount_image may have made one) if [[ "$(file -b --mime-type "$IMG")" == "application/x-xz" ]]; then RAW_IMG="$(dirname "$MNT")/image.img"