[PATCH 03/27] scripts: Update build-efi to support kvm
Simon Glass
sjg at chromium.org
Wed May 28 10:24:29 CEST 2025
This is a useful feature when booting the EFI app, so add this option to
the build-efi script too, matching the same option in build-qemu
Signed-off-by: Simon Glass <sjg at chromium.org>
---
scripts/build-efi | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/scripts/build-efi b/scripts/build-efi
index 443a5ca4908..4f0457e973c 100755
--- a/scripts/build-efi
+++ b/scripts/build-efi
@@ -40,6 +40,9 @@ def parse_args():
help='Run on ARM architecture')
parser.add_argument('-B', '--no-build', action='store_true',
help="Don't build (an existing build must be present")
+ parser.add_argument(
+ '-k', '--kvm', action='store_true',
+ help='Use KVM (Kernel-based Virtual Machine) for acceleration')
parser.add_argument('-K', '--kernel', action='store_true',
help='Add a kernel')
parser.add_argument('-O', '--old', action='store_true',
@@ -112,6 +115,9 @@ class BuildEfi:
extra += ['-device', 'virtio-gpu-pci']
extra += ['-serial', 'mon:stdio']
serial_msg = ''
+ if self.args.kvm:
+ extra.extend(['-enable-kvm', '-cpu', 'host'])
+
print(f'Running {qemu}{serial_msg}')
# Use 512MB since U-Boot EFI likes to have 256MB to play with
--
2.43.0
More information about the U-Boot
mailing list