phosphor-software-manager: New service file to create ubi ro volumes

Add service file and script to create ubi read-only volumes
to store the rofs and kernel. Default the sizes to the
current corresponding mtd size.
Create a ubi block for the read-only image which is a squashfs.

The mtd device locations can be passed through the recipe.
Set it to the "pnor" mtd as the default. This can be changed via a
per-system bbappend to other chips if desired, such as the alternate
bmc chip.

Resolves openbmc/openbmc#1651

Change-Id: I76aa9021a2bb5462c0e4c2efef99728d26873df0
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
new file mode 100644
index 0000000..4dec96e
--- /dev/null
+++ b/common/recipes-phosphor/flash/phosphor-software-manager/obmc-flash-bmc-ubiro@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Create read-only ubi volumes %I
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart={sbindir}/obmc-flash-bmc ubiro {RO_MTD} ro-%i %i
+ExecStart={sbindir}/obmc-flash-bmc ubikernel {KERNEL_MTD} kernel-%i %i