diff options
| author | baruch@tkos.co.il <baruch@tkos.co.il> | 2024-02-12 20:30:06 +0200 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2024-11-02 06:32:36 -0700 |
| commit | d92e3d8193e60c3bb11b4272f2d3def97d4a83a4 (patch) | |
| tree | 5c65f23c7038c6a7b94a2ebed07779cdf8199271 /meta/classes | |
| parent | d3e106ba1e015d7ffba65fd87e4cbcd55e31767b (diff) | |
| download | poky-d92e3d8193e60c3bb11b4272f2d3def97d4a83a4.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: 302dd4a63f97e23631a62a0b902cc253f6843ab0)
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 3d433d8559467d255bd19af2d0999c65ea24a48d)
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 40116e4c6e..7096aae1a8 100644 --- a/meta/classes/overlayfs-etc.bbclass +++ b/meta/classes/overlayfs-etc.bbclass | |||
| @@ -35,6 +35,7 @@ OVERLAYFS_ETC_USE_ORIG_INIT_NAME ??= "1" | |||
| 35 | OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults" | 35 | OVERLAYFS_ETC_MOUNT_OPTIONS ??= "defaults" |
| 36 | OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in" | 36 | OVERLAYFS_ETC_INIT_TEMPLATE ??= "${COREBASE}/meta/files/overlayfs-etc-preinit.sh.in" |
| 37 | OVERLAYFS_ETC_EXPOSE_LOWER ??= "0" | 37 | OVERLAYFS_ETC_EXPOSE_LOWER ??= "0" |
| 38 | OVERLAYFS_ETC_CREATE_MOUNT_DIRS ??= "1" | ||
| 38 | 39 | ||
| 39 | python create_overlayfs_etc_preinit() { | 40 | python create_overlayfs_etc_preinit() { |
| 40 | overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT") | 41 | overlayEtcMountPoint = d.getVar("OVERLAYFS_ETC_MOUNT_POINT") |
| @@ -56,6 +57,7 @@ python create_overlayfs_etc_preinit() { | |||
| 56 | initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") | 57 | initBaseName = oe.path.join(d.getVar("base_sbindir"), "init") |
| 57 | origInitNameSuffix = ".orig" | 58 | origInitNameSuffix = ".orig" |
| 58 | exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER')) | 59 | exposeLower = oe.types.boolean(d.getVar('OVERLAYFS_ETC_EXPOSE_LOWER')) |
| 60 | createMoundDirs = oe.types.boolean(d.getVar('OVERLAYFS_ETC_CREATE_MOUNT_DIRS')) | ||
| 59 | 61 | ||
| 60 | args = { | 62 | args = { |
| 61 | 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint, | 63 | 'OVERLAYFS_ETC_MOUNT_POINT': overlayEtcMountPoint, |
| @@ -63,7 +65,8 @@ python create_overlayfs_etc_preinit() { | |||
| 63 | 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, | 65 | 'OVERLAYFS_ETC_FSTYPE': overlayEtcFsType, |
| 64 | 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, | 66 | 'OVERLAYFS_ETC_DEVICE': overlayEtcDevice, |
| 65 | 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName, | 67 | 'SBIN_INIT_NAME': initBaseName + origInitNameSuffix if useOrigInit else initBaseName, |
| 66 | 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false" | 68 | 'OVERLAYFS_ETC_EXPOSE_LOWER': "true" if exposeLower else "false", |
| 69 | 'CREATE_MOUNT_DIRS': "true" if createMoundDirs else "false" | ||
| 67 | } | 70 | } |
| 68 | 71 | ||
| 69 | if useOrigInit: | 72 | if useOrigInit: |
