summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2021-03-29 14:01:39 +0800
committerIru Cai <mytbk920423@gmail.com>2021-03-29 14:01:39 +0800
commita42acb2e3d3f823e8db5725eb543e74e9cae32bc (patch)
tree072f27bf357e5470f2bb94d7854b2d37cbd53ad3
parent45ba5415a5bca288d1edd0e22f2b486415a02afa (diff)
downloadliveusb-builder-a42acb2e3d3f823e8db5725eb543e74e9cae32bc.tar.xz
testusb.sh: support UEFI
-rwxr-xr-xtestusb.sh9
1 files changed, 8 insertions, 1 deletions
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"