meta-quanta: gbs: initialize MAC address and enable USB Network
MAC address: initialize MAC address for all network interfaces
USB-Network: enable usb0 link-local address auto configuration
(From meta-quanta rev: dd269ed023f6b29f7621aa5778808f7c477645f8)
Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I57d975276f41172668017f117ad48262a8edcf0c
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-quanta/meta-gbs/recipes-quanta/network/mac-address/config.txt b/meta-quanta/meta-gbs/recipes-quanta/network/mac-address/config.txt
new file mode 100644
index 0000000..d898444
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-quanta/network/mac-address/config.txt
@@ -0,0 +1,7 @@
+fruBusNum=5
+fruAddr=0x50
+numberMac=4
+mac1=eth1
+mac2=usb0_dev
+mac3=usb0_host
+mac4=eth0
diff --git a/meta-quanta/meta-gbs/recipes-quanta/network/mac-address_%.bbappend b/meta-quanta/meta-gbs/recipes-quanta/network/mac-address_%.bbappend
new file mode 100644
index 0000000..d975fe2
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-quanta/network/mac-address_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
+SRC_URI_append_gbs = " file://config.txt"
+
+FILES_${PN}_append_gbs = " ${datadir}/mac-address/config.txt"
+
+do_install_append_gbs() {
+ install -d ${D}${datadir}/mac-address
+ install -m 0644 -D ${WORKDIR}/config.txt \
+ ${D}${datadir}/mac-address/config.txt
+}
diff --git a/meta-quanta/meta-gbs/recipes-quanta/network/usb-network.bbappend b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network.bbappend
new file mode 100644
index 0000000..b6439a1
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network.bbappend
@@ -0,0 +1,16 @@
+FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
+SRC_URI_append_gbs = " file://00-bmc-usb0.network"
+SRC_URI_append_gbs = " file://usb-network.conf"
+
+FILES_${PN}_append_gbs = " ${datadir}/usb-network/usb-network.conf"
+FILES_${PN}_append_gbs = " ${sysconfdir_native}/systemd/network/00-bmc-usb0.network"
+
+do_install_append_gbs() {
+ install -d ${D}${sysconfdir_native}/systemd/network/
+ install -m 0644 ${WORKDIR}/00-bmc-usb0.network \
+ ${D}${sysconfdir_native}/systemd/network
+
+ install -d ${D}${datadir}/usb-network
+ install -m 0644 -D ${WORKDIR}/usb-network.conf \
+ ${D}${datadir}/usb-network
+}
diff --git a/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/00-bmc-usb0.network b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/00-bmc-usb0.network
new file mode 100644
index 0000000..4e5120c
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/00-bmc-usb0.network
@@ -0,0 +1,5 @@
+[Match]
+Name=usb0
+[Network]
+LinkLocalAddressing=yes
+IPv6AcceptRA=no
diff --git a/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/usb-network.conf b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/usb-network.conf
new file mode 100644
index 0000000..c105760
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-quanta/network/usb-network/usb-network.conf
@@ -0,0 +1 @@
+UDC="f0835000.udc"