From eabd4f3a9b5cc48696b40bf0dfbe896a5ee21695 Mon Sep 17 00:00:00 2001 From: Giacomo Travaglini Date: Fri, 24 Apr 2020 15:59:25 +0100 Subject: [PATCH] configs: Do not require args.kernel to be set in baremetal.py This is allowing to us run baremetal.py with the --dtb-gen option without needing to specify a --kernel argument Change-Id: I98f1bc865d2f4e2230b1a85453efe83d95ec8a55 Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/28148 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- configs/example/arm/baremetal.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 24f40ec2e..412625d57 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -89,6 +89,8 @@ def create(args): print("Error: Bootscript %s does not exist" % args.readfile) sys.exit(1) + object_file = args.kernel if args.kernel else "" + cpu_class = cpu_types[args.cpu][0] mem_mode = cpu_class.memory_mode() # Only simulate caches when using a timing CPU (e.g., the HPI model) @@ -111,7 +113,7 @@ def create(args): stdout=args.semi_stdout, stderr=args.semi_stderr, files_root_dir=args.semi_path, - cmd_line = " ".join([ args.kernel ] + args.args) + cmd_line = " ".join([ object_file ] + args.args) ) # Add the PCI devices we need for this system. The base system @@ -162,7 +164,7 @@ def create(args): workload_class = workloads.workload_list.get(args.workload) system.workload = workload_class( - args.kernel, system) + object_file, system) return system -- 2.30.2