From bb9746da76cbb7a2e21e68e1929269346995f278 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Tue, 19 Jun 2012 09:54:51 +0200 Subject: Add binary package of GPIOConfig, Tegrastats Add udev-late-mount --- recipes/trdx-config/files/udev-late-mount | 31 +++++++++++++++++++++++++++++++ recipes/trdx-config/trdx-config.bb | 25 +++++++++++++++---------- 2 files changed, 46 insertions(+), 10 deletions(-) create mode 100755 recipes/trdx-config/files/udev-late-mount (limited to 'recipes/trdx-config') diff --git a/recipes/trdx-config/files/udev-late-mount b/recipes/trdx-config/files/udev-late-mount new file mode 100755 index 0000000..f0506e0 --- /dev/null +++ b/recipes/trdx-config/files/udev-late-mount @@ -0,0 +1,31 @@ +#!/bin/sh +# +# mount drives missed during the udev 'add' action due to not yet avaliable filesytem +# +# Based on debian apmd scripts + +PATH=/bin:/usr/bin:/sbin:/usr/sbin + +[ -f /etc/default/rcS ] && . /etc/default/rcS + +case "$1" in + start) + #get all found drives + LIST=`ls /dev/sd??` + + for DRIVEFILE in $LIST + do + #if the drive is not in the already mounted drives generate an add event + DRIVE=`basename $DRIVEFILE` + cat /proc/mounts | awk '{print $1}' | grep -q "^$DRIVEFILE" || udevadm trigger --subsystem-match=block --sysname-match=$DRIVE --action=add ; echo "mounted $DRIVEFILE" + done + ;; + *) + echo "Usage: /etc/init.d/udev-late-mount {start}" + exit 1 + ;; +esac + +exit 0 + + diff --git a/recipes/trdx-config/trdx-config.bb b/recipes/trdx-config/trdx-config.bb index 81c0191..097fb78 100644 --- a/recipes/trdx-config/trdx-config.bb +++ b/recipes/trdx-config/trdx-config.bb @@ -1,6 +1,6 @@ DESCRIPTION = "setup files" LICENSE = "Public Domain" -PR = "r2" +PR = "r4" inherit update-rc.d @@ -8,23 +8,28 @@ PACKAGE_ARCH = "${MACHINE_ARCH}" SRC_URI = " file://inittab \ file://nvrm_daemon \ + file://udev-late-mount \ file://COPYING \ " LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING;md5=1c3a7fb45253c11c74434676d84fe7dd" -PACKAGES = "${PN}" +PACKAGES = "${PN} ${PN}-udev-late-mount" -FILES_${PN} = "/etc/* ${sysconfdir}" -PACKAGE_ARCH = "${MACHINE_ARCH}" +FILES_${PN}-udev-late-mount = "${sysconfdir}/init.d/udev-late-mount" +FILES_${PN} = "${sysconfdir}/inittab ${sysconfdir}/init.d/nvrm_daemon" DEPENDS_${PN} += "update-rc.d" -RDEPENDS_${PN} += "update-rc.d" +RDEPENDS_${PN} += "update-rc.d ${PN}-udev-late-mount" do_install () { - install -d ${D}/etc/init.d - install -m 0644 ${WORKDIR}/inittab ${D}/etc/ - install -m 0755 ${WORKDIR}/nvrm_daemon ${D}/etc/init.d + install -d ${D}${sysconfdir}/init.d + install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir} + install -m 0755 ${WORKDIR}/nvrm_daemon ${D}${sysconfdir}init.d + install -m 0755 ${WORKDIR}/udev-late-mount ${D}${sysconfdir}/init.d } -INITSCRIPT_NAME = "nvrm_daemon" -INITSCRIPT_PARAMS = "defaults 91" \ No newline at end of file +INITSCRIPT_PACKAGES = "${PN} ${PN}-udev-late-mount" +INITSCRIPT_NAME_${PN} = "nvrm_daemon" +INITSCRIPT_PARAMS_${PN} = "defaults 91" +INITSCRIPT_NAME_${PN}-udev-late-mount = "udev-late-mount" +INITSCRIPT_PARAMS_${PN}-udev-late-mount = "defaults 60" -- cgit v1.2.3