summaryrefslogtreecommitdiff
path: root/configs/common/Options.py
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas.sandberg@arm.com>2015-12-04 00:19:05 +0000
committerAndreas Sandberg <andreas.sandberg@arm.com>2015-12-04 00:19:05 +0000
commit6a05179e13a2ac8e72feb4bd00647013940d814e (patch)
tree92387dfcdde62731e981bfb5c40fb9c93049fcca /configs/common/Options.py
parentb3f7a628760eaf27dd4842fad1cca1517478aa73 (diff)
downloadgem5-6a05179e13a2ac8e72feb4bd00647013940d814e.tar.xz
arm, config: Automatically discover available platforms
Add support for automatically discover available platforms. The Python-side uses functionality similar to what we use when auto-detecting available CPU models. The machine IDs have been updated to match the platform configurations. If there isn't a matching machine ID, the configuration scripts default to -1 which Linux uses for device tree only platforms.
Diffstat (limited to 'configs/common/Options.py')
-rw-r--r--configs/common/Options.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/configs/common/Options.py b/configs/common/Options.py
index 1922f78a6..f4cf9fbd6 100644
--- a/configs/common/Options.py
+++ b/configs/common/Options.py
@@ -45,6 +45,7 @@ from Benchmarks import *
import CpuConfig
import MemConfig
+import PlatformConfig
from FSConfig import os_types
@@ -56,6 +57,10 @@ def _listMemTypes(option, opt, value, parser):
MemConfig.print_mem_list()
sys.exit(0)
+def _listPlatformTypes(option, opt, value, parser):
+ PlatformConfig.print_platform_list()
+ sys.exit(0)
+
def addCommonOptions(parser):
# system options
parser.add_option("--list-cpu-types",
@@ -263,8 +268,12 @@ def addFSOptions(parser):
if buildEnv['TARGET_ISA'] == "arm":
parser.add_option("--bare-metal", action="store_true",
help="Provide the raw system without the linux specific bits")
+ parser.add_option("--list-machine-types",
+ action="callback", callback=_listPlatformTypes,
+ help="List available platform types")
parser.add_option("--machine-type", action="store", type="choice",
- choices=ArmMachineType.map.keys(), default="VExpress_EMM")
+ choices=PlatformConfig.platform_names(),
+ default="VExpress_EMM")
parser.add_option("--dtb-filename", action="store", type="string",
help="Specifies device tree blob file to use with device-tree-"\
"enabled kernels")