From 6a05179e13a2ac8e72feb4bd00647013940d814e Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Fri, 4 Dec 2015 00:19:05 +0000 Subject: 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. --- configs/common/Options.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'configs/common/Options.py') 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") -- cgit v1.2.3