meta-bletchley: add usb-controller-update tool

Add usb-controller-update script for firmware updating.

Tested results:

root@bletchley:~# systemctl start flash-usb-controller@3.service
root@bletchley:~# systemctl status flash-usb-controller@3.service
○ flash-usb-controller@3.service - Flash usb controller image on SLED 3
     Loaded: loaded (/lib/systemd/system/flash-usb-controller@.service; static)
     Active: inactive (dead)

Apr 22 02:52:52 bletchley systemd[1]: Starting Flash usb controller image on SLED 3...
Apr 22 02:52:54 bletchley usb-controller-update[3915]: Bind mtd node success, path: /dev/mtd7
Apr 22 02:53:01 bletchley usb-controller-update[3937]: [293B blob data]
Apr 22 02:53:01 bletchley usb-controller-update[3915]: Erase flash block done
Apr 22 02:53:08 bletchley usb-controller-update[3940]: [438B blob data]
Apr 22 02:53:10 bletchley usb-controller-update[3940]: [293B blob data]
Apr 22 02:53:11 bletchley usb-controller-update[3940]: [293B blob data]
Apr 22 02:53:11 bletchley usb-controller-update[3915]: Write firmware image done
Apr 22 02:53:12 bletchley systemd[1]: flash-usb-controller@3.service: Deactivated successfully.
Apr 22 02:53:12 bletchley systemd[1]: Finished Flash usb controller image on SLED 3.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: Icd26fb3c7585461152c3b929a46dc16675d6c937
diff --git a/meta-facebook/meta-bletchley/recipes-bletchley/fw-update/fw-update_0.1.bb b/meta-facebook/meta-bletchley/recipes-bletchley/fw-update/fw-update_0.1.bb
new file mode 100644
index 0000000..91fdc88
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-bletchley/fw-update/fw-update_0.1.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Firmware update tools"
+PR = "r1"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit obmc-phosphor-systemd
+
+RDEPENDS:${PN} += "bash"
+RDEPENDS:${PN} += "libgpiod-tools"
+
+S = "${WORKDIR}"
+SRC_URI += " \
+    file://usb-controller-update \
+"
+
+do_install() {
+        install -d ${D}${sbindir}
+        install -m 0755 ${WORKDIR}/usb-controller-update ${D}${sbindir}
+}
+
+FLASH_USB_CONTROLLER_INSTFMT="flash-usb-controller@.service:flash-usb-controller@{0}.service"
+SYSTEMD_SERVICE:${PN} += "flash-usb-controller@.service"
+SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FLASH_USB_CONTROLLER_INSTFMT', 'OBMC_HOST_INSTANCES')}"