commit | 777cfaf2b3bb6667fbbea7612255137970c3dbdb | [log] [tgz] |
---|---|---|
author | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Jun 13 10:45:47 2024 -0700 |
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Jun 20 17:56:18 2024 +0000 |
tree | 133cacbc45f683b65f4f5f0437d538e97ae03661 | |
parent | 3c1e28e45f7e0b2d5961cd9d2627a5db926dcef9 [diff] |
Enable OEM creation of non-Type1 SDRs Enabling the dbus-sdrs feature is useful for managing Type 1 SDR's using D-Bus. What doesn't work quite as well in the model is creating non-Type 1 records. The current method works alright for Type 11 FRU records. Any other SDR's beyond the FRU are problematic because the code depends on manually defining custom 'if' clauses to compare the incoming SDR ID, and determining what kind of SDR to create. It is a fixed process that is inflexible, and assumes every BMC vendor wants the same SDR arrangement. This commit creates a model that allows the each OEM to customize creating each SDR using their own algorithm. The OEM creates a sensorcommands_oem.cpp/hpp file containing code for handling the creation of custom SDRs. The code here is compiled and linked based on enabling a Meson build switch. The code follows the model that was already present in dbus-sdr/sensorcommands.cpp. There are two functions that maintain the original inflexible code, which is now expected to be primarily used as a template for the OEM cpp/hpp contents. Tested: Created sensorcommands_oem.cpp/hpp files with OEM functionality Enabled the original code, and compiled Used ipmitool sdr dump sdrs.bin in the BMC Console Confirmed the SDRs matched the values prior to this commit. Enabled the OEM code and compiled Used ipmitool sdr dump sdrs.bin in the BMC console Confirmed the contents of the BIN file contained the SDRs generated by the sensorcommands_oem.cpp source. Change-Id: I100e747b52677be53b499713d51c6c1126411570 Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage