summaryrefslogtreecommitdiff
path: root/configs/common/Benchmarks.py
diff options
context:
space:
mode:
authorCurtis Dunham <Curtis.Dunham@arm.com>2015-01-16 14:12:03 -0600
committerCurtis Dunham <Curtis.Dunham@arm.com>2015-01-16 14:12:03 -0600
commit07ce60bdfa57eedf00f533704b5a2da3fa01b553 (patch)
tree7127baf93ec9357f0d48fd00c8e5c529478e2e59 /configs/common/Benchmarks.py
parent5bfa7e3d59138b0b440e5b2e67e8077c1d59c34b (diff)
downloadgem5-07ce60bdfa57eedf00f533704b5a2da3fa01b553.tar.xz
config: add --root-device machine parameter
In case /dev/sda1 is not actually the boot partition for an image, we can override it on the command line or in a benchmark definition.
Diffstat (limited to 'configs/common/Benchmarks.py')
-rw-r--r--configs/common/Benchmarks.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/configs/common/Benchmarks.py b/configs/common/Benchmarks.py
index 44cbef976..37343dfad 100644
--- a/configs/common/Benchmarks.py
+++ b/configs/common/Benchmarks.py
@@ -31,10 +31,11 @@ from os import environ as env
from m5.defines import buildEnv
class SysConfig:
- def __init__(self, script=None, mem=None, disk=None):
+ def __init__(self, script=None, mem=None, disk=None, rootdev=None):
self.scriptname = script
self.diskname = disk
self.memsize = mem
+ self.root = rootdev
def script(self):
if self.scriptname:
@@ -62,6 +63,12 @@ class SysConfig:
buildEnv['TARGET_ISA']
exit(1)
+ def rootdev(self):
+ if self.root:
+ return self.root
+ else:
+ return '/dev/sda1'
+
# Benchmarks are defined as a key in a dict which is a list of SysConfigs
# The first defined machine is the test system, the others are driving systems