Write support for baseboard EEPROM FRU.
Write FRU implementation for baseboards having their FRU in an EEPROM.
Tested:
BC, CC, WC BaseBoards:
1.) Update the image via redfish and it boots fine.
2.) Ipmitool fru
Response :Listed all the fru details.
3.) Ipmitool read fru <FRU ID>
Response :Read the fru details successfully.
4.) Ipmitool sdr
Response :List the sensors details successfully.
5.) Ipmitool sensors
Response :List the sensors details successfully.
BC BaseBoard:
1.)Ipmitool write fru <FRU ID> <FRU FILE>
Response :Write the fru file successfully.
2.)First enter to manufacturing mode.
ipmitool raw 0x0A 0x12 0x00 0x10 0x00 0x43 0x41
Response:Success.(return code 00)
Signed-off-by: Saravanan Palanisamy
saravanan.palanisamy@linux.intel.com
Signed-off-by: Anoop S <anoopx.s@intel.com>
Change-Id: I2811551213d1a5335f17354af153d32dde4b81ea
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 2b812a3..9c73b6a 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -106,6 +106,7 @@
"xyz.openbmc_project.EntityManager";
constexpr static const size_t cacheTimeoutSeconds = 30;
constexpr static const size_t writeTimeoutSeconds = 10;
+constexpr static const char* chassisTypeRackMount = "23";
// event direction is bit[7] of eventType where 1b = Deassertion event
constexpr static const uint8_t deassertionEvent = 0x80;
@@ -220,9 +221,15 @@
uint8_t fruBus = std::get<uint32_t>(busFind->second);
uint8_t fruAddr = std::get<uint32_t>(addrFind->second);
+ auto chassisFind = fruIface->second.find("CHASSIS_TYPE");
+ std::string chassisType;
+ if (chassisFind != fruIface->second.end())
+ {
+ chassisType = std::get<std::string>(chassisFind->second);
+ }
uint8_t fruHash = 0;
- if (fruBus != 0 || fruAddr != 0)
+ if (chassisType.compare(chassisTypeRackMount) != 0)
{
fruHash = hasher(fru.first.str);
// can't be 0xFF based on spec, and 0 is reserved for baseboard