Hello Andreas Sandberg,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/c/public/gem5/+/15959
to review the following change.
Change subject: configs: Enable DTB autogeneration in starter_fs.py
......................................................................
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 <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
---
M configs/example/arm/starter_fs.py
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/configs/example/arm/starter_fs.py
b/configs/example/arm/starter_fs.py
index a199768..6e53d7b 100644
--- a/configs/example/arm/starter_fs.py
+++ b/configs/example/arm/starter_fs.py
@@ -49,6 +49,7 @@
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(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 @@
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 @@
# 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
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/15959
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I68fdc2a169bfa8e8657c9ed4e4e127957a08cca1
Gerrit-Change-Number: 15959
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev