Skip to contentSkip to conversation

Major refactor udev package preparing for update to 173 later

PATCH Superseded Otavio Salvador 2 participants 13 messages Dec 20, 2011

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Major refactor udev package preparing for update to 173 later

The following changes since commit ae4118a1f78f113c3d687c3aa6a86007cf977cae:

libsdl 1.2.14: fix packaging (2011-12-19 12:17:36 +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                    |  126 ++--
 .../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             |   33 +
 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, 193 insertions(+), 2112 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.bb
Signature · 1 line
1.7.2.5
#1 lore raw

PATCH 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
deleted file mode 100644
index dfe21b6..0000000
@@ -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
deleted file mode 100644
index 5f2efbe..0000000
@@ -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
deleted file mode 100644
index 4173fc5..0000000
@@ -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
deleted file mode 100644
index aa4a4f6..0000000
@@ -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
deleted file mode 100644
index 05e08e9..0000000
@@ -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
deleted file mode 100644
index dab319b..0000000
@@ -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
deleted file mode 100644
index 75d7137..0000000
@@ -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
deleted file mode 100644
index ef45c09..0000000
@@ -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
#2 lore raw

PATCH 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
similarity index 100%
rename from meta/recipes-core/udev/files/mount.blacklist
rename to meta/recipes-core/udev/udev-extraconf/mount.blacklist
Signature · 1 line
1.7.2.5
#3 lore raw

PATCH 3/9 udev: reorganize files of 164 version

In reply to Otavio Salvador

We 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
similarity index 100%
rename from meta/recipes-core/udev/udev-new.inc
rename to meta/recipes-core/udev/udev.inc
meta/recipes-core/udev/udev/devfs-udev.rules renamed from meta/recipes-core/udev/files/devfs-udev.rules +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/devfs-udev.rules
rename to meta/recipes-core/udev/udev/devfs-udev.rules
meta/recipes-core/udev/udev/init renamed from meta/recipes-core/udev/udev-164/init +0 -0
similarity index 100%
rename from meta/recipes-core/udev/udev-164/init
rename to meta/recipes-core/udev/udev/init
meta/recipes-core/udev/udev/links.conf renamed from meta/recipes-core/udev/files/links.conf +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/links.conf
rename to meta/recipes-core/udev/udev/links.conf
meta/recipes-core/udev/udev/local.rules renamed from meta/recipes-core/udev/udev-164/local.rules +0 -0
similarity index 100%
rename from meta/recipes-core/udev/udev-164/local.rules
rename to meta/recipes-core/udev/udev/local.rules
meta/recipes-core/udev/udev/mount.sh renamed from meta/recipes-core/udev/files/mount.sh +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/mount.sh
rename to meta/recipes-core/udev/udev/mount.sh
meta/recipes-core/udev/udev/network.sh renamed from meta/recipes-core/udev/files/network.sh +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/network.sh
rename to meta/recipes-core/udev/udev/network.sh
meta/recipes-core/udev/udev/permissions.rules renamed from meta/recipes-core/udev/udev-164/permissions.rules +0 -0
similarity index 100%
rename from meta/recipes-core/udev/udev-164/permissions.rules
rename to meta/recipes-core/udev/udev/permissions.rules
meta/recipes-core/udev/udev/run.rules renamed from meta/recipes-core/udev/udev-164/run.rules +0 -0
similarity index 100%
rename from meta/recipes-core/udev/udev-164/run.rules
rename to meta/recipes-core/udev/udev/run.rules
meta/recipes-core/udev/udev/udev-166-v4l1-1.patch renamed from meta/recipes-core/udev/files/udev-166-v4l1-1.patch +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/udev-166-v4l1-1.patch
rename to meta/recipes-core/udev/udev/udev-166-v4l1-1.patch
meta/recipes-core/udev/udev/udev-cache renamed from meta/recipes-core/udev/files/udev-cache +0 -0
similarity index 100%
rename from meta/recipes-core/udev/files/udev-cache
rename to meta/recipes-core/udev/udev/udev-cache
meta/recipes-core/udev/udev/udev.rules renamed from meta/recipes-core/udev/udev-164/udev.rules +0 -0
similarity index 100%
rename from meta/recipes-core/udev/udev-164/udev.rules
rename to meta/recipes-core/udev/udev/udev.rules
meta/recipes-core/udev/udev_164.bb +1 -1
index d487add..3e4e402 100644
@@ -1,4 +1,4 @@
-include udev-new.inc
+include udev.inc
 
 PR = "r7"
 
Signature · 1 line
1.7.2.5
#4 lore raw

PATCH 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
index 073942f..edc3c9a 100644
@@ -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
#5 lore raw

PATCH 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
index edc3c9a..0b25b07 100644
@@ -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
index 3e4e402..f952c90 100644
@@ -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
#6 lore raw

Re: [PATCH 5/9] udev: skip mounting /dev on tmpfs if it is on devtmpfs

A fixed patch for this one is going to be send.

Quoted 39 lines · 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
index edc3c9a..0b25b07 100644
@@ -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/ renamed from meta/recipes-core/udev/udev_164.bb +0 -0

udev_164.bb
index 3e4e402..f952c90 100644

meta/recipes-core/udev/udev_164.bb +1 -2
@@ -1,6 +1,6 @@
 include udev.inc
 
-PR = "r7"
+PR = "r8"
 
 SRC_URI += "file://udev-166-v4l1-1.patch"
 
--

1.7.2.5

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#7 lore raw

PATCH 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         |   23 ++++++++++++++++++-----
 meta/recipes-core/udev/udev/udev-cache.default |    4 ++++
 meta/recipes-core/udev/udev_164.bb             |    2 +-
 5 files changed, 48 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-core/udev/udev/udev-cache.default
meta/recipes-core/udev/udev.inc +10 -1
index eac7903..7b6ed64 100644
@@ -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
index 0b25b07..a2b6f53 100644
@@ -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 }' /proc
 	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 +18 -5
index 77bbda6..797cb82 100644
@@ -9,12 +9,25 @@
 # 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
+
+echo "Caching udev devnodes"
+
+if [ "$DEVCACHE" != "" ]; then
+	echo -n "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
+	echo
+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
new file mode 100644
index 0000000..5c4937a
@@ -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
index f952c90..c89eab4 100644
@@ -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
#8 lore raw

PATCH 7/9 udev: use 'echo' instead of 'echo -n' in init script

In reply to Otavio Salvador

Avoid 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
index a2b6f53..7bc6488 100644
@@ -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
index c89eab4..6d71f4d 100644
@@ -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
#9 lore raw

PATCH 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
index 7bc6488..511031c 100644
@@ -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
index 6d71f4d..b993a13 100644
@@ -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
#10 lore raw

PATCH 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
index 7b6ed64..8343eaf 100644
@@ -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
index b993a13..d661044 100644
@@ -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
#11 lore raw

Re: [PATCH 9/9] udev: split utilities onto udev-utils

Quoted 3 lines · Otavio Salvador

FILES_${PN} += "${libexecdir} ${libdir}/ConsoleKit"

meta/recipes-core/udev/udev.inc +2 -0
+RRECOMMENDS_${PN} += "udev-utils"
+

<snip>

meta/recipes-core/udev/udev.inc FILES_udev-cache = "${sysconfdir}/init.d/udev-cache ${sysconfdir}/default/udev-c · line 67

Quoted 2 lines
meta/recipes-core/udev/udev.inc +2 -0
+FILES_udev-utils = "${bindir}/udevinfo ${bindir}/udevtest ${base_sbindir}/udevadm"
+

The sysvinit scripts for udev itself, and the live-install image call the udevadm binary. Is RRECOMMENDS adequate to ensure it's available?

My reading of the documentation[1] leads me to believe so but I'm not sure if all of the package back-ends support this properly. Can you share which package back-end(s) you tested with?

Cheers,
Joshua

1.
http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#var-RRECOMMENDS

Signature · 3 lines
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre
#12 lore raw

Re: [PATCH 9/9] udev: split utilities onto udev-utils

Quoted 3 lines · Joshua Lock

The sysvinit scripts for udev itself, and the live-install image call the udevadm binary. Is RRECOMMENDS adequate to ensure it's available?

For opkg it works fine.

I can imagine if someone is doing a quite specific image then it could be removed; but obviously initscript would be broken on this case but if he/she adds it for BAD_RECOMMENDATIONS then he/she knows what he/she is doing.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br