[PATCH openbmc v3 9/9] init: Add an option to run from RAM
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Jun 7 10:50:32 AEST 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
Adding the obmc-phosphor-initfs-ram package will add the text
overlay-filesystem-in-ram to /init-options-base which will cause
init to not mount the rwfs. This allows building an image
netboot from RAM, while allowing copy-files-to-ram to
the kernel comand line via bootargs will allow whitelisted files
read from the rwfs before startup and allows them to be saved back
to the rwfs via update.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../obmc-phosphor-initfs/files/obmc-init-options-ram | 1 +
.../recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb | 5 +++++
2 files changed, 6 insertions(+)
create mode 100644 meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init-options-ram
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init-options-ram b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init-options-ram
new file mode 100644
index 0000000..5e6489d
--- /dev/null
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init-options-ram
@@ -0,0 +1 @@
+overlay-filesystem-in-ram
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
index f81e21d..525d9e9 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
@@ -3,14 +3,18 @@ DESCRIPTION = "Phosphor OpenBMC filesytem mount reference implementation."
PR = "r1"
inherit obmc-phosphor-license
+PACKAGES += " ${PN}-ram"
S = "${WORKDIR}"
SRC_URI += "file://obmc-init.sh"
SRC_URI += "file://obmc-shutdown.sh"
SRC_URI += "file://obmc-update.sh"
SRC_URI += "file://whitelist"
+SRC_URI += "file://obmc-init-options-ram"
+
do_install() {
+ install -m 0644 ${WORKDIR}/obmc-init-options-ram ${D}/init-options-base
for f in init-download-url init-options
do
if test -e $f
@@ -28,3 +32,4 @@ do_install() {
FILES_${PN} += " /init /shutdown /update /whitelist /dev "
FILES_${PN} += " /init-options /init-download-url "
+FILES_${PN}-ram += " /init-options-base "
--
2.8.3
More information about the openbmc
mailing list