Major refactory of udev recipes
v2 cover Major refactory of udev recipes
The following changes since commit db446421933d640528328e46a29f828a36d6649b:
multilib.conf: Enable shadow-sysroot and libffi (2011-12-21 17:24:37 +0000)
are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD
Otavio Salvador (9):
udev: drop 145 version
udev-extraconf: move mount.blacklist to udev-extraconf dir
udev: reorganize files of 164 version
udev: use tabs for init script (no code changes)
udev: skip mounting /dev on tmpfs if it is on devtmpfs
udev: improve udev-cache robustness
udev: use 'echo' instead of 'echo -n' in init script
udev: run depmod if modules.dep doesn't exist
udev: split utilities onto udev-utils
meta/recipes-core/udev/files/fix-alignment.patch | 26 -
meta/recipes-core/udev/files/init | 212 ------
meta/recipes-core/udev/files/local.rules | 22 -
meta/recipes-core/udev/files/noasmlinkage.patch | 39 -
meta/recipes-core/udev/files/permissions.rules | 81 --
meta/recipes-core/udev/files/tmpfs.patch | 17 -
meta/recipes-core/udev/files/udev-cache | 20 -
meta/recipes-core/udev/files/udev.rules | 98 ---
meta/recipes-core/udev/files/udev_network_queue.sh | 35 -
meta/recipes-core/udev/files/udevsynthesize.patch | 778 --------------------
meta/recipes-core/udev/files/udevsynthesize.sh | 51 --
meta/recipes-core/udev/udev-145/enable-gudev.patch | 50 --
meta/recipes-core/udev/udev-145/init | 59 --
meta/recipes-core/udev/udev-145/local.rules | 33 -
meta/recipes-core/udev/udev-145/noasmlinkage.patch | 50 --
meta/recipes-core/udev/udev-145/unbreak.patch | 26 -
meta/recipes-core/udev/udev-164/init | 59 --
meta/recipes-core/udev/udev-164/permissions.rules | 131 ----
meta/recipes-core/udev/udev-164/run.rules | 14 -
meta/recipes-core/udev/udev-164/udev.rules | 116 ---
.../udev/{files => udev-extraconf}/mount.blacklist | 0
meta/recipes-core/udev/udev-new.inc | 91 ---
meta/recipes-core/udev/udev.inc | 120 ++--
.../udev/{files => udev}/devfs-udev.rules | 0
meta/recipes-core/udev/udev/init | 75 ++
meta/recipes-core/udev/{files => udev}/links.conf | 0
.../udev/{udev-164 => udev}/local.rules | 0
meta/recipes-core/udev/{files => udev}/mount.sh | 0
meta/recipes-core/udev/{files => udev}/network.sh | 0
.../udev/{udev-145 => udev}/permissions.rules | 0
.../recipes-core/udev/{udev-145 => udev}/run.rules | 0
.../udev/{files => udev}/udev-166-v4l1-1.patch | 0
meta/recipes-core/udev/udev/udev-cache | 30 +
meta/recipes-core/udev/udev/udev-cache.default | 4 +
.../udev/{udev-145 => udev}/udev.rules | 0
meta/recipes-core/udev/udev_145.bb | 55 --
meta/recipes-core/udev/udev_164.bb | 4 +-
37 files changed, 187 insertions(+), 2109 deletions(-)
delete mode 100644 meta/recipes-core/udev/files/fix-alignment.patch
delete mode 100755 meta/recipes-core/udev/files/init
delete mode 100644 meta/recipes-core/udev/files/local.rules
delete mode 100644 meta/recipes-core/udev/files/noasmlinkage.patch
delete mode 100644 meta/recipes-core/udev/files/permissions.rules
delete mode 100644 meta/recipes-core/udev/files/tmpfs.patch
delete mode 100644 meta/recipes-core/udev/files/udev-cache
delete mode 100644 meta/recipes-core/udev/files/udev.rules
delete mode 100644 meta/recipes-core/udev/files/udev_network_queue.sh
delete mode 100644 meta/recipes-core/udev/files/udevsynthesize.patch
delete mode 100644 meta/recipes-core/udev/files/udevsynthesize.sh
delete mode 100644 meta/recipes-core/udev/udev-145/enable-gudev.patch
delete mode 100644 meta/recipes-core/udev/udev-145/init
delete mode 100644 meta/recipes-core/udev/udev-145/local.rules
delete mode 100644 meta/recipes-core/udev/udev-145/noasmlinkage.patch
delete mode 100644 meta/recipes-core/udev/udev-145/unbreak.patch
delete mode 100644 meta/recipes-core/udev/udev-164/init
delete mode 100644 meta/recipes-core/udev/udev-164/permissions.rules
delete mode 100644 meta/recipes-core/udev/udev-164/run.rules
delete mode 100644 meta/recipes-core/udev/udev-164/udev.rules
rename meta/recipes-core/udev/{files => udev-extraconf}/mount.blacklist (100%)
delete mode 100644 meta/recipes-core/udev/udev-new.inc
rename meta/recipes-core/udev/{files => udev}/devfs-udev.rules (100%)
create mode 100644 meta/recipes-core/udev/udev/init
rename meta/recipes-core/udev/{files => udev}/links.conf (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/local.rules (100%)
rename meta/recipes-core/udev/{files => udev}/mount.sh (100%)
rename meta/recipes-core/udev/{files => udev}/network.sh (100%)
rename meta/recipes-core/udev/{udev-145 => udev}/permissions.rules (100%)
rename meta/recipes-core/udev/{udev-145 => udev}/run.rules (100%)
rename meta/recipes-core/udev/{files => udev}/udev-166-v4l1-1.patch (100%)
create mode 100644 meta/recipes-core/udev/udev/udev-cache
create mode 100644 meta/recipes-core/udev/udev/udev-cache.default
rename meta/recipes-core/udev/{udev-145 => udev}/udev.rules (100%)
delete mode 100644 meta/recipes-core/udev/udev_145.bbSignature · 1 line
1.7.2.5
PATCH v2 1/9 udev: drop 145 version
The 164 version has been the default version for some time and as we don't have any clear reasoning to keep 145 around, we're removing it now.
Some files were also removed as 164 recipe provides specific versions of it and thus those were going to be unused.
--- meta/recipes-core/udev/files/fix-alignment.patch | 26 - meta/recipes-core/udev/files/init | 212 ------ meta/recipes-core/udev/files/local.rules | 22 - meta/recipes-core/udev/files/noasmlinkage.patch | 39 - meta/recipes-core/udev/files/permissions.rules | 81 -- meta/recipes-core/udev/files/tmpfs.patch | 17 - meta/recipes-core/udev/files/udev.rules | 98 --- meta/recipes-core/udev/files/udev_network_queue.sh | 35 - meta/recipes-core/udev/files/udevsynthesize.patch | 778 -------------------- meta/recipes-core/udev/files/udevsynthesize.sh | 51 -- meta/recipes-core/udev/udev-145/enable-gudev.patch | 50 -- meta/recipes-core/udev/udev-145/init | 59 -- meta/recipes-core/udev/udev-145/local.rules | 33 - meta/recipes-core/udev/udev-145/noasmlinkage.patch | 50 -- meta/recipes-core/udev/udev-145/permissions.rules | 131 ---- meta/recipes-core/udev/udev-145/run.rules | 14 - meta/recipes-core/udev/udev-145/udev.rules | 116 --- meta/recipes-core/udev/udev-145/unbreak.patch | 26 - meta/recipes-core/udev/udev.inc | 72 -- meta/recipes-core/udev/udev_145.bb | 55 -- 20 files changed, 0 insertions(+), 1965 deletions(-) delete mode 100644 meta/recipes-core/udev/files/fix-alignment.patch delete mode 100755 meta/recipes-core/udev/files/init delete mode 100644 meta/recipes-core/udev/files/local.rules delete mode 100644 meta/recipes-core/udev/files/noasmlinkage.patch delete mode 100644 meta/recipes-core/udev/files/permissions.rules delete mode 100644 meta/recipes-core/udev/files/tmpfs.patch delete mode 100644 meta/recipes-core/udev/files/udev.rules delete mode 100644 meta/recipes-core/udev/files/udev_network_queue.sh delete mode 100644 meta/recipes-core/udev/files/udevsynthesize.patch delete mode 100644 meta/recipes-core/udev/files/udevsynthesize.sh delete mode 100644 meta/recipes-core/udev/udev-145/enable-gudev.patch delete mode 100644 meta/recipes-core/udev/udev-145/init delete mode 100644 meta/recipes-core/udev/udev-145/local.rules delete mode 100644 meta/recipes-core/udev/udev-145/noasmlinkage.patch delete mode 100644 meta/recipes-core/udev/udev-145/permissions.rules delete mode 100644 meta/recipes-core/udev/udev-145/run.rules delete mode 100644 meta/recipes-core/udev/udev-145/udev.rules delete mode 100644 meta/recipes-core/udev/udev-145/unbreak.patch delete mode 100644 meta/recipes-core/udev/udev.inc delete mode 100644 meta/recipes-core/udev/udev_145.bb
meta/recipes-core/udev/files/fix-alignment.patch deleted +0 -26
@@ -1,26 +0,0 @@ -Upstream-Status: Pending - -diff --git a/udev_rules_parse.c b/udev_rules_parse.c ---- a/udev_rules_parse.c -+++ b/udev_rules_parse.c -@@ -241,6 +241,7 @@ static int add_to_rules(struct udev_rule - int valid; - char *linepos; - char *attr; -+ size_t padding; - int retval; - - /* get all the keys */ -@@ -506,6 +507,11 @@ static int add_to_rules(struct udev_rule - - /* grow buffer and add rule */ - rule_size = sizeof(struct udev_rule) + rule->bufsize; -+ padding = (sizeof(size_t) - rule_size % sizeof(size_t)) % sizeof(size_t); -+ dbg("add %zi padding bytes", padding); -+ rule_size += padding; -+ rule->bufsize += padding; -+ - rules->buf = realloc(rules->buf, rules->bufsize + rule_size); - if (!rules->buf) { - err("realloc failed"); -
meta/recipes-core/udev/files/init deleted +0 -212
212 lines not on this page · raw message
meta/recipes-core/udev/files/local.rules deleted +0 -22
@@ -1,22 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -# Handle network interface setup -SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" -SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh"
meta/recipes-core/udev/files/noasmlinkage.patch deleted +0 -39
@@ -1,39 +0,0 @@ -Upstream-Status: Inappropriate [embedded] - -# -# Patch managed by http://www.holgerschurig.de/patcher.html -# - ---- udev-062/udev.c~noasmlinkage.patch -+++ udev-062/udev.c -@@ -54,7 +54,7 @@ - } - #endif - --static void asmlinkage sig_handler(int signum) -+static void sig_handler(int signum) - { - switch (signum) { - case SIGALRM: ---- udev-062/udevd.c~noasmlinkage.patch -+++ udev-062/udevd.c -@@ -639,7 +639,7 @@ - return msg; - } - --static void asmlinkage sig_handler(int signum) -+static void sig_handler(int signum) - { - int rc; - ---- udev-062/udevstart.c~noasmlinkage.patch -+++ udev-062/udevstart.c -@@ -323,7 +323,7 @@ - exec_list(&device_list); - } - --static void asmlinkage sig_handler(int signum) -+static void sig_handler(int signum) - { - switch (signum) { - case SIGALRM:
meta/recipes-core/udev/files/permissions.rules deleted +0 -81
81 lines not on this page · raw message
meta/recipes-core/udev/files/tmpfs.patch deleted +0 -17
@@ -1,17 +0,0 @@ -Upstream-Status: Inappropriate [embedded] - -# -# Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher -# - ---- udev-031/extras/start_udev~tmpfs 2004-09-10 17:10:03.000000000 -0400 -+++ udev-031/extras/start_udev 2004-09-11 15:18:15.560789160 -0400 -@@ -85,7 +85,7 @@ - fi - - echo "mounting... ramfs at $udev_root" --mount -n -t ramfs none $udev_root -+mount -n -t ramfs none $udev_root || mount -n -t tmpfs none $udev_root - - # propogate /udev from /sys - echo "Creating initial udev device nodes:"
meta/recipes-core/udev/files/udev.rules deleted +0 -98
98 lines not on this page · raw message
meta/recipes-core/udev/files/udev_network_queue.sh deleted +0 -35
@@ -1,35 +0,0 @@ -#! /bin/sh -# -# Copyright Matthias Hentges <[email protected]> (c) 2006 -# License: GPL (see http://www.gnu.org/licenses/gpl.txt for a copy of the license) -# -# Filename: udev_network_queue.sh -# Date: 03-May-06 - -do_start() { - if test -e /dev/udev_network_queue - then - echo "Activating queued NICs..." - for NIC in `cat /dev/udev_network_queue` - do - export INTERFACE="$NIC" ; export ACTION=add - /etc/udev/scripts/network.sh - done - echo "" - else - echo "No NICs queued" - fi -} - -do_stop() { - /bin/true -} - -case "$1" in -start) do_start;; -stop) do_stop;; -restart) do_stop - do_start;; -*) echo "Usage: `basename $0` [ start | stop | restart ]" - exit 0;; -esac
meta/recipes-core/udev/files/udevsynthesize.patch deleted +0 -778
778 lines not on this page · raw message
meta/recipes-core/udev/files/udevsynthesize.sh deleted +0 -51
51 lines not on this page · raw message
meta/recipes-core/udev/udev-145/enable-gudev.patch deleted +0 -50
50 lines not on this page · raw message
meta/recipes-core/udev/udev-145/init deleted +0 -59
59 lines not on this page · raw message
meta/recipes-core/udev/udev-145/local.rules deleted +0 -33
@@ -1,33 +0,0 @@ -# There are a number of modifiers that are allowed to be used in some -# of the different fields. They provide the following subsitutions: -# -# %n the "kernel number" of the device. -# For example, 'sda3' has a "kernel number" of '3' -# %e the smallest number for that name which does not matches an existing node -# %k the kernel name for the device -# %M the kernel major number for the device -# %m the kernel minor number for the device -# %b the bus id for the device -# %c the string returned by the PROGRAM -# %s{filename} the content of a sysfs attribute -# %% the '%' char itself -# - -# Media automounting -SUBSYSTEM=="block", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" - -# Handle network interface setup -SUBSYSTEM=="net", ACTION=="add" RUN+="/etc/udev/scripts/network.sh" -SUBSYSTEM=="net", ACTION=="remove" RUN+="/etc/udev/scripts/network.sh" - -# The first rtc device is symlinked to /dev/rtc -KERNEL=="rtc0", SYMLINK+="rtc" - -# Try and modprobe for drivers for new hardware -ACTION=="add", DEVPATH=="/devices/*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe $env{MODALIAS}" - -# Create a symlink to any touchscreen input device -# Need to use ../ so the eventX can find the parent inputX modalias which is a directory above -SUBSYSTEM=="input", KERNEL=="event[0-9]*", ATTRS{../modalias}=="input:*-e0*,3,*a0,1,*18,*", SYMLINK+="input/touchscreen0" -
meta/recipes-core/udev/udev-145/noasmlinkage.patch deleted +0 -50
50 lines not on this page · raw message
meta/recipes-core/udev/udev-145/permissions.rules deleted +0 -131
131 lines not on this page · raw message
meta/recipes-core/udev/udev-145/run.rules deleted +0 -14
@@ -1,14 +0,0 @@ -# debugging monitor -RUN+="socket:/org/kernel/udev/monitor" - -# run a command on remove events -ACTION=="remove", ENV{REMOVE_CMD}!="", RUN+="$env{REMOVE_CMD}" - -# ignore the events generated by virtual consoles -KERNEL=="ptmx", OPTIONS+="last_rule" -KERNEL=="console", OPTIONS+="last_rule" -KERNEL=="tty" , OPTIONS+="last_rule" -KERNEL=="tty[0-9]*", OPTIONS+="last_rule" -KERNEL=="pty*", OPTIONS+="last_rule" -SUBSYSTEM=="vc", OPTIONS+="last_rule" -
meta/recipes-core/udev/udev-145/udev.rules deleted +0 -116
116 lines not on this page · raw message
meta/recipes-core/udev/udev-145/unbreak.patch deleted +0 -26
@@ -1,26 +0,0 @@ -Upstream-Status: Inappropriate [legacy version] - -Index: udev-141/extras/volume_id/lib/Makefile.am -=================================================================== ---- udev-141.orig/extras/volume_id/lib/Makefile.am 2009-05-17 23:36:16.000000000 +0100 -+++ udev-141/extras/volume_id/lib/Makefile.am 2009-05-17 23:36:26.000000000 +0100 -@@ -54,19 +54,6 @@ - -version-info $(VOLID_LT_CURRENT):$(VOLID_LT_REVISION):$(VOLID_LT_AGE) \ - -export-symbols $(top_srcdir)/extras/volume_id/lib/exported_symbols - --# move devel files to $(prefix)$(libdir_name) if needed --install-data-hook: -- rm $(DESTDIR)$(rootlibdir)/libvolume_id.la -- if test "$(prefix)" != "$(exec_prefix)"; then \ -- mkdir -p $(DESTDIR)$(prefix)/$(libdir_name); \ -- mv $(DESTDIR)$(rootlibdir)/libvolume_id.a $(DESTDIR)$(prefix)/$(libdir_name)/; \ -- so_img_name=$$(readlink $(DESTDIR)$(rootlibdir)/libvolume_id.so); \ -- rm $(DESTDIR)$(rootlibdir)/libvolume_id.so; \ -- so_img_rel_target_prefix=$$(echo $(prefix)/$(libdir_name) | sed 's,\(^/\|\)[^/][^/]*,..,g'); \ -- ln -sf $$so_img_rel_target_prefix$(exec_prefix)/$(libdir_name)/$$so_img_name \ -- $(DESTDIR)$(prefix)/$(libdir_name)/libvolume_id.so; \ -- fi -- - EXTRA_DIST = \ - exported_symbols -
meta/recipes-core/udev/udev.inc deleted +0 -72
72 lines not on this page · raw message
meta/recipes-core/udev/udev_145.bb deleted +0 -55
55 lines not on this page · raw message
Signature · 1 line
1.7.2.5
PATCH v2 2/9 udev-extraconf: move mount.blacklist to udev-extraconf dir
In reply to Otavio Salvador---
.../udev/{files => udev-extraconf}/mount.blacklist | 0
1 files changed, 0 insertions(+), 0 deletions(-)
rename meta/recipes-core/udev/{files => udev-extraconf}/mount.blacklist (100%)meta/recipes-core/udev/udev-extraconf/mount.blacklist renamed from meta/recipes-core/udev/files/mount.blacklist +0 -0
Signature · 1 line
1.7.2.5
PATCH v2 3/9 udev: reorganize files of 164 version
In reply to Otavio SalvadorWe merged both files and udev-164 directory onto a single directory and renamed udev-new.inc onto udev.inc as we have a single version of udev now.
---
meta/recipes-core/udev/{udev-new.inc => udev.inc} | 0
.../udev/{files => udev}/devfs-udev.rules | 0
meta/recipes-core/udev/{udev-164 => udev}/init | 0
meta/recipes-core/udev/{files => udev}/links.conf | 0
.../udev/{udev-164 => udev}/local.rules | 0
meta/recipes-core/udev/{files => udev}/mount.sh | 0
meta/recipes-core/udev/{files => udev}/network.sh | 0
.../udev/{udev-164 => udev}/permissions.rules | 0
.../recipes-core/udev/{udev-164 => udev}/run.rules | 0
.../udev/{files => udev}/udev-166-v4l1-1.patch | 0
meta/recipes-core/udev/{files => udev}/udev-cache | 0
.../udev/{udev-164 => udev}/udev.rules | 0
meta/recipes-core/udev/udev_164.bb | 2 +-
13 files changed, 1 insertions(+), 1 deletions(-)
rename meta/recipes-core/udev/{udev-new.inc => udev.inc} (100%)
rename meta/recipes-core/udev/{files => udev}/devfs-udev.rules (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/init (100%)
rename meta/recipes-core/udev/{files => udev}/links.conf (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/local.rules (100%)
rename meta/recipes-core/udev/{files => udev}/mount.sh (100%)
rename meta/recipes-core/udev/{files => udev}/network.sh (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/permissions.rules (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/run.rules (100%)
rename meta/recipes-core/udev/{files => udev}/udev-166-v4l1-1.patch (100%)
rename meta/recipes-core/udev/{files => udev}/udev-cache (100%)
rename meta/recipes-core/udev/{udev-164 => udev}/udev.rules (100%)meta/recipes-core/udev/udev.inc renamed from meta/recipes-core/udev/udev-new.inc +0 -0
meta/recipes-core/udev/udev/devfs-udev.rules renamed from meta/recipes-core/udev/files/devfs-udev.rules +0 -0
meta/recipes-core/udev/udev/init renamed from meta/recipes-core/udev/udev-164/init +0 -0
meta/recipes-core/udev/udev/links.conf renamed from meta/recipes-core/udev/files/links.conf +0 -0
meta/recipes-core/udev/udev/local.rules renamed from meta/recipes-core/udev/udev-164/local.rules +0 -0
meta/recipes-core/udev/udev/mount.sh renamed from meta/recipes-core/udev/files/mount.sh +0 -0
meta/recipes-core/udev/udev/network.sh renamed from meta/recipes-core/udev/files/network.sh +0 -0
meta/recipes-core/udev/udev/permissions.rules renamed from meta/recipes-core/udev/udev-164/permissions.rules +0 -0
meta/recipes-core/udev/udev/run.rules renamed from meta/recipes-core/udev/udev-164/run.rules +0 -0
meta/recipes-core/udev/udev/udev-166-v4l1-1.patch renamed from meta/recipes-core/udev/files/udev-166-v4l1-1.patch +0 -0
meta/recipes-core/udev/udev/udev-cache renamed from meta/recipes-core/udev/files/udev-cache +0 -0
meta/recipes-core/udev/udev/udev.rules renamed from meta/recipes-core/udev/udev-164/udev.rules +0 -0
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,4 +1,4 @@ -include udev-new.inc +include udev.inc PR = "r7"
Signature · 1 line
1.7.2.5
PATCH v2 4/9 udev: use tabs for init script (no code changes)
In reply to Otavio Salvador--- meta/recipes-core/udev/udev/init | 38 +++++++++++++++++++------------------- 1 files changed, 19 insertions(+), 19 deletions(-)
meta/recipes-core/udev/udev/init +19 -19
@@ -17,10 +17,10 @@ export TZ=/etc/localtime [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf kill_udevd() { - if [ -x /sbin/pidof ]; then - pid=`/sbin/pidof -x udevd` - [ -n "$pid" ] && kill $pid - fi + if [ -x /sbin/pidof ]; then + pid=`/sbin/pidof -x udevd` + [ -n "$pid" ] && kill $pid + fi } export ACTION=add
@@ -29,9 +29,9 @@ echo -n "Starting udev" # mount the tmpfs on /dev, if not already done LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && { - mount -n -o mode=0755 -t tmpfs none "/dev" - mkdir -m 0755 /dev/pts - mkdir -m 1777 /dev/shm + mount -n -o mode=0755 -t tmpfs none "/dev" + mkdir -m 0755 /dev/pts + mkdir -m 1777 /dev/shm } if [ -e /etc/dev.tar ]; then
@@ -42,18 +42,18 @@ fi # make_extra_nodes kill_udevd > "/dev/null" 2>&1 - # trigger the sorted events - echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevd -d - - /sbin/udevadm control --env=STARTUP=1 - if [ "$not_first_boot" != "" ];then - /sbin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform - (/sbin/udevadm settle --timeout=3; /sbin/udevadm control --env=STARTUP=)& - else - /sbin/udevadm trigger --action=add - /sbin/udevadm settle - fi +# trigger the sorted events +echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug +/sbin/udevd -d + +/sbin/udevadm control --env=STARTUP=1 +if [ "$not_first_boot" != "" ];then + /sbin/udevadm trigger --action=add --subsystem-nomatch=tty --subsystem-nomatch=mem --subsystem-nomatch=vc --subsystem-nomatch=vtconsole --subsystem-nomatch=misc --subsystem-nomatch=dcon --subsystem-nomatch=pci_bus --subsystem-nomatch=graphics --subsystem-nomatch=backlight --subsystem-nomatch=video4linux --subsystem-nomatch=platform + (/sbin/udevadm settle --timeout=3; /sbin/udevadm control --env=STARTUP=)& +else + /sbin/udevadm trigger --action=add + /sbin/udevadm settle +fi echo exit 0
Signature · 1 line
1.7.2.5
PATCH v2 5/9 udev: skip mounting /dev on tmpfs if it is on devtmpfs
In reply to Otavio Salvador--- meta/recipes-core/udev/udev/init | 2 +- meta/recipes-core/udev/udev_164.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/recipes-core/udev/udev/init +1 -1
@@ -28,7 +28,7 @@ export ACTION=add echo -n "Starting udev" # mount the tmpfs on /dev, if not already done -LANG=C awk "\$2 == \"/dev\" && \$4 == \"tmpfs\" { exit 1 }" /proc/mounts && { +LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && { mount -n -o mode=0755 -t tmpfs none "/dev" mkdir -m 0755 /dev/pts mkdir -m 1777 /dev/shm
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,6 +1,6 @@ include udev.inc -PR = "r7" +PR = "r8" SRC_URI += "file://udev-166-v4l1-1.patch"
Signature · 1 line
1.7.2.5
PATCH v2 6/9 udev: improve udev-cache robustness
In reply to Otavio Salvador * allow udev-cache to be disabled at runtime (using /etc/default/udev-cache);
* make cache invalidated if kernel, bootparams or device list changes;
--- meta/recipes-core/udev/udev.inc | 11 ++++++++++- meta/recipes-core/udev/udev/init | 18 +++++++++++++++--- meta/recipes-core/udev/udev/udev-cache | 20 +++++++++++++++----- meta/recipes-core/udev/udev/udev-cache.default | 4 ++++ meta/recipes-core/udev/udev_164.bb | 2 +- 5 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 meta/recipes-core/udev/udev/udev-cache.default
meta/recipes-core/udev/udev.inc +10 -1
@@ -25,6 +25,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \ file://network.sh \ file://local.rules \ file://udev-cache \ + file://udev-cache.default \ file://init" inherit autotools pkgconfig update-rc.d
@@ -56,7 +57,7 @@ FILES_libgudev = "${base_libdir}/libgudev*.so.* ${libdir}/libgudev*.so.*" FILES_libgudev-dbg = "${base_libdir}/.debug/libgudev*.so.* ${libdir}/.debug/libgudev*.so.*" FILES_libgudev-dev = "${includedir}/gudev* ${libdir}/libgudev*.so ${libdir}/libgudev*.la \ ${libdir}/libgudev*.a ${libdir}/pkgconfig/gudev*.pc" -FILES_udev-cache = "${sysconfdir}/init.d/udev-cache" +FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-cache" FILES_udev-acl = "${base_libdir}/udev/udev-acl ${base_libdir}/udev/rules.d/70-acl.rules"
@@ -68,6 +69,14 @@ do_install_append () { install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/udev install -m 0755 ${WORKDIR}/udev-cache ${D}${sysconfdir}/init.d/udev-cache + install -d ${D}${sysconfdir}/default + install -m 0755 ${WORKDIR}/udev-cache.default ${D}${sysconfdir}/default/udev-cache + + 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/rules.d/ install -m 0644 ${WORKDIR}/local.rules ${D}${sysconfdir}/udev/rules.d/local.rules
meta/recipes-core/udev/udev/init +15 -3
@@ -14,6 +14,7 @@ export TZ=/etc/localtime [ -d /sys/class ] || exit 1 [ -r /proc/mounts ] || exit 1 [ -x /sbin/udevd ] || exit 1 +[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache [ -f /etc/udev/udev.conf ] && . /etc/udev/udev.conf kill_udevd() {
@@ -34,9 +35,20 @@ LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /pro mkdir -m 1777 /dev/shm } -if [ -e /etc/dev.tar ]; then - (cd /; tar xf /etc/dev.tar 2>&1 | grep -v 'time stamp' || true) - not_first_boot=1 +if [ "$DEVCACHE" != "" ]; then + # Invalidate udev cache if the kernel or its bootargs/cmdline have changed + [ -x /bin/uname ] && /bin/uname -mrspv > /tmp/uname || touch /tmp/uname + [ -r /proc/cmdline ] && cat /proc/cmdline > /tmp/cmdline || touch /tmp/cmdline + [ -r /proc/devices ] && cat /proc/devices > /tmp/devices || touch /tmp/devices + [ -r /proc/atags ] && cat /proc/atags > /tmp/atags || touch /tmp/atags + if [ -e $DEVCACHE ] && \ + cmp -s /tmp/uname /etc/udev/saved.uname && \ + cmp -s /tmp/cmdline /etc/udev/saved.cmdline && \ + cmp -s /tmp/devices /etc/udev/saved.devices && \ + cmp -s /tmp/atags /etc/udev/saved.atags; then + (cd /; tar xf $DEVCACHE > /dev/null 2>&1) + not_first_boot=1 + fi fi # make_extra_nodes
meta/recipes-core/udev/udev/udev-cache +15 -5
@@ -9,12 +9,22 @@ # Short-Description: cache /dev to speedup the udev next boot ### END INIT INFO -[ -d /sys/class ] || exit 1 -[ -r /proc/mounts ] || exit 1 -[ -x /sbin/udevd ] || exit 1 +export TZ=/etc/localtime -if [ ! -e /etc/dev.tar ]; then - (cd /; tar cf /etc/dev.tar dev) +[ -f /etc/default/udev-cache ] && . /etc/default/udev-cache + +if [ "$DEVCACHE" != "" ]; then + echo "Populating dev cache" + (cd /; tar cf $DEVCACHE dev) + mv /tmp/uname /etc/udev/saved.uname + mv /tmp/cmdline /etc/udev/saved.cmdline + mv /tmp/devices /etc/udev/saved.devices + mv /tmp/atags /etc/udev/saved.atags +else + rm -f /tmp/uname + rm -f /tmp/cmdline + rm -f /tmp/devices + rm -f /tmp/atags fi exit 0
meta/recipes-core/udev/udev/udev-cache.default new file +4 -0
@@ -0,0 +1,4 @@ +# Default for /etc/init.d/udev + +# Comment this out to disable device cache +DEVCACHE="/etc/dev.tar"
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,6 +1,6 @@ include udev.inc -PR = "r8" +PR = "r9" SRC_URI += "file://udev-166-v4l1-1.patch"
Signature · 1 line
1.7.2.5
PATCH v2 7/9 udev: use 'echo' instead of 'echo -n' in init script
In reply to Otavio SalvadorAvoid using two stage progress output to avoid text garbage during parallel boot.
--- meta/recipes-core/udev/udev/init | 3 +-- meta/recipes-core/udev/udev_164.bb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-)
meta/recipes-core/udev/udev/init +1 -2
@@ -26,7 +26,7 @@ kill_udevd() { export ACTION=add # propagate /dev from /sys -echo -n "Starting udev" +echo "Starting udev" # mount the tmpfs on /dev, if not already done LANG=C awk '$2 == "/dev" && ($3 == "tmpfs" || $3 == "devtmpfs") { exit 1 }' /proc/mounts && {
@@ -67,5 +67,4 @@ else /sbin/udevadm settle fi -echo exit 0
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,6 +1,6 @@ include udev.inc -PR = "r9" +PR = "r10" SRC_URI += "file://udev-166-v4l1-1.patch"
Signature · 1 line
1.7.2.5
PATCH v2 8/9 udev: run depmod if modules.dep doesn't exist
In reply to Otavio Salvador--- meta/recipes-core/udev/udev/init | 5 +++++ meta/recipes-core/udev/udev_164.bb | 2 +- 2 files changed, 6 insertions(+), 1 deletions(-)
meta/recipes-core/udev/udev/init +5 -0
@@ -51,6 +51,11 @@ if [ "$DEVCACHE" != "" ]; then fi fi +if [ -x /sbin/depmod ] && [ ! -e "/lib/modules/$(uname -r)"/modules.dep ]; then + mkdir -p /lib/modules/$(uname -r) + depmod -ae +fi + # make_extra_nodes kill_udevd > "/dev/null" 2>&1
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,6 +1,6 @@ include udev.inc -PR = "r10" +PR = "r11" SRC_URI += "file://udev-166-v4l1-1.patch"
Signature · 1 line
1.7.2.5
PATCH v2 9/9 udev: split utilities onto udev-utils
In reply to Otavio Salvador--- meta/recipes-core/udev/udev.inc | 6 +++++- meta/recipes-core/udev/udev_164.bb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-)
meta/recipes-core/udev/udev.inc +5 -1
@@ -36,7 +36,7 @@ libexecdir = "${base_libdir}/udev" EXTRA_OECONF = "--disable-introspection --with-rootlibdir=${base_libdir} \ --with-pci-ids-path=${datadir}/pci.ids" -PACKAGES =+ "udev-acl udev-consolekit" +PACKAGES =+ "udev-acl udev-consolekit udev-utils" PACKAGES =+ "udev-cache libudev libudev-dev libudev-dbg" PACKAGES =+ "libgudev libgudev-dev libgudev-dbg"
@@ -47,6 +47,8 @@ INITSCRIPT_NAME_udev-cache = "udev-cache" INITSCRIPT_PARAMS_udev-cache = "start 36 S ." FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit" +RRECOMMENDS_${PN} += "udev-utils" + FILES_${PN}-dbg += "${libexecdir}/.debug" FILES_${PN}-dev = "${datadir}/pkgconfig/udev.pc" FILES_libudev = "${base_libdir}/libudev.so.*"
@@ -61,6 +63,8 @@ FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-c FILES_udev-acl = "${base_libdir}/udev/udev-acl ${base_libdir}/udev/rules.d/70-acl.rules" +FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest ${base_sbindir}/udevadm" + RDEPENDS_udev-consolekit += "udev-acl" FILES_udev-consolekit = "${libdir}/ConsoleKit"
meta/recipes-core/udev/udev_164.bb +1 -1
@@ -1,6 +1,6 @@ include udev.inc -PR = "r11" +PR = "r12" SRC_URI += "file://udev-166-v4l1-1.patch"
Signature · 1 line
1.7.2.5