Files
buildroot/board/qemu/x86_64-efi/post-image.sh
Scott Fan dd84d05843 configs/qemu_x86_64_efi_defconfig: new defconfig
This defconfig enables EDK2 UEFI firmware and grub2 x86_64-efi boot
of a Linux Kernel in QEMU virt machine.

Signed-off-by: Scott Fan <fancp2007@gmail.com>
[Julien:
 - add .in suffix to genimage.cfg and grub.cfg template file names
 - change UUID_TMP template variable to %PARTUUID%
 - use human readable partition-type-uuid in genimage.cfg.in
 - break long qemu-system-x86_64 command line in readme.txt
 - add "-serial stdio" in readme.txt qemu command line for CI
]
Signed-off-by: Julien Olivain <ju.o@free.fr>
2025-09-27 14:52:10 +02:00

9 lines
409 B
Bash
Executable File

#!/bin/sh
BOARD_DIR="$(dirname "$0")"
PARTUUID=$(dumpe2fs "${BINARIES_DIR}/rootfs.ext2" 2>/dev/null | sed -n 's/^Filesystem UUID: *\(.*\)/\1/p')
sed "s/%PARTUUID%/$PARTUUID/g" "${BOARD_DIR}/grub.cfg.in" > "${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg"
sed "s/%PARTUUID%/$PARTUUID/g" "${BOARD_DIR}/genimage.cfg.in" > "${BINARIES_DIR}/genimage.cfg"
support/scripts/genimage.sh -c "${BINARIES_DIR}/genimage.cfg"