summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton D. Miller II <miltonm@us.ibm.com>2016-03-07 07:59:09 -0600
committerMilton D. Miller II <miltonm@us.ibm.com>2016-03-07 15:22:40 -0600
commit6d85431579a9d385a63a0f5b2f8cf6c6dd4f26e4 (patch)
tree9f75b2030598119b19946d0aa80f03668dd48e33
parentab6183645c4717e6cf58ca9ef89e9958ba804824 (diff)
downloadtalos-openbmc-6d85431579a9d385a63a0f5b2f8cf6c6dd4f26e4.tar.gz
talos-openbmc-6d85431579a9d385a63a0f5b2f8cf6c6dd4f26e4.zip
init: Allow options to be fixed at build time
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@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh5
1 files changed, 5 insertions, 0 deletions
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 29c72cf29..814ee07d1 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
OpenPOWER on IntegriCloud