
From: Simon Glass <sjg@chromium.org> Put this in the helper so that we can (later) have it show the correct error when the virtiofs daemon fails. Signed-off-by: Simon Glass <sjg@chromium.org> --- scripts/build-qemu | 12 ++++++------ scripts/build_helper.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/build-qemu b/scripts/build-qemu index f071ea071d4..6c1f10061c4 100755 --- a/scripts/build-qemu +++ b/scripts/build-qemu @@ -136,7 +136,7 @@ class BuildQemu: else: self.board = 'qemu_arm' default_bios = 'u-boot.bin' - self.qemu = 'qemu-system-arm' + self.helper.qemu = 'qemu-system-arm' self.qemu_extra.extend(['-machine', 'virt']) if not args.kvm: self.qemu_extra.extend(['-accel', 'tcg']) @@ -145,16 +145,16 @@ class BuildQemu: self.board = 'qemu_arm64_spl' else: self.board = 'qemu_arm64' - self.qemu = 'qemu-system-aarch64' + self.helper.qemu = 'qemu-system-aarch64' self.qemu_extra.extend(['-cpu', 'cortex-a57']) elif args.arch == 'x86': self.board = 'qemu-x86' default_bios = 'u-boot.rom' - self.qemu = 'qemu-system-i386' + self.helper.qemu = 'qemu-system-i386' self.qemu_extra.extend(['-machine', 'q35']) if self.helper.bitness == 64: self.board = 'qemu-x86_64' - self.qemu = 'qemu-system-x86_64' + self.helper.qemu = 'qemu-system-x86_64' else: raise ValueError(f"Invalid arch '{args.arch}'") @@ -259,7 +259,7 @@ class BuildQemu: if not self.bios.exists(): tout.fatal(f"Error: BIOS file '{self.bios}' not found") - qemu_cmd = [str(self.qemu)] + qemu_cmd = [str(self.helper.qemu)] if self.bios: qemu_cmd.extend(['-bios', str(self.bios)]) qemu_cmd.extend(self.kvm_params) @@ -343,7 +343,7 @@ class BuildQemu: try: subprocess.run(qemu_cmd, check=True) except FileNotFoundError: - tout.fatal(f"Error: QEMU executable '{self.qemu}' not found") + tout.fatal(f"Error: QEMU executable '{self.helper.qemu}' not found") except subprocess.CalledProcessError as e: tout.fatal(f'QEMU execution failed with exit code {e.returncode}') finally: diff --git a/scripts/build_helper.py b/scripts/build_helper.py index 4d70575166d..e3cf42593d9 100644 --- a/scripts/build_helper.py +++ b/scripts/build_helper.py @@ -21,7 +21,6 @@ OUR1_PATH = os.path.dirname(OUR_PATH) sys.path.insert(2, os.path.join(OUR1_PATH, 'tools')) sys.path.insert(2, os.path.join(OUR1_PATH, 'test/py/tests')) -from u_boot_pylib import command from u_boot_pylib import tools from u_boot_pylib import tout import fs_helper @@ -36,6 +35,7 @@ class Helper: self.args = args self.mem = '512' self.bitness = 32 if args.word_32bit else 64 + self.qemu = None if self.args.arch == 'arm': if self.bitness == 64: self.os_arch = 'arm64' -- 2.43.0