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

In order to test AimeeOS A/B filesystem updates, we need a full disk
image just like the Raspberry Pi variant has.
Dustin 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

4
ci/Jenkinsfile vendored
View File

@ -53,8 +53,12 @@ pipeline {
archiveArtifacts('.config') archiveArtifacts('.config')
} }
dir('_build/images') { dir('_build/images') {
sh 'zstd -f firmware.img'
sh 'zstd -f sdcard.img'
archiveArtifacts([ archiveArtifacts([
'firmware.img.zst',
'rootfs.squashfs', 'rootfs.squashfs',
'sdcard.img.zst',
].join(',')) ].join(','))
} }
} }

View File

@ -3,6 +3,7 @@ BR2_TOOLCHAIN_BUILDROOT_VENDOR="aimeeos"
BR2_GLOBAL_PATCH_DIR="board/qemu/patches" BR2_GLOBAL_PATCH_DIR="board/qemu/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_INIT_SYSTEMD=y BR2_INIT_SYSTEMD=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(BR2_EXTERNAL_AIMEEOS_PATH)/board/qemu/post-image.sh"
# BR2_INIT_SYSTEMD_POPULATE_TMPFILES is not set # BR2_INIT_SYSTEMD_POPULATE_TMPFILES is not set
# BR2_TARGET_ENABLE_ROOT_LOGIN is not set # BR2_TARGET_ENABLE_ROOT_LOGIN is not set
# BR2_TARGET_GENERIC_GETTY is not set # BR2_TARGET_GENERIC_GETTY is not set