diff options
author | Vyacheslav Yurkov <v.yurkov@precitec.de> | 2022-09-07 21:51:38 +0200 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2022-10-25 04:24:45 -1000 |
commit | 6ad25304abefcbe538db7745e17ac213fa7d0719 (patch) | |
tree | 5469e68d1941afa25a9609c307b8570d2c29891d /meta/classes | |
parent | a1e0ddbb7bc2c63845af67d5fd38f12be44e8775 (diff) | |
download | openembedded-core-contrib-6ad25304abefcbe538db7745e17ac213fa7d0719.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.
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>
(cherry picked from commit 791e8a8bacce5a7f31f4d7bcbfb17df2967fd258)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/overlayfs-etc.bbclass | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta/classes/overlayfs-etc.bbclass b/meta/classes/overlayfs-etc.bbclass index 91afee695c..40116e4c6e 100644 --- a/meta/classes/overlayfs-etc.bbclass +++ b/meta/classes/overlayfs-etc.bbclass @@ -34,6 +34,7 @@ OVERLAYFS_ETC_DEVICE ??= "" OVERLAYFS_ETC_USE_ORIG_INIT_NAME ??= "1" OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults" OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in" +OVERLAYFS_ETC_EXPOSE_LOWER ??= "0" python create_overlayfs_etc_preinit() { overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT") @@ -54,13 +55,15 @@ python create_overlayfs_etc_preinit() { preinitPath = oe.path.join(d.getVar("IMAGE_ROOTFS"), d.getVar("base_sbindir"), "preinit") initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") origInitNameSuffix = ".orig" + exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER')) args = { 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint, 'OVERLAYFS_ETC_MOUNT_OPTIONS': d.getVar('OVERLAYFS_ETC_MOUNT_OPTIONS'), 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, - 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName + 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName, + 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false" } if useOrigInit: |