summaryrefslogtreecommitdiff
path: root/meta-phosphor/classes/obmc-phosphor-initfs.bbclass
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-01-20 23:57:54 +0300
committerMilton D. Miller II <miltonm@us.ibm.com>2016-01-29 00:45:20 +0300
commit0e77514678f66cde28a00a7618c9d20c88c92a5a (patch)
tree7cc0284b25a6de5725b6c2137dcb21c5f3e6969c /meta-phosphor/classes/obmc-phosphor-initfs.bbclass
parent1af7dcca3b1e9e4904b3a386ccb18b8526da9ba9 (diff)
downloadopenbmc-0e77514678f66cde28a00a7618c9d20c88c92a5a.tar.xz
Create obmc-phosphor-initfs startup and shutdown scripts
This recipe holds the key scripts for an initramfs image. Written in sh to run with busybox, these three scripts handle mounting, unmounting, and updating a set of mtd partitions to form a read-write overlay on a read-only compressed base. The init script will mount the base sysfs, proc, and devtmpfs as well as run. It copies the filesystem to run/initramfs to create the shutdown and update environment. It then mounts a base read-only and read-write file system and then an overlay of them combined, then continues with chroot into the overlay and execute the normal /sbin/init. The shutdown script will unmount the remaining nodev and root filesystems from oldroot where systemd-shutdown pivots the old file system, then looks for image- files. If any are found it invokes update otherwise it performs the final reboot, powerdown, or kexec, or halt. The update script will attempt to mount the read/write overlay and preserve selected files and directories based on a whitelist. It then unmounts that fs and writes all image files to their named mtd partition using flashcp, mounts and restores the saved files, and finally unmounts the fs and performs the final reboot, shutdown, kexec, or halt. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
Diffstat (limited to 'meta-phosphor/classes/obmc-phosphor-initfs.bbclass')
-rw-r--r--meta-phosphor/classes/obmc-phosphor-initfs.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta-phosphor/classes/obmc-phosphor-initfs.bbclass b/meta-phosphor/classes/obmc-phosphor-initfs.bbclass
new file mode 100644
index 000000000..de7923e82
--- /dev/null
+++ b/meta-phosphor/classes/obmc-phosphor-initfs.bbclass
@@ -0,0 +1,4 @@
+# Common code for recipes that implement Phosphor OpenBMC filesystem
+
+RPROVIDES_${PN} += "obmc-phosphor-initfs"
+PROVIDES += "obmc-phosphor-initfs"