From 142ab40c4b57315e20c924d0615470ee24f46d9e Mon Sep 17 00:00:00 2001 From: Chris Emmons Date: Thu, 19 Mar 2015 04:06:14 -0400 Subject: config: Specify OS type and release on command line This patch enables users to speficy --os-type on the command line. This option is used to take specific actions for an OS type, such as changing the kernel command line. This patch is part of the Android KitKat enablement. --- configs/common/Benchmarks.py | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'configs/common/Benchmarks.py') diff --git a/configs/common/Benchmarks.py b/configs/common/Benchmarks.py index 37343dfad..bf0a2ad88 100644 --- a/configs/common/Benchmarks.py +++ b/configs/common/Benchmarks.py @@ -31,11 +31,13 @@ from os import environ as env from m5.defines import buildEnv class SysConfig: - def __init__(self, script=None, mem=None, disk=None, rootdev=None): + def __init__(self, script=None, mem=None, disk=None, rootdev=None, + os_type='linux'): self.scriptname = script self.diskname = disk self.memsize = mem self.root = rootdev + self.ostype = os_type def script(self): if self.scriptname: @@ -69,6 +71,9 @@ class SysConfig: else: return '/dev/sda1' + def os_type(self): + return self.ostype + # 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 @@ -119,13 +124,17 @@ Benchmarks = { 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')], 'ArmAndroid-GB': [SysConfig('null.rcS', '256MB', - 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.clean.img')], + 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.clean.img', + None, 'android-gingerbread')], 'bbench-gb': [SysConfig('bbench-gb.rcS', '256MB', - 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img')], + 'ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img', + None, 'android-gingerbread')], 'ArmAndroid-ICS': [SysConfig('null.rcS', '256MB', - 'ARMv7a-ICS-Android.SMP.nolock.clean.img')], + 'ARMv7a-ICS-Android.SMP.nolock.clean.img', + None, 'android-ics')], 'bbench-ics': [SysConfig('bbench-ics.rcS', '256MB', - 'ARMv7a-ICS-Android.SMP.nolock.img')] + 'ARMv7a-ICS-Android.SMP.nolock.img', + None, 'android-ics')] } benchs = Benchmarks.keys() -- cgit v1.2.3