[PATCH 07/27] scripts: Update build-efi to support debugging with QEMU
Simon Glass
sjg at chromium.org
Wed May 28 10:24:33 CEST 2025
Add a -g option to tell QEMU to stop and wait for gdb to connect.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
scripts/build-efi | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/scripts/build-efi b/scripts/build-efi
index 5a6eef450d4..33702953c32 100755
--- a/scripts/build-efi
+++ b/scripts/build-efi
@@ -44,6 +44,8 @@ def parse_args():
help="Don't build (an existing build must be present")
parser.add_argument('-d', '--disk',
help='Root disk image file to use with QEMU')
+ parser.add_argument('-g', '--debug', action='store_true',
+ help="Run QEMU with gdb")
parser.add_argument(
'-k', '--kvm', action='store_true',
help='Use KVM (Kernel-based Virtual Machine) for acceleration')
@@ -162,6 +164,9 @@ class BuildEfi:
else:
mem = '512'
+ if self.args.debug:
+ extra.extend(['-s', '-S'])
+
cmd = [qemu]
cmd += '-m', mem
cmd += '-nic', 'none'
--
2.43.0
More information about the U-Boot
mailing list