commit | 34d19736349309928bdb8b6ddae23dbda727e3f0 | [log] [tgz] |
---|---|---|
author | Johnathan Mantey <johnathanx.mantey@intel.com> | Wed Jul 17 07:59:54 2024 -0700 |
committer | Johnathan Mantey <johnathanx.mantey@intel.com> | Thu Jul 18 19:53:33 2024 +0000 |
tree | b0bda6015bba0c92ed80de26a4f24d0bcd6babfb | |
parent | a440cd420bf12d3e6414eb40a3a76a9637f29ca6 [diff] |
Permit dynamic insertion of sensor type codes The existing sensorTypes flat_map is an immutable data structure. This makes adding OEM style sensor types difficult. New entries, that may not be general purpose either need to be pushed upstream for all, or they have to be updated by carrying a patch. Keeping a patch up to date is an undesirable method. Instead of using either of the prior methods, make the flat_map a writable object. Adding new entries can be done at run time using the flat_map emplace() function. Adding new sensor types is recommended to be done by overriding the weak linked getOtherSensorsCount(), placed in the sensorcommands_oem.cpp file. Using a GCC 'constructor' style function does not work due to uncertainty of initialization order. See commit 777cfaf2b3:bb6667fbbea7612255137970c3dbdb Enable OEM creation of non-Type1 SDRs Tested: Added an emplace() call into the strong linked getOtherSensorCommands Used 'ipmitool sdr dump sdrs.bin' Inspected the resulting SDR data and confirmed the sensors of interest had an OEM type code as dictated by the sensorTypes map Change-Id: Ifcf6297a8b161b720651bc6411409014c37ce88c 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