summaryrefslogtreecommitdiff
path: root/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh')
-rw-r--r--meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh b/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh
index bd4cfb14d4..8e2f2c4f06 100644
--- a/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh
+++ b/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-update.sh
@@ -287,4 +287,19 @@ then
rm -rf $save
fi
+
+#
+# Save current MAC Address:
+# ========================
+#
+mac0=`ifconfig eth0 | grep HWaddr | tr -s ' ' | cut -f5 -d' '`
+mac1=`ifconfig eth1 | grep HWaddr | tr -s ' ' | cut -f5 -d' '`
+
+echo "Saving MAC addresses to u-boot env."
+echo "eth0: ${mac0}"
+echo "eth1: ${mac1}"
+fw_setenv ethaddr ${mac1} 2>/dev/null
+fw_setenv eth0addr ${mac1} 2>/dev/null
+fw_setenv eth1addr ${mac0} 2>/dev/null
+
exit