From 07ce60bdfa57eedf00f533704b5a2da3fa01b553 Mon Sep 17 00:00:00 2001 From: Curtis Dunham Date: Fri, 16 Jan 2015 14:12:03 -0600 Subject: 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. --- configs/common/Benchmarks.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'configs/common/Benchmarks.py') 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 -- cgit v1.2.3