smbios-mdr: Expose Firmware Inventory Information
SMBIOS Type 45 defines the data structure to expose Firmware
Inventory information. Added patch which exposes the same
on the DBus.
Introduced fw-inventory-dbus meson option which by default,
will be disabled. When enabled fw-inventory is exposed to dbus
Introduced expose-firmware-component-name meson option which
by default, will be disabled. When enabled fw-component name is
exposed as dbus object
Tested:
1) No crash is seen when firmware is flashed with change
2) Firmware Inventory information is available under dbus tree
```
busctl tree xyz.openbmc_project.Smbios.MDR_V2
`- /xyz
`- /xyz/openbmc_project
|- /xyz/openbmc_project/Smbios
| `- /xyz/openbmc_project/Smbios/MDR_V2
`- /xyz/openbmc_project/software
`- /xyz/openbmc_project/software/UEFI
```
Change-Id: If5b367f21dedc0addef4f7b1d4c6dac6a5dc17c2
Signed-off-by: Prithvi Pai <ppai@nvidia.com>
diff --git a/src/meson.build b/src/meson.build
index 3a2bc17..d94397e 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -19,6 +19,14 @@
cpp_args_smbios += ['-DTPM_DBUS']
endif
+if get_option('firmware-inventory-dbus').allowed()
+ cpp_args_smbios += ['-DFIRMWARE_INVENTORY_DBUS']
+endif
+
+if get_option('expose-firmware-component-name').allowed()
+ cpp_args_smbios += ['-DEXPOSE_FW_COMPONENT_NAME']
+endif
+
executable(
'smbiosmdrv2app',
'mdrv2.cpp',
@@ -28,6 +36,7 @@
'system.cpp',
'pcieslot.cpp',
'tpm.cpp',
+ 'firmware_inventory.cpp',
cpp_args: cpp_args_smbios,
dependencies: [
boost_dep,