meta-facebook: add emmc-init package
Add a service and script for detecting the state of the eMMC
device and formatting it if needed.
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I4618d1691dedcff582772a0749c5797ad052f238
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/meta-facebook/recipes-fb/emmc-init/emmc-init_0.1.bb b/meta-facebook/recipes-fb/emmc-init/emmc-init_0.1.bb
new file mode 100644
index 0000000..0a691e6
--- /dev/null
+++ b/meta-facebook/recipes-fb/emmc-init/emmc-init_0.1.bb
@@ -0,0 +1,21 @@
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
+
+inherit obmc-phosphor-systemd
+
+RDEPENDS:${PN}:append = " \
+ bash \
+ btrfs-tools \
+ "
+
+SRC_URI += " \
+ file://emmc-init \
+ file://emmc-init.service \
+ "
+
+do_install:append() {
+ install -d ${D}${libexecdir}/emmc-init
+ install -m 0755 ${WORKDIR}/emmc-init ${D}${libexecdir}/emmc-init
+}
+
+SYSTEMD_SERVICE:${PN} += "emmc-init.service"