summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilton Miller <miltonm@us.ibm.com>2016-03-30 09:34:41 -0500
committerMilton Miller <miltonm@us.ibm.com>2016-06-30 14:46:45 -0500
commitc2686a95efe991c0c7dfaffaaf6b2834df9bed86 (patch)
tree8f7dd9359aaea064ae096b18cb6f59de739abdc8
parentd55fd29128850520a6a2c44b1bdad5a50175d5ae (diff)
downloadtalos-openbmc-c2686a95efe991c0c7dfaffaaf6b2834df9bed86.tar.gz
talos-openbmc-c2686a95efe991c0c7dfaffaaf6b2834df9bed86.zip
initfs: Store whiltelist in a directory of files
Change the whiltelist definition to be files in a directory instead of a single file. This will allow us to store which files should be saved in individual recipes and also supports comments in the whitelist. The actual split into separate files is deferred for prototyping what assistance classes should look like to make the whitelist (eg systemd service files); also the packages will need to be added to the package list for the initramfs image. Signed-off-by: Milton Miller <miltonm@us.ibm.com>
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-init.sh2
-rwxr-xr-xmeta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh6
-rw-r--r--meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb5
3 files changed, 8 insertions, 5 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 70af93d99..1f54d392f 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
@@ -18,7 +18,7 @@ fi
mkdir -p $rodir $rwdir
-cp -rp init shutdown update whitelist bin sbin usr lib etc var run/initramfs
+cp -rp init shutdown update whitelist.d bin sbin usr lib etc var run/initramfs
# To start a interactive shell with job control at this point, run
# getty 38400 ttyS4
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
index f0c41a74c..b061e262f 100755
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/files/obmc-update.sh
@@ -100,7 +100,7 @@ toram=
checksize=y
checkmount=y
-whitelist=/run/initramfs/whitelist
+whitelist=/run/initramfs/whitelist.d/
image=/run/initramfs/image-
imglist=
@@ -191,7 +191,9 @@ then
done
mkdir -p "${d%/*}"
cp -rp "$upper/$f" "${d%/*}/"
- done < $whitelist
+ done << HERE
+$(grep -v ^# $whitelist*)
+HERE
if test -n "$mounted"
then
diff --git a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
index f81e21dd1..70b668699 100644
--- a/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
+++ b/meta-phosphor/common/recipes-phosphor/obmc-phosphor-initfs/obmc-phosphor-initfs.bb
@@ -21,10 +21,11 @@ do_install() {
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
- install -m 0644 ${WORKDIR}/whitelist ${D}/whitelist
+ install -d ${D}/whitelist.d
+ install -m 0644 ${WORKDIR}/whitelist ${D}/whitelist.d/whitelist
install -d ${D}/dev
mknod -m 622 ${D}/dev/console c 5 1
}
-FILES_${PN} += " /init /shutdown /update /whitelist /dev "
+FILES_${PN} += " /init /shutdown /update /whitelist.d/whitelist /dev "
FILES_${PN} += " /init-options /init-download-url "
OpenPOWER on IntegriCloud