diff --git a/defines.hpp b/defines.hpp index 91eda13e7..25303d3b0 100644 --- a/defines.hpp +++ b/defines.hpp @@ -143,11 +143,13 @@ constexpr const char* getKeyword() * * BMC The VPD on the BMC planar, for eg * ETHERNET The ethernet card on the BMC + * ETHERNET1 The 2nd ethernet card on the BMC */ enum Fru { BMC, - ETHERNET + ETHERNET, + ETHERNET1 }; } // namespace vpd diff --git a/write.cpp b/write.cpp index b0293a5da..31ff22981 100644 --- a/write.cpp +++ b/write.cpp @@ -13,8 +13,11 @@ namespace vpd namespace inventory { +// Some systems have two MAC addresses static const std::unordered_map supportedFrus = { - {"BMC", Fru::BMC}, {"ETHERNET", Fru::ETHERNET}}; + {"BMC", Fru::BMC}, + {"ETHERNET", Fru::ETHERNET}, + {"ETHERNET1", Fru::ETHERNET1}}; void write(const std::string& type, const Store& vpdStore, const std::string& path) @@ -46,6 +49,12 @@ void write(const std::string& type, const Store& vpdStore, break; } + case Fru::ETHERNET1: + { + writeFru(vpdStore, path); + break; + } + default: break; } diff --git a/writefru.yaml b/writefru.yaml index 167322543..c620b597d 100644 --- a/writefru.yaml +++ b/writefru.yaml @@ -14,3 +14,9 @@ ETHERNET: VINI,B1: MACAddress OPFR,B1: MACAddress xyz.openbmc_project.Inventory.Item.Ethernet: + +ETHERNET1: + xyz.openbmc_project.Inventory.Item.NetworkInterface: + VINI,B1: MACAddress + OPFR,B1: MACAddress + xyz.openbmc_project.Inventory.Item.Ethernet: