diff --git a/scripts/vm-util.py b/scripts/vm-util.py index 855078886..199089863 100755 --- a/scripts/vm-util.py +++ b/scripts/vm-util.py @@ -128,6 +128,11 @@ def parse_device(yml, *, bus_id=None, device_id=None): return args def do_qemu(args): + # Default to --uefi for RISC-V. + if args.arch == "riscv64": + if args.uefi is None: + args.uefi = True + qemu = os.environ.get("QEMU") if not qemu: @@ -466,7 +471,7 @@ def do_qemu(args): qemu_parser.add_argument("--usb-passthrough-pcap", type=str, action='append') qemu_parser.add_argument("--usb-redir", type=str, action='append') qemu_parser.add_argument("--usb-serial", action='store_true') -qemu_parser.add_argument("--uefi", action="store_true") +qemu_parser.add_argument("--uefi", action=argparse.BooleanOptionalAction) qemu_parser.add_argument("--ovmf-logs", action="store_true") qemu_parser.add_argument("--cmd", type=str) qemu_parser.add_argument("--qmp", action="store_true")