manibuilder/anita: Use QEMU's -drive option over -hdb
Current QEMU wants us to specify the `raw` format explicitly and
limits write access otherwise. So use the more elaborate `-drive`
syntax.
Change-Id: If5f74592736ec4e0ef971a9a55bbdeb534358dd4
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/flashrom-stable/+/70915
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
diff --git a/util/manibuilder/Dockerfile.anita b/util/manibuilder/Dockerfile.anita
index 9bdc63f..2624d6c 100644
--- a/util/manibuilder/Dockerfile.anita
+++ b/util/manibuilder/Dockerfile.anita
@@ -37,7 +37,9 @@
boot ${INST_IMG}
RUN cd && dd if=/dev/zero bs=1M count=64 of=cache.img && \
- anita --vmm-args '-hdb cache.img' --persist \
+ anita --vmm-args \
+ '-drive file=cache.img,index=1,media=disk,format=raw' \
+ --persist \
--memory-size=${RUNTIME_MEM} --run \
"if [ \$(uname -m) = i386 -o \$(uname -m) = amd64 ]; then \
bdev=wd1d; \
diff --git a/util/manibuilder/anita-wrapper.sh b/util/manibuilder/anita-wrapper.sh
index 495069e..3da4455 100644
--- a/util/manibuilder/anita-wrapper.sh
+++ b/util/manibuilder/anita-wrapper.sh
@@ -8,7 +8,7 @@
[ -f ${CCACHE} ] || zcat cache.img.gz >${CCACHE}
-AV_ARGS="${ANITA_VMM_ARGS} -hdb ${CCACHE}"
+AV_ARGS="${ANITA_VMM_ARGS} -drive file=${CCACHE},index=1,media=disk,format=raw"
if [ $# -eq 0 ]; then
exec anita --vmm-args "${AV_ARGS}" --memory-size=${MEM_SIZE} \