2
0
mirror of https://opendev.org/x/pyghmi synced 2026-10-06 17:46:59 +00:00

Provide build id values for SMMV3 firmware

Provide an OEM method to get Oem data from firmware into
the normalized form, and use that to hook the SMM
firmware information.

Change-Id: I7028c510afebf103fb6e0aaabdf085de3472eef2
This commit is contained in:
Jarrod Johnson
2025-03-04 09:06:13 -05:00
parent 949cf8ea9b
commit c70cc5f6a5
3 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -1115,7 +1115,7 @@ class Command(object):
yield res
def _extract_fwinfo(self, inf):
currinf = {}
currinf = self._oem._extract_fwinfo(inf)
fwi, url = inf
fwname = fwi.get('Name', 'Unknown')
if fwname in self._fwnamemap:
@@ -1129,6 +1129,7 @@ class Command(object):
currinf['id'] = fwi.get('Id', None)
currinf['version'] = fwi.get('Version', 'Unknown')
currinf['date'] = parse_time(fwi.get('ReleaseDate', ''))
currinf['software_id'] = fwi.get('SoftwareId', '')
if not (currinf['version'] or currinf['date']):
return None, None
# TODO(Jarrod Johnson): OEM extended data with buildid
+3
View File
@@ -650,6 +650,9 @@ class OEMHandler(object):
return {}
def _extract_fwinfo(self, inf):
return {}
def get_firmware_inventory(self, components, fishclient):
return []
+9
View File
@@ -104,6 +104,15 @@ class OEMHandler(generic.OEMHandler):
progress({'phase': 'complete'})
return savefile
def _extract_fwinfo(self, inf):
fwi, url = inf
currinf = {}
buildid = fwi.get('Oem', {}).get('Lenovo', {}).get('ExtendedVersion', None)
if buildid:
currinf['build'] = buildid
return currinf
def _get_node_info(self):
nodeinfo = self._varsysinfo
if not nodeinfo: