diff options
author | Milton Miller <miltonm@us.ibm.com> | 2016-05-25 18:52:04 -0500 |
---|---|---|
committer | Milton Miller <miltonm@us.ibm.com> | 2016-06-30 14:46:44 -0500 |
commit | 9476a6a51c1bebb363e098c8e741a210aefbf88a (patch) | |
tree | 2cdc9bc85c53070208eff54116851e456d59e762 | |
parent | 2ef727d0fe91d43843503c791ca3f06d75d8b122 (diff) | |
download | talos-openbmc-9476a6a51c1bebb363e098c8e741a210aefbf88a.tar.gz talos-openbmc-9476a6a51c1bebb363e098c8e741a210aefbf88a.zip |
initfs: init: add file for base options
Allow an initrd image to include options for init while still allowing
additional options to come from the kernel command line and/or u-boot
environment variables.
This will allow building a netboot image that can specify to run
from RAM while allowing the command line to initiate debug or skip
copying files from the read-write overlay file system.
Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r-- | meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 10 |
1 files changed, 9 insertions, 1 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 c37b3d53d..70af93d99 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 @@ -184,6 +184,7 @@ fsckbase=/sbin/fsck. fsck=$fsckbase$rwfst fsckopts=-a optfile=/run/initramfs/init-options +optbase=/run/initramfs/init-options-base urlfile=/run/initramfs/init-download-url update=/run/initramfs/update @@ -192,9 +193,16 @@ then cp /${optfile##*/} $optfile fi +if test -e /${optbase##*/} +then + cp /${optbase##*/} $optbase +else + touch $optbase +fi + if test ! -f $optfile then - cat /proc/cmdline > $optfile + cat /proc/cmdline $optbase > $optfile get_fw_env_var openbmcinit >> $optfile get_fw_env_var openbmconce >> $optfile fi |