From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sender163-mail.zoho.com (sender163-mail.zoho.com [74.201.84.163]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3rFVRz0mN9zDqYg for ; Thu, 26 May 2016 10:30:54 +1000 (AEST) Received: from localhost (172.110.7.206 [172.110.7.206]) by mx.zohomail.com with SMTPS id 14642226488931017.1385842539038; Wed, 25 May 2016 17:30:48 -0700 (PDT) From: OpenBMC Patches To: openbmc@lists.ozlabs.org Subject: [PATCH openbmc v2 7/7] initfs: init: add file for base options Date: Wed, 25 May 2016 19:30:34 -0500 Message-Id: <20160526003034.30491-8-openbmc-patches@stwcx.xyz> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20160526003034.30491-1-openbmc-patches@stwcx.xyz> References: <20160526003034.30491-1-openbmc-patches@stwcx.xyz> X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 00:30:55 -0000 From: "Milton D. Miller II" 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 --- .../recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 c37b3d5..70af93d 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 -- 2.8.3