meta-openpower: Sync BMC MAC address to ethernet

On first BMC boot copy the MAC address set at manufacturing time into
the network DBus object.

On some OpenPOWER systems the MAC address is set by the manufacturer in
an EEPROM somewhere.  If openpower-vpd-parser has forwarded the
information in that eeprom onto phosphor-inventory manager, this script
can further forward that on to the network stack of OpenBMC.

This is only done on genesis boot (or after a factory reset) so that a
manually configured address from the end user is not overridden.

(From meta-openpower rev: 6f08b5190e0e7d83d1ddc08771dd31be7d0561ca)

Change-Id: Ia15ce9217ad024a827e94c1dfd986ce19af7124d
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service
new file mode 100644
index 0000000..a7c913e
--- /dev/null
+++ b/meta-openpower/recipes-phosphor/network/first-boot-set-mac/first-boot-set-mac@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Init BMC MAC address for NIC %I
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+Wants=mapper-wait@-xyz-openbmc_project-network-%i.service
+After=mapper-wait@-xyz-openbmc_project-network-%i.service
+
+[Service]
+ExecStart=/usr/bin/first-boot-set-mac.sh %i
+Type=oneshot
+RemainAfterExit=Yes
+
+[Install]
+WantedBy=multi-user.target