config: Add --kernel-cmd option in fs_bigLITTLE.py
authorChun-Chen TK Hsu <chunchenhsu@google.com>
Fri, 13 Sep 2019 04:25:18 +0000 (12:25 +0800)
committerChun-Chen TK Hsu <chunchenhsu@google.com>
Fri, 1 Nov 2019 09:25:32 +0000 (09:25 +0000)
Allow users to specify their custom Linux kernel command.

Change-Id: I1e88523c918369ea5dd86c088eca82471663e76a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20900
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>

configs/example/arm/fs_bigLITTLE.py

index 01619586f266711a0767e167abf67c2275bbb621..378ac0d03941ba4c031203dd4e35db6f7a78ea95 100644 (file)
@@ -196,6 +196,8 @@ def addOptions(parser):
                         "Default: %(default)s")
     parser.add_argument("--mem-size", type=str, default=default_mem_size,
                         help="System memory size")
+    parser.add_argument("--kernel-cmd", type=str, default=None,
+                        help="Custom Linux kernel command")
     parser.add_argument("-P", "--param", action="append", default=[],
         help="Set a SimObject parameter relative to the root node. "
              "An extended Python multi range slicing syntax can be used "
@@ -233,7 +235,10 @@ def build(options):
                           mem_size=options.mem_size)
 
     root.system = system
-    system.boot_osflags = " ".join(kernel_cmd)
+    if options.kernel_cmd:
+        system.boot_osflags = options.kernel_cmd
+    else:
+        system.boot_osflags = " ".join(kernel_cmd)
 
     if options.big_cpus + options.little_cpus == 0:
         m5.util.panic("Empty CPU clusters")