From 26535326f9584a6998e0e79d6e0fb8983c41b5fb Mon Sep 17 00:00:00 2001 From: Arturo Buzarra Date: Thu, 17 Nov 2022 12:30:41 +0100 Subject: [PATCH] udev-extraconf: create mount points only for read-only filesystems Commit b8d46f01 ("read_only: create folders in build time") creates unconditionally default folders in spite of we are in a read-only filesystem or not, however there are different models (dual boot, single boot..) where these partitions exist or not, so this commit only creates these default partitions for a read-only filesystem. https://onedigi.atlassian.net/browse/DEL-8193 Signed-off-by: Arturo Buzarra --- .../udev/udev-extraconf_1.1.bbappend | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend b/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend index 370028e8e..045e8c4cf 100644 --- a/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend +++ b/meta-digi-arm/recipes-core/udev/udev-extraconf_1.1.bbappend @@ -13,10 +13,12 @@ SRC_URI:append:ccmp1 = " \ do_install:append() { - install -d ${D}/mnt - install -d ${D}/mnt/linux - install -d ${D}/mnt/update - install -d ${D}/mnt/data + if [ -n "${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', '1', '', d)}" ]; then + install -d ${D}/mnt + install -d ${D}/mnt/linux + install -d ${D}/mnt/update + install -d ${D}/mnt/data + fi install -m 0755 ${WORKDIR}/mount_digiparts.sh ${D}${sysconfdir}/udev/scripts/ sed -i -e 's|@base_sbindir@|${base_sbindir}|g' ${D}${sysconfdir}/udev/scripts/mount_digiparts.sh @@ -56,8 +58,10 @@ do_install:append:ccmp1() { install -m 0644 ${WORKDIR}/99-ext-rtc-wakeup.rules ${D}${sysconfdir}/udev/rules.d/ } -FILES:${PN}:append = " ${sysconfdir}/modprobe.d" -FILES:${PN}:append = " /mnt" +FILES:${PN}:append = " \ + ${sysconfdir}/modprobe.d \ + ${@bb.utils.contains('IMAGE_FEATURES', 'read-only-rootfs', ' /mnt', '', d)} \ +" # BT_TTY is machine specific (defined in machine config file) PACKAGE_ARCH = "${MACHINE_ARCH}"