From acfe3014d41de5e87cdbc58d0396349c6b9c3ffd Mon Sep 17 00:00:00 2001 From: Denys Dmytriyenko Date: Tue, 1 Apr 2014 03:54:11 +0000 Subject: udev-extraconf: update mount.sh to use /run/media instead of /media This is done to work around the issue of auto-mounting block devices (i.e. SD cards) when root filesystem is still in read-only mode and creating /media/ mount-points by udev is not possible. That is due to udev (/etc/rcS.d/S03udev) getting started earlier than checkroot (/etc/rcS.d/S10checkroot.sh) gets a chance to re-mount the rootfs as read-write. Although, canonical FHS specifies /media/ as a mount point for removable media devices, the latest 2.3 version was released in 2004 and since then FreeDesktop/udisks and other tools adopted the new /run/media// location. That was done to overcome read-only rootfs limitation, since /run is usually a tmpfs mounted partition, plus avoid name-clash between users. For our embedded systems environment we assume single-user operation and hence simplify mount point to just /run/media/. But for proper per-user mounting to /run/media//, some sort of session management is required along with the tool like udisks, that is out of scope of this simple udev-based auto-mounting. Signed-off-by: Denys Dmytriyenko Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- meta/recipes-core/udev/udev-extraconf_1.1.bb | 39 ++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 meta/recipes-core/udev/udev-extraconf_1.1.bb (limited to 'meta/recipes-core/udev/udev-extraconf_1.1.bb') diff --git a/meta/recipes-core/udev/udev-extraconf_1.1.bb b/meta/recipes-core/udev/udev-extraconf_1.1.bb new file mode 100644 index 0000000000..d69056dd76 --- /dev/null +++ b/meta/recipes-core/udev/udev-extraconf_1.1.bb @@ -0,0 +1,39 @@ +SUMMARY = "Extra machine specific configuration files" +DESCRIPTION = "Extra machine specific configuration files for udev, specifically blacklist information." +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690 \ + file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = " \ + file://automount.rules \ + file://mount.sh \ + file://mount.blacklist \ + file://autonet.rules \ + file://network.sh \ + file://localextra.rules \ +" + + +do_install() { + install -d ${D}${sysconfdir}/udev/rules.d + + install -m 0644 ${WORKDIR}/automount.rules ${D}${sysconfdir}/udev/rules.d/automount.rules + install -m 0644 ${WORKDIR}/autonet.rules ${D}${sysconfdir}/udev/rules.d/autonet.rules + install -m 0644 ${WORKDIR}/localextra.rules ${D}${sysconfdir}/udev/rules.d/localextra.rules + + install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/ + + install -d ${D}${sysconfdir}/udev/scripts/ + + install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh + install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts +} + +FILES_${PN} = "${sysconfdir}/udev" +RDEPENDS_${PN} = "udev" +CONFFILES_${PN} = "${sysconfdir}/udev/mount.blacklist" + +# to replace udev-extra-rules from meta-oe +RPROVIDES_${PN} = "udev-extra-rules" +RREPLACES_${PN} = "udev-extra-rules" +RCONFLICTS_${PN} = "udev-extra-rules" -- cgit 1.2.3-korg