diff options
author | Iru Cai <mytbk920423@gmail.com> | 2021-03-29 14:01:39 +0800 |
---|---|---|
committer | Iru Cai <mytbk920423@gmail.com> | 2021-03-29 14:01:39 +0800 |
commit | a42acb2e3d3f823e8db5725eb543e74e9cae32bc (patch) | |
tree | 072f27bf357e5470f2bb94d7854b2d37cbd53ad3 | |
parent | 45ba5415a5bca288d1edd0e22f2b486415a02afa (diff) | |
download | liveusb-builder-a42acb2e3d3f823e8db5725eb543e74e9cae32bc.tar.xz |
testusb.sh: support UEFI
-rwxr-xr-x | testusb.sh | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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" |