meta-ethanolx: Add service to transfer BMC IP to FPGA
If switch SW2-7 is on, FPGA shows BMC IP address on the 7-segment
displays. For that functionality to work correctly BMC needs to write
its own IP address to the paticular FPGA I2C registers.
Add a service that performs this action on every IP change.
Change-Id: Iead978ef3651448f4c32936402607fbb3267ee18
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
diff --git a/meta-amd/recipes-amd/amd-fpga/files/ip-to-fpga.service b/meta-amd/recipes-amd/amd-fpga/files/ip-to-fpga.service
new file mode 100644
index 0000000..18fbca8
--- /dev/null
+++ b/meta-amd/recipes-amd/amd-fpga/files/ip-to-fpga.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Transfer IP address to the FPGA
+BindsTo=sys-subsystem-net-devices-eth0.device
+After=sys-subsystem-net-devices-eth0.device
+
+[Service]
+Type=oneshot
+ExecStart=/usr/bin/ip-to-fpga.sh
+
+[Install]
+WantedBy=multi-user.target