configs: Add dtb-gen to fs_bigLITTLE.py
authorYu-hsin Wang <yuhsingw@google.com>
Tue, 3 Nov 2020 01:49:48 +0000 (09:49 +0800)
committerYu-hsin Wang <yuhsingw@google.com>
Wed, 4 Nov 2020 01:02:22 +0000 (01:02 +0000)
Change-Id: I1956e98d0fa507cc342e926b61d69fb967a64556
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36955
Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
configs/example/arm/fs_bigLITTLE.py

index 29f5c6b78f7a9739c47e0e74b9696d082accc7c4..76de0ebd11668ec9e331c6e9c7d3485d0c699d56 100644 (file)
@@ -213,6 +213,8 @@ def addOptions(parser):
              "only parameters of its children.")
     parser.add_argument("--vio-9p", action="store_true",
                         help=Options.vio_9p_help)
+    parser.add_argument("--dtb-gen", action="store_true",
+                        help="Doesn't run simulation, it generates a DTB only")
     return parser
 
 def build(options):
@@ -367,6 +369,10 @@ def run(checkpoint_dir=m5.options.outdir):
     sys.exit(event.getCode())
 
 
+def generateDtb(root):
+    root.system.generateDtb(os.path.join(m5.options.outdir, "system.dtb"))
+
+
 def main():
     parser = argparse.ArgumentParser(
         description="Generic ARM big.LITTLE configuration")
@@ -375,7 +381,10 @@ def main():
     root = build(options)
     root.apply_config(options.param)
     instantiate(options)
-    run()
+    if options.dtb_gen:
+      generateDtb(root)
+    else:
+      run()
 
 
 if __name__ == "__m5_main__":