From a42acb2e3d3f823e8db5725eb543e74e9cae32bc Mon Sep 17 00:00:00 2001 From: Iru Cai Date: Mon, 29 Mar 2021 14:01:39 +0800 Subject: testusb.sh: support UEFI --- testusb.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/testusb.sh b/testusb.sh index bed799b..2cca502 100755 --- a/testusb.sh +++ b/testusb.sh @@ -3,4 +3,11 @@ # SPDX-License-Identifier: GPL-3.0-or-later # Test the live USB in QEMU, you need to run this script as root -qemu-system-x86_64 -enable-kvm -cpu host -m 2G -drive "file=$1,format=raw" +if [ "$1" == uefi ]; then + bios=(-bios /usr/share/edk2-ovmf/x64/OVMF.fd) + shift +else + bios=() +fi + +qemu-system-x86_64 -enable-kvm -cpu host -m 2G "${bios[@]}" -drive "file=$1,format=raw" -- cgit v1.2.3