summaryrefslogtreecommitdiffstats
path: root/meta/classes-recipe
diff options
context:
space:
mode:
authorbaruch@tkos.co.il <baruch@tkos.co.il>2024-02-12 20:30:06 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-19 15:21:14 +0000
commit6f32769afbc81227129912551de5d44b7bad0b35 (patch)
tree9b7353362470081eaf20950e4ce173edcc774187 /meta/classes-recipe
parentd25f6b970fbe252d947082a46f7d84490ddcd7da (diff)
downloadpoky-6f32769afbc81227129912551de5d44b7bad0b35.tar.gz
overlayfs-etc: add option to skip creation of mount dirs
The 'preinit' script can't create mount directories when rootfs is read-only. Add an option to skip this step. The user must make sure that all required directories are already in the rootfs directory layout. Cc: Vyacheslav Yurkov <uvv.mail@gmail.com> (From OE-Core rev: 3d433d8559467d255bd19af2d0999c65ea24a48d) Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe')
-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 0c7834d01f..d339fbbeee 100644
--- a/meta/classes-recipe/overlayfs-etc.bbclass
+++ b/meta/classes-recipe/overlayfs-etc.bbclass
@@ -41,6 +41,7 @@ OVERLAYFS_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" 43OVERLAYFS_ETC_EXPOSE_LOWER ??= "0"
44OVERLAYFS_ETC_CREATE_MOUNT_DIRS ??= "1"
44 45
45python create_overlayfs_etc_preinit() { 46python create_overlayfs_etc_preinit() {
46 overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT") 47 overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT")
@@ -62,6 +63,7 @@ python create_overlayfs_etc_preinit() {
62 initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") 63 initBaseName = oe.path.join(d.getVar("base_sbindir"), "init")
63 origInitNameSuffix = ".orig" 64 origInitNameSuffix = ".orig"
64 exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER')) 65 exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER'))
66 createMoundDirs = oe.types.boolean(d.getVar('OVERLAYFS_ETC_CREATE_MOUNT_DIRS'))
65 67
66 args = { 68 args = {
67 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint, 69 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint,
@@ -69,7 +71,8 @@ python create_overlayfs_etc_preinit() {
69 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, 71 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType,
70 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, 72 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice,
71 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName, 73 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName,
72 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false" 74 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false",
75 'CREATE_MOUNT_DIRS': "true" if createMoundDirs else "false"
73 } 76 }
74 77
75 if useOrigInit: 78 if useOrigInit: