initfs: Install option and download files if they exist
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@us.ibm.com>
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://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 @@
}
FILES_${PN} += " /init /shutdown /update /whitelist /dev "
+FILES_${PN} += " /init-options /init-download-url "