buildman: Extract arch fixups from scan() into separate function
Move the architecture fixup logic (aarch64 and riscv adjustments) into a new _fixup_arch() method to reduce complexity of scan(). Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com> Signed-off-by: Simon Glass <simon.glass@canonical.com>
This commit is contained in:
@@ -301,6 +301,19 @@ class KconfigScanner:
|
||||
|
||||
params['target'] = expect_target
|
||||
|
||||
self._fixup_arch(params)
|
||||
|
||||
return params, warnings
|
||||
|
||||
def _fixup_arch(self, params):
|
||||
"""Fix up architecture names
|
||||
|
||||
Handle cases where the architecture name needs adjustment based on
|
||||
CPU type or other configuration.
|
||||
|
||||
Args:
|
||||
params (dict): Board parameters to update in place
|
||||
"""
|
||||
# fix-up for aarch64
|
||||
if params['arch'] == 'arm' and params['cpu'] == 'armv8':
|
||||
params['arch'] = 'aarch64'
|
||||
@@ -316,8 +329,6 @@ class KconfigScanner:
|
||||
else:
|
||||
params['arch'] = 'riscv64'
|
||||
|
||||
return params, warnings
|
||||
|
||||
|
||||
class MaintainersDatabase:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user