summaryrefslogtreecommitdiff
path: root/configs/example
diff options
context:
space:
mode:
authorGiacomo Travaglini <giacomo.travaglini@arm.com>2019-01-25 15:05:37 +0000
committerGiacomo Travaglini <giacomo.travaglini@arm.com>2019-01-30 12:14:00 +0000
commitc6f5db8743f19b02a38146d9cf2a829883387008 (patch)
treeb351c4f27234bc8ec0302e1b05801b6431331106 /configs/example
parent00ef23b5700175830834f32cdd678e0b002a777d (diff)
downloadgem5-c6f5db8743f19b02a38146d9cf2a829883387008.tar.xz
configs: Enable DTB autogeneration in starter_fs.py
This patch is removing hardcoded default DTBs in favour of common DTB autogeneration. Change-Id: I68fdc2a169bfa8e8657c9ed4e4e127957a08cca1 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Reviewed-on: https://gem5-review.googlesource.com/c/15959 Reviewed-by: Ciro Santilli <ciro.santilli@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'configs/example')
-rw-r--r--configs/example/arm/starter_fs.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/configs/example/arm/starter_fs.py b/configs/example/arm/starter_fs.py
index a1997682e..6e53d7b8c 100644
--- a/configs/example/arm/starter_fs.py
+++ b/configs/example/arm/starter_fs.py
@@ -49,6 +49,7 @@ import os
import m5
from m5.util import addToPath
from m5.objects import *
+from m5.options import *
import argparse
m5.util.addToPath('../..')
@@ -92,12 +93,6 @@ def create_cow_image(name):
def create(args):
''' Create and configure the system object. '''
- if not args.dtb:
- dtb_file = SysPaths.binary("armv8_gem5_v1_%icpu.%s.dtb" %
- (args.num_cores, default_dist_version))
- else:
- dtb_file = args.dtb
-
if args.script and not os.path.isfile(args.script):
print("Error: Bootscript %s does not exist" % args.script)
sys.exit(1)
@@ -110,7 +105,6 @@ def create(args):
system = devices.SimpleSystem(want_caches,
args.mem_size,
mem_mode=mem_mode,
- dtb_filename=dtb_file,
kernel=SysPaths.binary(args.kernel),
readfile=args.script)
@@ -153,6 +147,12 @@ def create(args):
# Setup gem5's minimal Linux boot loader.
system.realview.setupBootLoader(system.membus, system, SysPaths.binary)
+ if args.dtb:
+ system.dtb_filename = args.dtb
+ else:
+ # No DTB specified: autogenerate DTB
+ system.generateDtb(m5.options.outdir, 'system.dtb')
+
# Linux boot command flags
kernel_cmd = [
# Tell Linux to use the simulated serial port as a console