changeset ccf744c70583 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ccf744c70583
description:
Ruby FS: Add the options for kernel and simulation script
These options were missing from the script ruby_fs.py. This patch adds
these
options to the script.
diffstat:
configs/example/ruby_fs.py | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diffs (53 lines):
diff -r 690417d95f6d -r ccf744c70583 configs/example/ruby_fs.py
--- a/configs/example/ruby_fs.py Fri Oct 28 13:04:33 2011 -0500
+++ b/configs/example/ruby_fs.py Sat Oct 29 16:54:57 2011 -0500
@@ -30,18 +30,18 @@
# Full system configuraiton for ruby
#
+import optparse
import os
-import optparse
import sys
from os.path import join as joinpath
import m5
from m5.defines import buildEnv
from m5.objects import *
-from m5.util import addToPath, panic
+from m5.util import addToPath, fatal
if not buildEnv['FULL_SYSTEM']:
- panic("This script requires full-system mode (*_FS).")
+ fatal("This script requires full-system mode (*_FS).")
addToPath('../common')
addToPath('../ruby')
@@ -60,7 +60,9 @@
m5_root = os.path.dirname(config_root)
parser = optparse.OptionParser()
-
+# System options
+parser.add_option("--kernel", action="store", type="string")
+parser.add_option("--script", action="store", type="string")
# Benchmark options
parser.add_option("-b", "--benchmark", action="store", type="string",
dest="benchmark",
@@ -117,9 +119,15 @@
else:
fatal("incapable of building non-alpha or non-x86 full system!")
+if options.kernel is not None:
+ system.kernel = binary(options.kernel)
+
+if options.script is not None:
+ system.readfile = options.script
+
+system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
Ruby.create_system(options, system, system.piobus, system._dma_devices)
-system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
for (i, cpu) in enumerate(system.cpu):
#
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev