class Board:
"""A particular board that we can build"""
- def __init__(self, status, arch, cpu, soc, vendor, board_name, target, options):
+ def __init__(self, status, arch, cpu, soc, vendor, board_name, target, cfg_name):
"""Create a new board type.
Args:
vendor: Name of vendor (e.g. armltd)
board_name: Name of board (e.g. integrator)
target: Target name (use make <target>_defconfig to configure)
- options: board-specific options (e.g. integratorcp:CM1136)
+ cfg_name: Config name
"""
self.target = target
self.arch = arch
self.board_name = board_name
self.vendor = vendor
self.soc = soc
- self.options = options
+ self.cfg_name = cfg_name
self.props = [self.target, self.arch, self.cpu, self.board_name,
- self.vendor, self.soc, self.options]
+ self.vendor, self.soc, self.cfg_name]
self.build_it = False
# List of boards
# Automatically generated by {__file__}: don't edit
#
-# Status, Arch, CPU, SoC, Vendor, Board, Target, Options, Maintainers
+# Status, Arch, CPU, SoC, Vendor, Board, Target, Config, Maintainers
'''
# was generated
with open(output, encoding="utf-8") as inf:
for line in inf:
+ if 'Options,' in line:
+ return False
if line[0] == '#' or line == '\n':
continue
defconfig = line.split()[6] + '_defconfig'
'vendor' : 'SYS_VENDOR',
'board' : 'SYS_BOARD',
'config' : 'SYS_CONFIG_NAME',
- 'options' : 'SYS_EXTRA_OPTIONS'
+ # 'target' is added later
}
def __init__(self):
defconfig (str): path to the defconfig file to be processed
Returns:
- Dictionary of board parameters. It has a form:
+ A dictionary of board parameters. It has a form of:
{
'arch': <arch_name>,
'cpu': <cpu_name>,
'board': <board_name>,
'target': <target_name>,
'config': <config_header_name>,
- 'options': <extra_options>
}
"""
# strip special prefixes and save it in a temporary file
if params['arch'] == 'arm' and params['cpu'] == 'armv8':
params['arch'] = 'aarch64'
- # fix-up options field. It should have the form:
- # <config name>[:comma separated config options]
- if params['options'] != '-':
- params['options'] = params['config'] + ':' + \
- params['options'].replace(r'\"', '"')
- elif params['config'] != params['target']:
- params['options'] = params['config']
-
return params
output (str): The path to the output file
"""
fields = ('status', 'arch', 'cpu', 'soc', 'vendor', 'board', 'target',
- 'options', 'maintainers')
+ 'config', 'maintainers')
# First, decide the width of each column
max_length = {f: 0 for f in fields}