openpower-pnor-code-mgmt: Initial recipe
Create recipe for the openpower-pnor-code-mgmt repo.
Move the pnor-specific service files from the phosphor
layer to the open-power one.
Add the new openpower-software-manager to packagegroups.
Change-Id: Iab47b82e6872f7f92aed6260c51eaf0acf744aeb
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
new file mode 100644
index 0000000..1bf15bf
--- /dev/null
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-squashfsmount@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Mount SquashFS image pnor-ro-%I
+Requires=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/bin/sh -c '{sbindir}/ubimkvol /dev/ubi0 -N pnor-ro-%i -s 32MiB --type=static; \
+ mkdir /media/pnor-ro-%i; \
+ volumeid%i=`ubinfo -d 0 -N pnor-ro-%i | grep "Volume ID" | sed -e "s|Volume ID:||" -e "s/^ *//" | grep -o "^\S*"`; \
+ ubiblock --create /dev/ubi0_$volumeid%i; \
+ ubiupdatevol /dev/ubi0_$volumeid%i /tmp/images/%i/pnor.xz.squashfs; \
+ mount -t squashfs -o ro /dev/ubiblock0_$volumeid%i /media/pnor-ro-%i'