diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-11-11 11:24:08 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2024-11-11 11:24:08 -0700 |
commit | ee6e2f1f4fc8d438bfde7634e31657b52970fda9 (patch) | |
tree | 38b5366d82e15538ab3c5e4f9a3dd1dcac26ff20 /meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | |
parent | 03d3b2ce359a1c2959f04588cf2c4a1b0dcb4de8 (diff) | |
parent | 7c79383570dc4182bb21cdee68598ccf47403150 (diff) | |
download | meta-xilinx-ee6e2f1f4fc8d438bfde7634e31657b52970fda9.tar.gz |
Merge remote-tracking branch 'origin/rel-v2024.2' into scarthgap-next
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch')
-rw-r--r-- | meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch index f310edfa..77b13aa2 100644 --- a/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch +++ b/meta-xilinx-core/recipes-devtools/qemu/files/qemu-system-aarch64-multiarch | |||
@@ -35,14 +35,45 @@ if '-bootbin' in APU_args: | |||
35 | if PMU_args and PLM_args: | 35 | if PMU_args and PLM_args: |
36 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") | 36 | sys.exit("\nError: -pmu-args can not be used with -plm-args\n") |
37 | 37 | ||
38 | if ('--help' in APU_args) or (not PMU_args and not PLM_args): | 38 | help_options = ['-h', '-help', '--help'] |
39 | print("AMD FPGA QEMU multiarch wrapper\nVersion 2024.1\n\nUsage:") | 39 | def help(status): |
40 | print("AMD FPGA QEMU multiarch wrapper\nVersion 2024.2\n\nUsage:") | ||
40 | print(f" {sys.argv[0]} <APU options> [-pmu-args <pmu options>]") | 41 | print(f" {sys.argv[0]} <APU options> [-pmu-args <pmu options>]") |
41 | print(f" {sys.argv[0]} <APU options> [-plm-args <plm options>]\n") | 42 | print(f" {sys.argv[0]} <APU options> [-plm-args <plm options>]\n") |
42 | sys.exit(1) | 43 | if status == 0: |
44 | print(f"\n") | ||
45 | if set(PMU_args).intersection(set(help_options)): | ||
46 | print(f"PMU Options:\n") | ||
47 | pmu_args_s = ' '.join(PMU_args) | ||
48 | help_cmd = f'{binpath}/qemu-system-microblazeel {pmu_args_s}' | ||
49 | elif set(PLM_args).intersection(set(help_options)): | ||
50 | print(f"PLM Options:\n") | ||
51 | plm_args_s = ' '.join(PLM_args) | ||
52 | help_cmd = f'{binpath}/qemu-system-microblazeel {plm_args_s}' | ||
53 | else: | ||
54 | if not set(APU_args).intersection(set(help_options)): | ||
55 | APU_args.append('-help') | ||
56 | print(f"APU Options:\n") | ||
57 | print(f" -bootbin <boot.bin> - Use a boot.bin instead of individual firmware, device trees and bootloader\n") | ||
58 | apu_args_s = ' '.join(APU_args) | ||
59 | help_cmd = f'{binpath}/qemu-system-aarch64 {apu_args_s}' | ||
60 | |||
61 | print(f"{help_cmd}\n") | ||
62 | process = subprocess.Popen(help_cmd, shell=True, stderr=subprocess.PIPE) | ||
63 | status = process.wait() | ||
64 | sys.exit(status) | ||
65 | |||
66 | if set(APU_args).intersection(set(help_options)) or set(PMU_args).intersection(set(help_options)) or set(PLM_args).intersection(set(help_options)): | ||
67 | help(0) | ||
68 | |||
69 | if not PMU_args and not PLM_args: | ||
70 | help(1) | ||
43 | 71 | ||
44 | if PMU_args: | 72 | if PMU_args: |
45 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | 73 | try: |
74 | PMU_rom = PMU_args[PMU_args.index('-kernel')+1] | ||
75 | except: | ||
76 | PMU_rom = "" | ||
46 | 77 | ||
47 | if not os.path.exists(PMU_rom): | 78 | if not os.path.exists(PMU_rom): |
48 | sys.exit(f'\nERROR: Missing PMU ROM: {PMU_rom}' | 79 | sys.exit(f'\nERROR: Missing PMU ROM: {PMU_rom}' |