meta-google: gbmc-ncsi-config: Derive IP from RA

Our end2end DHCP solution is not yet working, but we need a way to
derive addresses for a BMC from the smart NIC in front of it. This
provides a mechanism for detecting the address from RA beacons the NIC
is sending.

Change-Id: I0cdc8c192974c0b00257ebe58e911e62636e4c81
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
index 0302ed8..29cf9c3 100644
--- a/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
+++ b/meta-google/recipes-google/ncsi/gbmc-ncsi-config.bb
@@ -12,6 +12,8 @@
   file://-bmc-gbmcncsidhcp.network \
   file://50-gbmc-ncsi.rules.in \
   file://gbmc-ncsi-dhcrelay.service.in \
+  file://gbmc-ncsi-ip-from-ra.service.in \
+  file://gbmc-ncsi-ip-from-ra.sh.in \
   file://gbmc-ncsi-sslh.socket.in \
   file://gbmc-ncsi-sslh.service \
   file://gbmc-ncsi-nft.sh.in \
@@ -39,6 +41,7 @@
   gbmc-ncsi-sslh.service \
   gbmc-ncsi-sslh.socket \
   gbmc-ncsi-set-nicenabled.service \
+  gbmc-ncsi-ip-from-ra.service \
   "
 
 do_install:append() {
@@ -100,6 +103,14 @@
 
   sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-dhcrelay.service.in \
     >${D}${systemd_system_unitdir}/gbmc-ncsi-dhcrelay.service
+
+  sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-ip-from-ra.service.in \
+    >${WORKDIR}/gbmc-ncsi-ip-from-ra.service
+  install -m0644 ${WORKDIR}/gbmc-ncsi-ip-from-ra.service ${D}${systemd_system_unitdir}
+  sed "s,@NCSI_IF@,$if_name,g" ${WORKDIR}/gbmc-ncsi-ip-from-ra.sh.in \
+    >${WORKDIR}/gbmc-ncsi-ip-from-ra.sh
+  install -d -m0755 ${D}${libexecdir}
+  install -m0755 ${WORKDIR}/gbmc-ncsi-ip-from-ra.sh ${D}${libexecdir}/
 }
 
 do_rm_work:prepend() {