PNOR: Mount ubi volumes on BMC reboot
- Create a static service file that will be
run on all BMC boot to remount the ubi volumes.
- Read the ubinfo for all available volumes from
obmc/flash-bios script.
- Re-Mount the available volumes on /media/ dir
using the volume names.
Resolves openbmc/openbmc#1848
Change-Id: I9e336340a04f335d034438406e5f0fff9b21d1b9
Signed-off-by: Saqib Khan <khansa@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
new file mode 100644
index 0000000..fd839f3
--- /dev/null
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiremount.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Remount the squashfs and ubi volumes after a reboot
+Requires=obmc-flash-bios-ubiattach.service
+After=obmc-flash-bios-ubiattach.service
+Wants=org.open_power.Software.Host.Updater.service
+Before=org.open_power.Software.Host.Updater.service
+
+[Service]
+Type=oneshot
+RemainAfterExit=no
+ExecStart={sbindir}/obmc-flash-bios ubiremount
+
+[Install]
+WantedBy=multi-user.target