summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe/overlayfs-etc.bbclass
diff options
context:
space:
mode:
authorVyacheslav Yurkov <v.yurkov@precitec.de>2022-09-07 21:51:38 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-09-09 12:24:43 +0100
commitc3ec554ba5dbe5abcba35724f039baba8a4c27eb (patch)
tree21cbf0bdffae328b0351bfa4fd33bfe8a63c3b3f /meta/classes-recipe/overlayfs-etc.bbclass
parentd99391f03576de2392b9a35f663390c284eb7dce (diff)
downloadpoky-c3ec554ba5dbe5abcba35724f039baba8a4c27eb.tar.gz
classes: files: Extend overlayfs-etc class
Add the ability to expose the lower layer of /etc when mounting overlay. This is the similar to what overlayroot script from initramfs-framework does. By default, this option is turned off to keep an old behavior intact. (From OE-Core rev: 791e8a8bacce5a7f31f4d7bcbfb17df2967fd258) Signed-off-by: Vyacheslav Yurkov <v.yurkov@precitec.de> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/overlayfs-etc.bbclass')
-rw-r--r--meta/classes-recipe/overlayfs-etc.bbclass5
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes-recipe/overlayfs-etc.bbclass b/meta/classes-recipe/overlayfs-etc.bbclass
index d0bc3ecfac..f8343106f3 100644
--- a/meta/classes-recipe/overlayfs-etc.bbclass
+++ b/meta/classes-recipe/overlayfs-etc.bbclass
@@ -40,6 +40,7 @@ OVERLAYFS_ETC_DEVICE ??= ""
40OVERLAYFS_ETC_USE_ORIG_INIT_NAME ??= "1" 40OVERLAYFS_ETC_USE_ORIG_INIT_NAME ??= "1"
41OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults" 41OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults"
42OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in" 42OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in"
43OVERLAYFS_ETC_EXPOSE_LOWER ??= "0"
43 44
44python create_overlayfs_etc_preinit() { 45python create_overlayfs_etc_preinit() {
45 overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT") 46 overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT")
@@ -60,13 +61,15 @@ python create_overlayfs_etc_preinit() {
60 preinitPath = oe.path.join(d.getVar("IMAGE_ROOTFS"), d.getVar("base_sbindir"), "preinit") 61 preinitPath = oe.path.join(d.getVar("IMAGE_ROOTFS"), d.getVar("base_sbindir"), "preinit")
61 initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") 62 initBaseName = oe.path.join(d.getVar("base_sbindir"), "init")
62 origInitNameSuffix = ".orig" 63 origInitNameSuffix = ".orig"
64 exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER'))
63 65
64 args = { 66 args = {
65 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint, 67 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint,
66 'OVERLAYFS_ETC_MOUNT_OPTIONS': d.getVar('OVERLAYFS_ETC_MOUNT_OPTIONS'), 68 'OVERLAYFS_ETC_MOUNT_OPTIONS': d.getVar('OVERLAYFS_ETC_MOUNT_OPTIONS'),
67 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, 69 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType,
68 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, 70 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice,
69 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName 71 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName,
72 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false"
70 } 73 }
71 74
72 if useOrigInit: 75 if useOrigInit: