[Concept,11/12] scripts: build-qemu: Add --no-spl option for x86_64
Commit Message
From: Simon Glass <simon.glass@canonical.com>
Add a -X/--no-spl flag that selects the qemu-x86_64_nospl
board when running with the x86 64-bit configuration.
Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
---
scripts/build-qemu | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -49,6 +49,8 @@ def parse_args():
help='Run qboot instead of U-Boot')
parser.add_argument('-x', '--xpl', action='store_true',
help='Use xPL image rather than U-Boot proper')
+ parser.add_argument('-X', '--no-spl', action='store_true',
+ help='Use no-SPL build (x86_64 only)')
parser.add_argument('-T', '--tkey', action='store_true',
help='Enable TKey USB passthrough for testing')
parser.add_argument(
@@ -162,8 +164,13 @@ class BuildQemu:
if args.tkey:
# Pass through TKey USB device to QEMU
self.qemu_extra.extend(['-device', 'usb-host,vendorid=0x1207,productid=0x8887'])
+ if args.no_spl and self.helper.bitness != 64:
+ raise ValueError('-X/--no-spl requires 64-bit mode (cannot be used with -w)')
if self.helper.bitness == 64:
- self.board = 'qemu-x86_64'
+ if args.no_spl:
+ self.board = 'qemu-x86_64_nospl'
+ else:
+ self.board = 'qemu-x86_64'
self.helper.qemu = 'qemu-system-x86_64'
else:
raise ValueError(f"Invalid arch '{args.arch}'")