mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-01 05:13:01 +02:00
board/common: don't regenerate disk image when starting qemu
This fixes an annoying problem with `make run` when set to boot with a qcow2 disk image. By default the disk image was recreated every time the qemu.sh script was called. Also, add image check to enforce regen if broken. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -273,8 +273,16 @@ gdb_args()
|
||||
run_qemu()
|
||||
{
|
||||
if [ "$CONFIG_QEMU_ROOTFS_VSCSI" = "y" ]; then
|
||||
qemu-img create -f qcow2 -o backing_file=$CONFIG_QEMU_ROOTFS -F raw $CONFIG_QEMU_ROOTFS.qcow2 > /dev/null
|
||||
if ! qemu-img check "${CONFIG_QEMU_ROOTFS}.qcow2"; then
|
||||
rm -f "${CONFIG_QEMU_ROOTFS}.qcow2"
|
||||
fi
|
||||
if [ ! -f "${CONFIG_QEMU_ROOTFS}.qcow2" ]; then
|
||||
echo "Creating qcow2 disk image for Qemu ..."
|
||||
qemu-img create -f qcow2 -o backing_file="$CONFIG_QEMU_ROOTFS" \
|
||||
-F raw "${CONFIG_QEMU_ROOTFS}.qcow2" > /dev/null
|
||||
fi
|
||||
fi
|
||||
|
||||
local qemu
|
||||
read qemu <<EOF
|
||||
$CONFIG_QEMU_MACHINE -m $CONFIG_QEMU_MACHINE_RAM \
|
||||
|
||||
Reference in New Issue
Block a user