mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +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:
parent
9f88459f56
commit
4a9a2ad105
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user