Add 2nd MAC address for 2nd NIC

In somes systms, there are 2 MAC addresses for 2 NICs like mihawk. In
order to support system like Mihawk, add another FRU ETHERNET1 to get
the 2nd NIC's MAC address.

Signed-off-by: Alvin Wang <alvinwang@msn.com>
Change-Id: I7c01e346af41e080ab3498c5d32ecdeb3d825e90
diff --git a/defines.hpp b/defines.hpp
index 91eda13..25303d3 100644
--- a/defines.hpp
+++ b/defines.hpp
@@ -143,11 +143,13 @@
  *
  *  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 b0293a5..31ff229 100644
--- a/write.cpp
+++ b/write.cpp
@@ -13,8 +13,11 @@
 namespace inventory
 {
 
+// Some systems have two MAC addresses
 static const std::unordered_map<std::string, Fru> 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 @@
                 break;
             }
 
+            case Fru::ETHERNET1:
+            {
+                writeFru<Fru::ETHERNET1>(vpdStore, path);
+                break;
+            }
+
             default:
                 break;
         }
diff --git a/writefru.yaml b/writefru.yaml
index 1673225..c620b59 100644
--- a/writefru.yaml
+++ b/writefru.yaml
@@ -14,3 +14,9 @@
         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: