meta-ampere: mac-update: validate MAC Address
All Ampere developed platforms have BMC MAC Address specified in the FRU
EEPROM at Board Extra.
This commit moves the script to get MAC Address from FRU EEPROM to
common folder so that later platforms can use it. It also adds checking
for valid MAC Address before using.
Tested:
1. Update BMC MAC Address using IPMI OEM Write BMC MAC Address command.
Reboot BMC and ensure the new MAC is used.
2. Write the FRU with invalid value at Board Extra. Reboot BMC and check
for BMC still uses old MAC Address
Signed-off-by: Thang Q. Nguyen <thang@os.amperecomputing.com>
Change-Id: I29a44a9b4965bea1b6d8d7d55536d25bb0dd924c
diff --git a/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils.bb b/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils.bb
index 5d308dc..c0ae7bd 100644
--- a/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils.bb
+++ b/meta-ampere/meta-common/recipes-ampere/platform/ampere-utils.bb
@@ -6,6 +6,7 @@
SRC_URI = " \
file://ampere_add_redfishevent.sh \
+ file://ampere_update_mac.sh \
"
RDEPENDS:${PN} = "bash"
@@ -13,4 +14,5 @@
do_install() {
install -d ${D}/usr/sbin
install -m 0755 ${WORKDIR}/ampere_add_redfishevent.sh ${D}/${sbindir}/
+ install -m 0755 ${WORKDIR}/ampere_update_mac.sh ${D}/${sbindir}/
}