[PATCH openbmc v2 32/34] initfs: Install option and download files if they exist

OpenBMC Patches openbmc-patches at stwcx.xyz
Tue Mar 8 08:30:21 AEDT 2016


From: "Milton D. Miller II" <miltonm at us.ibm.com>

Install the init-option and init-download-url if they exist in
the build directory.

This change to the bitbake recipe allows an override layer to
simply add these files to the SRC_URI variable and then have them
appear in the initramfs.

Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
 .../recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-init.bb   | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-init.bb b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-init.bb
index 68ee00d..3fa88c9 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-init.bb
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-init.bb
@@ -12,6 +12,13 @@ SRC_URI += "file://obmc-update.sh"
 SRC_URI += "file://whitelist"
 
 do_install() {
+	for f in init-download-url init-options
+	do
+		if test -e $f
+		then
+			install -m 0755 ${WORKDIR}/$f ${D}/$f
+		fi
+	done
         install -m 0755 ${WORKDIR}/obmc-init.sh ${D}/init
         install -m 0755 ${WORKDIR}/obmc-shutdown.sh ${D}/shutdown
         install -m 0755 ${WORKDIR}/obmc-update.sh ${D}/update
@@ -21,3 +28,4 @@ do_install() {
 }
 
 FILES_${PN} += " /init /shutdown /update /whitelist /dev "
+FILES_${PN} += " /init-options /init-download-url "
-- 
2.7.1




More information about the openbmc mailing list