1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-07 05:31:21 +00:00

fw/target/info: Fix for KernelConfig refactor

The Devlib KernelConfig object was refactored in commit
f65130b7c7
therefore update the way KernelConfig objects are deserialized to reflect the new
implementation and provide a conversion for PODs.
This commit is contained in:
Marc Bonnici 2019-01-30 14:23:24 +00:00
parent 9f88459f56
commit 4a9a2ad105

View File

@ -53,9 +53,9 @@ def kernel_version_from_pod(pod):
def kernel_config_from_pod(pod): def kernel_config_from_pod(pod):
config = KernelConfig('') config = KernelConfig('')
config._config = pod['kernel_config'] config.typed_config._config = pod['kernel_config']
lines = [] lines = []
for key, value in config._config.items(): for key, value in config.items():
if value == 'n': if value == 'n':
lines.append('# {} is not set'.format(key)) lines.append('# {} is not set'.format(key))
else: else:
@ -313,7 +313,7 @@ def cache_target_info(target_info, overwrite=False):
class TargetInfo(Podable): class TargetInfo(Podable):
_pod_serialization_version = 2 _pod_serialization_version = 3
@staticmethod @staticmethod
def from_pod(pod): def from_pod(pod):
@ -401,3 +401,11 @@ class TargetInfo(Podable):
pod['page_size_kb'] = pod.get('page_size_kb') pod['page_size_kb'] = pod.get('page_size_kb')
pod['_pod_version'] = pod.get('format_version', 0) pod['_pod_version'] = pod.get('format_version', 0)
return pod 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