Config: Add command line options for disk image and memory size

Added the options to Options.py for FS mode with backward compatibility. It is
good to provide an option to specify the disk image and the memory size from
command line since a lot of disk images are created to support different
benchmark suites as well as per user needs. Change in program also leads to
change in memory requirements. These options provide the interface to provide
both disk image and memory size from the command line and gives more
flexibility.
This commit is contained in:
Jayneel Gandhi 2012-04-16 17:51:26 -05:00
parent a5187f9d96
commit b5b9d2ad3e
3 changed files with 11 additions and 3 deletions

View file

@ -171,3 +171,11 @@ def addFSOptions(parser):
parser.add_option("--etherdump", action="store", type="string", dest="etherdump", parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
help="Specify the filename to dump a pcap capture of the" \ help="Specify the filename to dump a pcap capture of the" \
"ethernet traffic") "ethernet traffic")
# Disk Image Options
parser.add_option("--disk-image", action="store", type="string", default=None,
help="Path to the disk image to use.")
# Memory Size Options
parser.add_option("--mem-size", action="store", type="string", default=None,
help="Path to the disk image to use.")

View file

@ -86,9 +86,9 @@ if options.benchmark:
sys.exit(1) sys.exit(1)
else: else:
if options.dual: if options.dual:
bm = [SysConfig(), SysConfig()] bm = [SysConfig(disk=options.disk_image, mem=options.mem_size), SysConfig(disk=options.disk_image, mem=options.mem_size)]
else: else:
bm = [SysConfig()] bm = [SysConfig(disk=options.disk_image, mem=options.mem_size)]
np = options.num_cpus np = options.num_cpus

View file

@ -71,7 +71,7 @@ if options.benchmark:
print "Valid benchmarks are: %s" % DefinedBenchmarks print "Valid benchmarks are: %s" % DefinedBenchmarks
sys.exit(1) sys.exit(1)
else: else:
bm = [SysConfig()] bm = [SysConfig(disk=options.disk_image, mem=options.mem_size)]
# Check for timing mode because ruby does not support atomic accesses # Check for timing mode because ruby does not support atomic accesses
if not (options.cpu_type == "detailed" or options.cpu_type == "timing"): if not (options.cpu_type == "detailed" or options.cpu_type == "timing"):