summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-core
diff options
context:
space:
mode:
authorKoen Kooi <koen@dominion.thruhere.net>2011-05-28 15:30:01 +0200
committerKoen Kooi <koen@dominion.thruhere.net>2011-05-28 16:42:55 +0200
commit5e4b91988cd58e0c39c16b9989d87d5db440968f (patch)
tree4805a207d5ce201383b7282f96dcceb147302170 /meta-oe/recipes-core
parentf1b62bb0a907068af55b38919b71116f3423bcdf (diff)
downloadmeta-openembedded-5e4b91988cd58e0c39c16b9989d87d5db440968f.tar.gz
udev 171: add recipe with DP = -1
This is meant for people to test before making it the default. The goal is to get rid of as many udev rules as possible to speed up boot time Some numbers of udev-trigger running on beagleboard/angstrom: udev with no accept4() syscall in libc: 180s udev 168 with default rules: 12s udev 171 with default rules: 8s udev 171 with minimal rules 0.8s These times vary with the number of devices attached, SD card speed, etc. Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'meta-oe/recipes-core')
-rw-r--r--meta-oe/recipes-core/udev/udev/0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch45
-rw-r--r--meta-oe/recipes-core/udev/udev/gtk-doc.make230
-rw-r--r--meta-oe/recipes-core/udev/udev_171.bb130
3 files changed, 405 insertions, 0 deletions
diff --git a/meta-oe/recipes-core/udev/udev/0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch b/meta-oe/recipes-core/udev/udev/0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch
new file mode 100644
index 000000000..baf5acdee
--- /dev/null
+++ b/meta-oe/recipes-core/udev/udev/0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch
@@ -0,0 +1,45 @@
1From 85dcc3a22951d3586b05e3305d735f33b84ee3e5 Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 16 May 2011 14:11:01 +0200
4Subject: [PATCH] rip put doc generation, it depends on a working doctools setup
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8 Makefile.am | 21 +--------------------
9 1 files changed, 1 insertions(+), 20 deletions(-)
10
11diff --git a/Makefile.am b/Makefile.am
12index 651a154..69eb9d9 100644
13--- a/Makefile.am
14+++ b/Makefile.am
15@@ -174,26 +174,7 @@ udev_udevadm_LDADD = libudev/libudev-private.la
16 # ------------------------------------------------------------------------------
17 # udev man pages
18 # ------------------------------------------------------------------------------
19-dist_man_MANS = \
20- udev/udev.7 \
21- udev/udevadm.8 \
22- udev/udevd.8
23-
24-dist_noinst_DATA = \
25- udev/udev.html \
26- udev/udevadm.html \
27- udev/udevd.html
28-
29-EXTRA_DIST += \
30- udev/udev.xml \
31- udev/udevadm.xml \
32- udev/udevd.xml
33-
34-udev/%.7 udev/%.8 : udev/%.xml
35- $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
36-
37-udev/%.html : udev/%.xml
38- $(AM_V_GEN)$(XSLTPROC) -o $@ -nonet http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/docbook.xsl $<
39+dist_man_MANS =
40
41 # ------------------------------------------------------------------------------
42 # udev tests
43--
441.6.6.1
45
diff --git a/meta-oe/recipes-core/udev/udev/gtk-doc.make b/meta-oe/recipes-core/udev/udev/gtk-doc.make
new file mode 100644
index 000000000..57fab9868
--- /dev/null
+++ b/meta-oe/recipes-core/udev/udev/gtk-doc.make
@@ -0,0 +1,230 @@
1# -*- mode: makefile -*-
2
3####################################
4# Everything below here is generic #
5####################################
6
7if GTK_DOC_USE_LIBTOOL
8GTKDOC_CC = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
9GTKDOC_LD = $(LIBTOOL) --tag=CC --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
10GTKDOC_RUN = $(LIBTOOL) --mode=execute
11else
12GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
13GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS)
14GTKDOC_RUN =
15endif
16
17# We set GPATH here; this gives us semantics for GNU make
18# which are more like other make's VPATH, when it comes to
19# whether a source that is a target of one rule is then
20# searched for in VPATH/GPATH.
21#
22GPATH = $(srcdir)
23
24TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)
25
26EXTRA_DIST = \
27 $(content_files) \
28 $(HTML_IMAGES) \
29 $(DOC_MAIN_SGML_FILE) \
30 $(DOC_MODULE)-sections.txt \
31 $(DOC_MODULE)-overrides.txt
32
33DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \
34 pdf-build.stamp \
35 $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp \
36 $(srcdir)/pdf.stamp
37
38SCANOBJ_FILES = \
39 $(DOC_MODULE).args \
40 $(DOC_MODULE).hierarchy \
41 $(DOC_MODULE).interfaces \
42 $(DOC_MODULE).prerequisites \
43 $(DOC_MODULE).signals
44
45REPORT_FILES = \
46 $(DOC_MODULE)-undocumented.txt \
47 $(DOC_MODULE)-undeclared.txt \
48 $(DOC_MODULE)-unused.txt
49
50CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS)
51
52if ENABLE_GTK_DOC
53if GTK_DOC_BUILD_HTML
54HTML_BUILD_STAMP=html-build.stamp
55else
56HTML_BUILD_STAMP=
57endif
58if GTK_DOC_BUILD_PDF
59PDF_BUILD_STAMP=pdf-build.stamp
60else
61PDF_BUILD_STAMP=
62endif
63
64all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
65else
66all-local:
67endif
68
69docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP)
70
71$(REPORT_FILES): sgml-build.stamp
72
73#### scan ####
74
75scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB)
76 @echo 'gtk-doc: Scanning header files'
77 @-chmod -R u+w $(srcdir)
78 @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \
79 _source_dir="$${_source_dir} --source-dir=$$i" ; \
80 done ; \
81 cd $(srcdir) && \
82 gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES)
83 @if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \
84 CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" RUN="$(GTKDOC_RUN)" CFLAGS="$(GTKDOC_CFLAGS) $(CFLAGS)" LDFLAGS="$(GTKDOC_LIBS) $(LDFLAGS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \
85 else \
86 cd $(srcdir) ; \
87 for i in $(SCANOBJ_FILES) ; do \
88 test -f $$i || touch $$i ; \
89 done \
90 fi
91 @touch scan-build.stamp
92
93$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp
94 @true
95
96#### templates ####
97
98tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt
99 @echo 'gtk-doc: Rebuilding template files'
100 @-chmod -R u+w $(srcdir)
101 @cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS)
102 @touch tmpl-build.stamp
103
104tmpl.stamp: tmpl-build.stamp
105 @true
106
107$(srcdir)/tmpl/*.sgml:
108 @true
109
110#### xml ####
111
112sgml-build.stamp: tmpl.stamp $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files)
113 @echo 'gtk-doc: Building XML'
114 @-chmod -R u+w $(srcdir)
115 @_source_dir='' ; for i in $(DOC_SOURCE_DIR) ; do \
116 _source_dir="$${_source_dir} --source-dir=$$i" ; \
117 done ; \
118 cd $(srcdir) && \
119 gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS)
120 @touch sgml-build.stamp
121
122sgml.stamp: sgml-build.stamp
123 @true
124
125#### html ####
126
127html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
128 @echo 'gtk-doc: Building HTML'
129 @-chmod -R u+w $(srcdir)
130 @rm -rf $(srcdir)/html
131 @mkdir $(srcdir)/html
132 @mkhtml_options=""; \
133 gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-path"; \
134 if test "$(?)" = "0"; then \
135 mkhtml_options=--path="$(srcdir)"; \
136 fi; \
137 cd $(srcdir)/html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
138 @test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html )
139 @echo 'gtk-doc: Fixing cross-references'
140 @cd $(srcdir) && gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS)
141 @touch html-build.stamp
142
143#### pdf ####
144
145pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files)
146 @echo 'gtk-doc: Building PDF'
147 @-chmod -R u+w $(srcdir)
148 @rm -rf $(srcdir)/$(DOC_MODULE).pdf
149 @mkpdf_imgdirs=""; \
150 if test "x$(HTML_IMAGES)" != "x"; then \
151 for img in $(HTML_IMAGES); do \
152 part=`dirname $$img`; \
153 echo $$mkpdf_imgdirs | grep >/dev/null "\-\-imgdir=$$part "; \
154 if test $$? != 0; then \
155 mkpdf_imgdirs="$$mkpdf_imgdirs --imgdir=$$part"; \
156 fi; \
157 done; \
158 fi; \
159 cd $(srcdir) && gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_imgdirs $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS)
160 @touch pdf-build.stamp
161
162##############
163
164clean-local:
165 rm -f *~ *.bak
166 rm -rf .libs
167
168distclean-local:
169 cd $(srcdir) && \
170 rm -rf xml $(REPORT_FILES) $(DOC_MODULE).pdf \
171 $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt
172
173maintainer-clean-local: clean
174 cd $(srcdir) && rm -rf xml html
175
176install-data-local:
177 @installfiles=`echo $(srcdir)/html/*`; \
178 if test "$$installfiles" = '$(srcdir)/html/*'; \
179 then echo '-- Nothing to install' ; \
180 else \
181 if test -n "$(DOC_MODULE_VERSION)"; then \
182 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
183 else \
184 installdir="$(DESTDIR)$(TARGET_DIR)"; \
185 fi; \
186 $(mkinstalldirs) $${installdir} ; \
187 for i in $$installfiles; do \
188 echo '-- Installing '$$i ; \
189 $(INSTALL_DATA) $$i $${installdir}; \
190 done; \
191 if test -n "$(DOC_MODULE_VERSION)"; then \
192 mv -f $${installdir}/$(DOC_MODULE).devhelp2 \
193 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp2; \
194 mv -f $${installdir}/$(DOC_MODULE).devhelp \
195 $${installdir}/$(DOC_MODULE)-$(DOC_MODULE_VERSION).devhelp; \
196 fi; \
197 $(GTKDOC_REBASE) --relative --dest-dir=$(DESTDIR) --html-dir=$${installdir}; \
198 fi
199
200uninstall-local:
201 @if test -n "$(DOC_MODULE_VERSION)"; then \
202 installdir="$(DESTDIR)$(TARGET_DIR)-$(DOC_MODULE_VERSION)"; \
203 else \
204 installdir="$(DESTDIR)$(TARGET_DIR)"; \
205 fi; \
206 rm -rf $${installdir}
207
208#
209# Require gtk-doc when making dist
210#
211if ENABLE_GTK_DOC
212dist-check-gtkdoc:
213else
214dist-check-gtkdoc:
215 @echo "*** gtk-doc must be installed and enabled in order to make dist"
216 @false
217endif
218
219dist-hook: dist-check-gtkdoc dist-hook-local
220 mkdir $(distdir)/tmpl
221 mkdir $(distdir)/html
222 -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl
223 cp $(srcdir)/html/* $(distdir)/html
224 -cp $(srcdir)/$(DOC_MODULE).pdf $(distdir)/
225 -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/
226 -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/
227 cd $(distdir) && rm -f $(DISTCLEANFILES)
228 $(GTKDOC_REBASE) --online --relative --html-dir=$(distdir)/html
229
230.PHONY : dist-hook-local docs
diff --git a/meta-oe/recipes-core/udev/udev_171.bb b/meta-oe/recipes-core/udev/udev_171.bb
new file mode 100644
index 000000000..05b7bec60
--- /dev/null
+++ b/meta-oe/recipes-core/udev/udev_171.bb
@@ -0,0 +1,130 @@
1DESCRIPTION = "udev is a daemon which dynamically creates and removes device nodes from \
2/dev/, handles hotplug events and loads drivers at boot time. It replaces \
3the hotplug package and requires a kernel not older than 2.6.27."
4
5# udev 169 and up require kernel 2.6.36 for ARM:
6# http://git.kernel.org/?p=linux/hotplug/udev.git;a=commit;h=67a77c8bf299f6264f001677becd056316ebce2f
7
8LICENSE = "GPLv2+ & LGPLv2.1+"
9LICENSE_${PN} = "GPLv2+"
10LICENSE_libudev = "LGPLv2.1+"
11LICENSE_libgudev = "LGPLv2.1+"
12LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
13 file://libudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343 \
14 file://extras/gudev/COPYING;md5=a6f89e2100d9b6cdffcea4f398e37343"
15
16# Needs more testing
17DEFAULT_PREFERENCE = "-1"
18
19# Needed for udev-extras
20DEPENDS = "gperf-native usbutils acl glib-2.0"
21
22SRCREV = "${PV}"
23PR = "r0"
24
25# version specific SRC_URI
26SRC_URI = "git://git.kernel.org/pub/scm/linux/hotplug/udev.git;protocol=git \
27 file://0001-rip-put-doc-generation-it-depends-on-a-working-docto.patch \
28 file://gtk-doc.make"
29SRC_URI[md5sum] = "08eb7c2564bc89defcefdaa6ec4a9fc1"
30SRC_URI[sha256sum] = "1d5c548d7c85d30b3508b82ad88d853e28dddb6c526d0e67aa92ac18af93d218"
31
32# generic SRC_URI
33SRC_URI += " \
34 file://mount.sh \
35 file://mount.blacklist \
36 file://network.sh \
37 file://local.rules \
38 file://default \
39 file://init \
40 file://cache \
41"
42
43# Machine specific udev rules should be in their own recipe that ${PN} can add to RRECOMMENDS
44
45
46S = "${WORKDIR}/git"
47
48inherit update-rc.d autotools
49
50EXTRA_OECONF += " \
51 --disable-introspection \
52 --with-pci-ids-path=/usr/share/misc \
53 ac_cv_file__usr_share_pci_ids=no \
54 ac_cv_file__usr_share_hwdata_pci_ids=no \
55 ac_cv_file__usr_share_misc_pci_ids=yes \
56 --sbindir=${base_sbindir} \
57 --libexecdir=${base_libdir}/udev \
58 --with-rootlibdir=${base_libdir} \
59 --disable-gtk-doc-html \
60 --with-systemdsystemunitdir=${base_libdir}/systemd/system/ \
61"
62
63do_configure_prepend() {
64 cp ${WORKDIR}/gtk-doc.make ${S}
65}
66
67INITSCRIPT_NAME = "udev"
68INITSCRIPT_PARAMS = "start 04 S ."
69
70PACKAGES =+ "${PN}-systemd libudev libgudev udev-utils udev-consolekit"
71
72FILES_${PN}-systemd = "${base_libdir}/systemd/system/"
73
74FILES_libudev = "${base_libdir}/libudev.so.*"
75FILES_libgudev = "${base_libdir}/libgudev*.so.*"
76
77FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest ${base_sbindir}/udevadm"
78
79RPROVIDES_${PN} = "hotplug"
80FILES_${PN} += "${usrbindir}/* ${usrsbindir}/udevd"
81FILES_${PN}-dbg += "${usrbindir}/.debug ${usrsbindir}/.debug"
82RDEPENDS_${PN} += "module-init-tools-depmod udev-utils"
83
84# udev installs binaries under $(udev_prefix)/lib/udev, even if ${libdir}
85# is ${prefix}/lib64
86FILES_${PN} += "/lib/udev*"
87FILES_${PN}-dbg += "/lib/udev/.debug"
88
89FILES_${PN}-consolekit += "${libdir}/ConsoleKit"
90RDEPENDS_${PN}-consolekit += "consolekit"
91
92# Package up systemd files
93FILES_${PN} += "${base_libdir}/systemd"
94
95do_install () {
96 install -d ${D}${usrsbindir} \
97 ${D}${sbindir}
98 oe_runmake 'DESTDIR=${D}' INSTALL=install install
99 install -d ${D}${sysconfdir}/init.d
100 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev
101 install -m 0755 ${WORKDIR}/cache ${D}${sysconfdir}/init.d/udev-cache
102
103 install -d ${D}${sysconfdir}/default
104 install -m 0755 ${WORKDIR}/default ${D}${sysconfdir}/default/udev
105
106 cp ${S}/rules/rules.d/* ${D}${sysconfdir}/udev/rules.d/
107
108 install -m 0644 ${WORKDIR}/mount.blacklist ${D}${sysconfdir}/udev/
109 install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
110
111 touch ${D}${sysconfdir}/udev/saved.uname
112 touch ${D}${sysconfdir}/udev/saved.cmdline
113 touch ${D}${sysconfdir}/udev/saved.devices
114 touch ${D}${sysconfdir}/udev/saved.atags
115
116 install -d ${D}${sysconfdir}/udev/scripts/
117
118 install -m 0755 ${WORKDIR}/mount.sh ${D}${sysconfdir}/udev/scripts/mount.sh
119 install -m 0755 ${WORKDIR}/network.sh ${D}${sysconfdir}/udev/scripts
120}
121
122# Create the cache after checkroot has run
123pkg_postinst_udev_append() {
124 if test "x$D" != "x"; then
125 OPT="-r $D"
126 else
127 OPT="-s"
128 fi
129 update-rc.d $OPT udev-cache start 36 S .
130}