scripts: build-efi: Use -a instead of -A

It seems better to specify the arch rather than using somewhat cryptic
flags. The build-qemu scripts uses -a (for Architecture) so do the same
for build-efi

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
Simon Glass
2025-06-12 06:22:49 -06:00
parent 12e532f710
commit 686ee0523a
3 changed files with 5 additions and 7 deletions

View File

@@ -37,8 +37,6 @@ def parse_args():
parser = ArgumentParser(
epilog='Script for running U-Boot as an EFI app/payload')
build_helper.add_common_args(parser)
parser.add_argument('-A', '--arm', action='store_true',
help='Run on ARM architecture')
parser.add_argument('-g', '--debug', action='store_true',
help="Run QEMU with gdb")
parser.add_argument('-K', '--kernel', action='store_true',
@@ -76,7 +74,7 @@ class BuildEfi:
"""
extra = []
efi_dir = self.helper.get_setting('efi_dir')
if self.args.arm:
if self.args.arch == 'arm':
os_arch = 'arm64'
qemu_arch = 'aarch64'
extra += ['--machine', 'virt', '-cpu', 'max']
@@ -112,7 +110,7 @@ class BuildEfi:
extra += ['-display', 'none', '-serial', 'mon:stdio']
serial_msg = ' (Ctrl-a x to quit)'
else:
if self.args.arm:
if self.args.arch == 'arm':
extra += ['-device', 'virtio-gpu-pci']
extra += ['-serial', 'mon:stdio']
serial_msg = ''
@@ -184,7 +182,7 @@ class BuildEfi:
"""This does all the work"""
args = self.args
bitness = 32 if args.word_32bit else 64
arch = 'arm' if args.arm else 'x86'
arch = 'arm' if self.args.arch == 'arm' else 'x86'
build_type = 'payload' if args.payload else 'app'
build = f'efi-{arch}_{build_type}{bitness}'

View File

@@ -41,8 +41,6 @@ def parse_args():
description='Build and/or run U-Boot with QEMU',
formatter_class=argparse.RawTextHelpFormatter)
build_helper.add_common_args(parser)
parser.add_argument('-a', '--arch', default='arm', choices=['arm', 'x86'],
help='Select architecture (arm, x86) Default: arm')
parser.add_argument('-C', '--enable-console', action='store_true',
help="Enable linux console (x86 only)")
parser.add_argument('-D', '--share-dir', metavar='DIR',

View File

@@ -115,6 +115,8 @@ def add_common_args(parser):
Args:
parser (argparse.ArgumentParser): Parser to modify
"""
parser.add_argument('-a', '--arch', default='arm', choices=['arm', 'x86'],
help='Select architecture (arm, x86) Default: arm')
parser.add_argument('-B', '--no-build', action='store_true',
help="Don't build; assume a build exists")
parser.add_argument('-d', '--disk',