meta-quanta: olympus-nuvoton: network: add mac-address package
1. Set eth1 mac address from bmc fru.
2. This package is using to replace first-boot-set-mac
Tested: Verified for Olympus platform
Signed-off-by: kwliu <kwliu@nuvoton.com>
Signed-off-by: Tim Lee <timlee660101@gmail.com>
Change-Id: I2b0f35cefc89f3ef0190d20cd2356066acdf5b58
diff --git a/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt b/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt
new file mode 100644
index 0000000..695356c
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/files/config.txt
@@ -0,0 +1,4 @@
+fruBusNum=13
+fruAddr=0x51
+numberMac=1
+mac1=eth1
diff --git a/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend b/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend
new file mode 100644
index 0000000..a9f0c40
--- /dev/null
+++ b/meta-olympus-nuvoton/recipes-olympus-nuvoton/network/mac-address_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend_olympus-nuvoton := "${THISDIR}/files:"
+
+SRC_URI_append_olympus-nuvoton = " file://config.txt"
+
+FILES_${PN}_append_olympus-nuvoton = " ${datadir}/mac-address/config.txt"
+
+do_install_append_olympus-nuvoton() {
+ install -d ${D}${datadir}/mac-address
+ install -m 0644 -D ${WORKDIR}/config.txt \
+ ${D}${datadir}/mac-address/config.txt
+}