summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2017-03-07 14:32:08 -0600
committerPatrick Williams <patrick@stwcx.xyz>2017-03-15 21:02:57 +0000
commit28d5a61afce87e12f02b7344efd4287863bd7bf2 (patch)
tree2b62efd3c83b65310a89aa66009a0b94296e9fff
parente0d23c0d7ca9278f58c15c12a6fdc517ddc09979 (diff)
downloadtalos-openbmc-28d5a61afce87e12f02b7344efd4287863bd7bf2.tar.gz
talos-openbmc-28d5a61afce87e12f02b7344efd4287863bd7bf2.zip
Mount a specified PNOR UBIFS volume
Create a template systemd unit file to mount a specified PNOR UBIFS volume (systemd does not support template mount files). Create it with an arbitrary size of 1MB, it can be dynamically resized at runtime. Example usage: systemctl start obmc-flash-bios-ubimount@N where N is the desired partition number, ex: 1. This will create a volume named pnor-rwN (ex: pnor-rw1) under the /media directory. Change-Id: I6c4d8662dfb50e83d02bfb946ce11b74726fe3bd Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios.bb1
-rw-r--r--meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-bios-ubimount@.service11
2 files changed, 12 insertions, 0 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios.bb b/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios.bb
index 9fdd7e3e7..7398cbdbc 100644
--- a/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios.bb
+++ b/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios.bb
@@ -13,3 +13,4 @@ SKELETON_DIR = "flashbios"
DBUS_SERVICE_${PN} += "org.openbmc.control.Flash.service"
SYSTEMD_SERVICE_${PN} += "obmc-flash-init.service"
SYSTEMD_SERVICE_${PN} += "obmc-flash-bios-ubiattach.service"
+SYSTEMD_SERVICE_${PN} += "obmc-flash-bios-ubimount@.service"
diff --git a/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-bios-ubimount@.service b/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-bios-ubimount@.service
new file mode 100644
index 000000000..331ed6bc6
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/flash/obmc-flash-bios/obmc-flash-bios-ubimount@.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Mount UBIFS volume pnor-rw%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-rw%i -s 1MiB; \
+ mkdir /media/pnor-rw%i; \
+ mount -t ubifs ubi0:pnor-rw%i /media/pnor-rw%i'
OpenPOWER on IntegriCloud