board/qemu: Generate sdcard.img with post-image
Some checks failed
Aimee OS/aimee-os/pipeline/head There was a failure building this commit

In order to test AimeeOS A/B filesystem updates, we need a full disk
image just like the Raspberry Pi variant has.
This commit is contained in:
2025-08-21 07:50:00 -05:00
parent 2fb6271d38
commit 7c0a899500
3 changed files with 27 additions and 0 deletions

22
board/qemu/post-image.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
set -e
BOARD_DIR=$(dirname "$0")
GRUBENV="${BINARIES_DIR}"/efi-part/EFI/BOOT/grubenv
genimage_tmp=$(mktemp -d)
trap 'rm -rf "${genimage_tmp}"' EXIT
mkdir -p "${genimage_tmp}"/rootfs "${genimage_tmp}"/tmp
grub-editenv "${GRUBENV}" set default=0
grub-editenv "${GRUBENV}" set timeout=3
cd "${BINARIES_DIR}"
genimage \
--rootpath "${genimage_tmp}/rootfs" \
--tmppath "${genimage_tmp}/tmp" \
--inputpath "${BINARIES_DIR}" \
--outputpath "${BINARIES_DIR}" \
--config "${BOARD_DIR}"/genimage.cfg