meta-facebook: harma: usb-net
Setting the USB network address for SITV.
Change-Id: Ice43dfbb230ec5a97f73449dc1460e75e2d8d9dc
Signed-off-by: Peter Yin <peter.yin@quantatw.com>
diff --git a/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc b/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
index 882f20e..b602a3d 100644
--- a/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
+++ b/meta-facebook/meta-harma/recipes-phosphor/images/fb-harma-phosphor-image.inc
@@ -9,3 +9,8 @@
OBMC_IMAGE_EXTRA_INSTALL:append = " \
usbutils \
"
+
+# Allow scripted access to SITV BMC
+OBMC_IMAGE_EXTRA_INSTALL:append = " \
+ sshpass \
+"
diff --git a/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network/00-bmc-usb0.network b/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network/00-bmc-usb0.network
new file mode 100644
index 0000000..fcb0322
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network/00-bmc-usb0.network
@@ -0,0 +1,13 @@
+[Match]
+Driver=cdc_ncm
+
+[Link]
+Name=usb0
+
+[Network]
+DHCP=false
+LinkLocalAddressing=no
+IPv6AcceptRA=false
+
+[Address]
+Address=192.168.20.101/24
diff --git a/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network_%.bbappend b/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network_%.bbappend
new file mode 100644
index 0000000..9d7e778
--- /dev/null
+++ b/meta-facebook/meta-harma/recipes-phosphor/network/phosphor-network_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append:harma = " file://00-bmc-usb0.network"
+
+FILES:${PN}:append:harma = " ${sysconfdir_native}/systemd/network/00-bmc-usb0.network"
+
+do_install:append() {
+ install -d ${D}${sysconfdir_native}/systemd/network/
+ install -m 0644 ${WORKDIR}/00-bmc-usb0.network \
+ ${D}${sysconfdir_native}/systemd/network
+}