aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2011-05-27 09:48:53 +0200
committerKoen Kooi <koen@openembedded.org>2011-05-30 16:41:38 +0200
commit21145b253f070f56a6e521b3b3edbcba8c251594 (patch)
treeb72a572d80107494ba860bf63e090cc1e64142f7
parentecea326c7bdd623a4dd029b27f089f4c4bf6a2f4 (diff)
downloadopenembedded-21145b253f070f56a6e521b3b3edbcba8c251594.zip
openembedded-21145b253f070f56a6e521b3b3edbcba8c251594.tar.gz
openembedded-21145b253f070f56a6e521b3b3edbcba8c251594.tar.bz2
udev: add 171
As the recipe says, machine specific rules should be in their own recipe Signed-off-by: Koen Kooi <koen@openembedded.org>
-rw-r--r--recipes/udev/udev_171.bb125
1 files changed, 125 insertions, 0 deletions
diff --git a/recipes/udev/udev_171.bb b/recipes/udev/udev_171.bb
new file mode 100644
index 0000000..e53b490
--- /dev/null
+++ b/recipes/udev/udev_171.bb
@@ -0,0 +1,125 @@
+DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
+/dev/, handles hotplug events and loads drivers at boot time. It replaces \
+the hotplug package and requires a kernel not older than 2.6.27."
+
+# udev 169 and up require kernel 2.6.36 for ARM:
+# http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=67a77c8bf299f6264f001677becd056316ebce2f
+
+LICENSE = "GPLv2+"
+
+# Untested
+DEFAULT_PREFERENCE = "-1"
+
+# Needed for udev-extras
+DEPENDS = "gperf-native usbutils acl glib-2.0"
+
+SRCREV = "${PV}"
+PR = "r0"
+
+# version specific SRC_URI
+SRC_URI = "git://git.kernel.org/pub/scm/linux/hotplug/udev.git;protocol=git \
+ file://0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch \
+ file://gtk-doc.make"
+SRC_URI[md5sum] = "08eb7c2564bc89defcefdaa6ec4a9fc1"
+SRC_URI[sha256sum] = "1d5c548d7c85d30b3508b82ad88d853e28dddb6c526d0e67aa92ac18af93d218"
+
+# generic SRC_URI
+SRC_URI += " \
+ file://mount.sh \
+ file://mount.blacklist \
+ file://network.sh \
+ file://local.rules \
+ file://default \
+ file://init \
+ file://cache \
+ file://udev-compat-wrapper-patch \
+"
+
+# Machine specific udev rules should be in their own recipe that ${PN} can add to RRECOMMENDS
+
+
+S = "${WORKDIR}/git"
+
+inherit update-rc.d autotools
+
+EXTRA_OECONF += " \
+ --disable-introspection \
+ --with-pci-ids-path=/usr/share/misc \
+ ac_cv_file__usr_share_pci_ids=no \
+ ac_cv_file__usr_share_hwdata_pci_ids=no \
+ ac_cv_file__usr_share_misc_pci_ids=yes \
+ --sbindir=${base_sbindir} \
+ --libexecdir=${base_libdir}/udev \
+ --with-rootlibdir=${base_libdir} \
+ --disable-gtk-doc-html \
+ --with-systemdsystemunitdir=${base_libdir}/systemd/system/ \
+"
+
+do_configure_prepend() {
+ cp ${WORKDIR}/gtk-doc.make ${S}
+}
+
+INITSCRIPT_NAME = "udev"
+INITSCRIPT_PARAMS = "start 04 S ."
+
+PACKAGES =+ "libudev libgudev udev-utils"
+
+FILES_libudev = "${base_libdir}/libudev.so.*"
+FILES_libgudev = "${base_libdir}/libgudev*.so.*"
+
+FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest ${base_sbindir}/udevadm"
+
+RPROVIDES_${PN} = "hotplug"
+FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
+FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
+RDEPENDS_${PN} += "module-init-tools-depmod udev-utils"
+
+# udev installs binaries under $(udev_prefix)/lib/udev, even if ${libdir}
+# is ${prefix}/lib64
+FILES_${PN} += "/lib/udev* ${libdir}/ConsoleKit"
+FILES_${PN}-dbg += "/lib/udev/.debug"
+
+# Package up systemd files
+FILES_${PN} += "${base_libdir}/systemd"
+
+RPROVIDES_${PN}_append = " udev-compat-wrapper"
+
+do_install () {
+ install -d ${D}${usrsbindir} \
+ ${D}${sbindir}
+ oe_runmake 'DESTDIR=${D}' INSTALL=install install
+ install -d ${D}${sysconfdir}/init.d
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
+ install -m 0755 ${WORKDIR}/cache ${D}${sysconfdir}/init.d/udev-cache
+
+ install -d ${D}${sysconfdir}/default
+ install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/udev
+
+ install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
+ install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
+
+ touch ${D}${sysconfdir}/udev/saved.uname
+ touch ${D}${sysconfdir}/udev/saved.cmdline
+ touch ${D}${sysconfdir}/udev/saved.devices
+ touch ${D}${sysconfdir}/udev/saved.atags
+
+ 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
+
+ # disable udev-cache sysv script on systemd installs
+ if [ -d {D}/${base_libdir}/systemd/ ] ; then
+ ln -sf /dev/null ${D}/${base_libdir}/systemd/udev-cache.service
+ fi
+}
+
+# Create the cache after checkroot has run
+pkg_postinst_udev_append() {
+ if test "x$D" != "x"; then
+ OPT="-r $D"
+ else
+ OPT="-s"
+ fi
+ update-rc.d $OPT udev-cache start 36 S .
+}