Skip to content

Commit

Permalink
push smp args
Browse files Browse the repository at this point in the history
  • Loading branch information
CtrlZ233 committed Oct 14, 2023
1 parent 41cf8d7 commit 672af85
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cmake-tool/simulate_scripts/simulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ def parse_args():
help="Kernel file to pass onto QEMU", default="@QEMU_SIM_KERNEL_FILE@")
parser.add_argument('-i', '--initrd', dest='qemu_sim_initrd_file', type=str,
help="Initrd file to pass onto QEMU", default="@QEMU_SIM_INITRD_FILE@")
parser.add_argument("-n", '--dry-run', dest='dry_run', action='store_true',
help="Output command for QEMU (and GDB), but do not execute it")
parser.add_argument('--extra-qemu-args', dest='qemu_sim_extra_args', type=str,
help="Additional arguments to pass onto QEMU", default="@QEMU_SIM_EXTRA_ARGS@")
parser.add_argument('--extra-cpu-opts', dest='qemu_sim_extra_cpu_opts', type=str,
help="Additional cpu options to append onto the existing CPU options",
default="")
parser.add_argument('--cpu-num', dest='cpu_num', type=int,
help="cpu num",
default="1")
args = parser.parse_args()
return args

Expand Down Expand Up @@ -81,11 +82,9 @@ def notice(message):
args.qemu_sim_serial_opt, qemu_sim_mem_size_entry, args.qemu_sim_extra_args, qemu_sim_images_entry,
qemu_gdbserver_command]
qemu_simulate_command = " ".join(qemu_simulate_command_opts)
qemu_simulate_command = qemu_simulate_command + "-smp " + str(args.cpu_num)

notice('QEMU command: ' + qemu_simulate_command)

if args.dry_run:
exit()
notice(qemu_simulate_command)

if qemu_gdbserver_command != "":
notice('waiting for GDB on port 1234...')
Expand Down

0 comments on commit 672af85

Please sign in to comment.