[PATCH openbmc v2 30/34] init: Allow options to be fixed at build time
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:19 AEDT 2016
From: "Milton D. Miller II" <miltonm at us.ibm.com>
If the file /init-options exists copy it to the runtime location
/run/initramfs/init-options.
This allows an initramfs image to be built that will not parse
any u-boot or command line variables by adding a file into the
the image. This can be done either through a recipe overlay or
additonal package today and could also be a cpio merged into the
initrd in the future.
Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
.../common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
index 29c72cf..814ee07 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh
@@ -117,6 +117,11 @@ fsckopts=-a
optfile=/run/initramfs/init-options
update=/run/initramfs/update
+if test -e /${optfile##*/}
+then
+ cp /${optfile##*/} $optfile
+fi
+
if test ! -f $optfile
then
cat /proc/cmdline > $optfile
--
2.7.1
More information about the openbmc
mailing list