diff options
author | Marc Bonnici <marc.bonnici@arm.com> | 2019-01-30 14:23:24 +0000 |
---|---|---|
committer | Marc Bonnici <marc.bonnici@arm.com> | 2019-01-31 09:44:30 +0000 |
commit | 4a9a2ad105b385c8ff7c7ae7eaf96d923ec65cd5 (patch) | |
tree | b3313f08540772632ca1dc4de3bf3b4dfacd22d1 | |
parent | 9f88459f56a71c361c37337afc1546d85e2866a1 (diff) |
fw/target/info: Fix for KernelConfig refactor
The Devlib KernelConfig object was refactored in commit
https://github.com/ARM-software/devlib/commit/f65130b7c7ecccfe2006e40d2735eeb86639772b
therefore update the way KernelConfig objects are deserialized to reflect the new
implementation and provide a conversion for PODs.
-rw-r--r-- | wa/framework/target/info.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/wa/framework/target/info.py b/wa/framework/target/info.py index 5b11f7d8..52b214c8 100644 --- a/wa/framework/target/info.py +++ b/wa/framework/target/info.py @@ -53,9 +53,9 @@ def kernel_version_from_pod(pod): def kernel_config_from_pod(pod): config = KernelConfig('') - config._config = pod['kernel_config'] + config.typed_config._config = pod['kernel_config'] lines = [] - for key, value in config._config.items(): + for key, value in config.items(): if value == 'n': lines.append('# {} is not set'.format(key)) else: @@ -313,7 +313,7 @@ def cache_target_info(target_info, overwrite=False): class TargetInfo(Podable): - _pod_serialization_version = 2 + _pod_serialization_version = 3 @staticmethod def from_pod(pod): @@ -401,3 +401,11 @@ class TargetInfo(Podable): pod['page_size_kb'] = pod.get('page_size_kb') pod['_pod_version'] = pod.get('format_version', 0) return pod + + @staticmethod + def _pod_upgrade_v3(pod): + config = {} + for key, value in pod['kernel_config'].items(): + config[key.upper()] = value + pod['kernel_config'] = config + return pod |