Skip to contentSkip to conversation

udev is now provided by systemd or eudev

PATCH Superseded Eric Le Bihan 7 participants 23 messages Feb 7, 2014 – Feb 12, 2014

lore
Share & tools
lore
#0 lore raw

v7 cover udev is now provided by systemd or eudev

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 also introduces new options, like the activation of the journal gateway.

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Changes v6 -> v7:
- updated udev related symbols and improved help text in Config.in.legacy (suggested by ThomasDS).
- removed redundant comments on dependencies for systemd and eudev (suggested by ThomasDS).
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by SamuelM).

Changes v5 -> v6:
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by Samuel M.).
- forced inotify support in Linux if eudev is used for /dev management.
- forced inotify support in Linux if systemd is used as init system.
- updated information about systemd requirements.

Changes v4 -> v5:
- disabled systemd and eudev on avr32.
- reverted Busybox binaries overwrite fix.

Changes v3 -> v4:
- updated /dev management section in user manual.
- fixed indentation of conditionals in Makefiles (suggested by Thomas P).
- added missing comments on dependencies (suggested by Thomas P, Thomas DS).
- fixed some packages not being converted to BR2_PACKAGE_HAS_UDEV.

Changes v2 -> v3:
- reordered patches for better bisectability (suggested by Thomas).
- removed uClibc support for Systemd (suggested by Arnout).
- bumped systemd to v207 (no more backport patches).
- bumped eudev to 1.3.

Changes v1 -> v2:
- split patch for better readability.
- promoted init system selection above /dev management in "System Configuration" menu.
- /dev management selection is not displayed if systemd is chosen as init system, as udev is the only possible choice (suggested by Arnout).
- added "Dynamic with eudev" choice in /dev management selection.
- less patches for systemd/uclibc compatibility, thanks to recent update of

    uclibc 0.9.33.2.

- autoreconf not needed anymore for systemd (thanks to removal of configure.ac patch).
- ACL/Gudev support in systemd activated only if acl/libglib2 are selected (suggested by Arnout).
- udev package provides BR2_PACKAGE_HAS_UDEV (suggested by Thomas).
- converted packages depending on BR2_PACKAGE_UDEV/BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV to BR2_PACKAGE_HAS_UDEV.
- eudev source code fetched as a tarball, not from Git tree (suggested by Arnout).
- removed "enable all extras" option from eudev configuration: Gudev support is activated if libglib2 is selected (suggested by Arnout).
- added option to build udev rule generator in eudev, as it was in previous version of udev.
- removed dependency on hwdata for systemd and eudev, as both embed their own hardware database.

Best regards,
ELB

Eric Le Bihan (4):
eudev: new package.
udev: convert to virtual package.
systemd: bump to v207.
manual: update /dev management section.

 Config.in.legacy                                   |   64 +++++++++++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 docs/manual/configure.txt                          |   20 ++--
 linux/linux.mk                                     |    5 +-
 package/Config.in                                  |    1 +
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |   38 ++++++++
 package/{udev => eudev}/S10udev                    |    2 +-
 package/eudev/eudev.mk                             |   43 +++++++++
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/libusb/libusb.mk                           |    2 +-
 package/modem-manager/Config.in                    |    6 +-
 package/network-manager/Config.in                  |    8 +-
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |   47 +++++++++-
 package/systemd/systemd-fix-getty-unit.patch       |   36 ++++---
 package/systemd/systemd-fix-page-size.patch        |   43 ---------
 package/systemd/systemd-uclibc-fix.patch           |   59 ------------
 package/systemd/systemd.mk                         |   98 ++++++++++++++------
 package/udev/Config.in                             |   51 +---------
 package/udev/udev.mk                               |   47 ++--------
 package/udisks/Config.in                           |   14 +--
 package/usbmount/Config.in                         |    4 +-
 package/vlc/vlc.mk                                 |    2 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   42 ++++-----
 36 files changed, 361 insertions(+), 311 deletions(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH v7 1/4 eudev: new package.

eudev is a userspace device management daemon. It is a standalone version, independent from systemd. It is a fork maintained by Gentoo.

Features:

- No extra configuration options are available: Gudev is build if libglib2 is selected.
- No dependency on hwdata as the package uses its own hardware database (as does systemd).

eudev 1.3 is in sync with systemd v207.

---
 linux/linux.mk                  |    2 ++
 package/Config.in               |    1 +
 package/eudev/Config.in         |   37 +++++++++++++++++++++++++++++++++
 package/{udev => eudev}/S10udev |    2 +-
 package/eudev/eudev.mk          |   43 +++++++++++++++++++++++++++++++++++++++
 system/Config.in                |   12 +++++++++++
 6 files changed, 96 insertions(+), 1 deletion(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
linux/linux.mk +2 -0
index 1a81f77..206dab8 100644
@@ -190,6 +190,8 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
+	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_KTAP),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEBUG_FS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_EVENT_TRACING,$(@D)/.config)
package/Config.in +1 -0
index ee2a68e..ecfceb6 100644
@@ -280,6 +280,7 @@ source "package/dmraid/Config.in"
 source "package/dvb-apps/Config.in"
 source "package/dvbsnoop/Config.in"
 source "package/eeprog/Config.in"
+source "package/eudev/Config.in"
 source "package/evemu/Config.in"
 source "package/evtest/Config.in"
 source "package/fan-ctrl/Config.in"
package/eudev/Config.in new file +37 -0
new file mode 100644
index 0000000..94d94e0
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_LARGEFILE # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_PREFER_STATIC_LIB # kmod
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	help
+	  Userspace device daemon. This is a standalone version,
+	  independent of systemd. It is a fork maintained by Gentoo.
+
+	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs
+	  and inotify.
+
+	  http://github.com/gentoo/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_RULES_GEN
+	bool "enable rules generator"
+	help
+	  Enable persistent rules generator
+
+endif
+
+comment "eudev needs eudev /dev management"
+	depends on !BR2_avr32
+	depends on BR2_USE_MMU
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
+	depends on !BR2_avr32
+	depends on BR2_USE_MMU
+	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
package/eudev/S10udev renamed from package/udev/S10udev +1 -1
similarity index 98%
copy from package/udev/S10udev
copy to package/eudev/S10udev
index 2c7b7e9..e4d28a2 100755
@@ -17,7 +17,7 @@
 #
 
 # Check for missing binaries
-UDEV_BIN=/lib/udev/udevd
+UDEV_BIN=/sbin/udevd
 test -x $UDEV_BIN || exit 5
 
 # Check for config file and read it
package/eudev/eudev.mk new file +43 -0

43 lines not on this page · raw message

system/Config.in +12 -0
index 181a0ac..d1b0cbb 100644
@@ -137,6 +137,18 @@ comment "udev doesn't work with 'prefer static libraries'"
 	depends on !BR2_avr32 # udev
 	depends on BR2_PREFER_STATIC_LIB
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	bool "Dynamic using eudev"
+	depends on !BR2_avr32 # eudev
+	depends on BR2_LARGEFILE
+	depends on BR2_USE_WCHAR
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_PACKAGE_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
+	depends on !BR2_avr32 # eudev
+	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+
 endchoice
 
 config BR2_ROOTFS_DEVICE_TABLE
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v7 1/4 eudev: new package.

hi Eric,

Eric Le Bihan <[email protected]> schreef:

Quoted 13 lines

eudev is a userspace device management daemon. It is a standalone version, independent from systemd. It is a fork maintained by Gentoo.

Features:

- No extra configuration options are available: Gudev is build if libglib2 is selected.
- No dependency on hwdata as the package uses its own hardware database (as does systemd).

eudev 1.3 is in sync with systemd v207.

...

Quoted 33 lines
package/eudev/Config.in new file +27 -0
new file mode 100644
index 0000000..94d94e0
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_LARGEFILE # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_PREFER_STATIC_LIB # kmod
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	help
+	  Userspace device daemon. This is a standalone version,
+	  independent of systemd. It is a fork maintained by Gentoo.
+
+	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs
+	  and inotify.
+
+	  http://github.com/gentoo/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_RULES_GEN
+	bool "enable rules generator"
+	help
+	  Enable persistent rules generator
+
+endif

package/eudev/Config.in line 37

Quoted 10 lines
package/eudev/Config.in new file +10 -0
+
+comment "eudev needs eudev /dev management"
+	depends on !BR2_avr32
+	depends on BR2_USE_MMU
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
+	depends on !BR2_avr32
+	depends on BR2_USE_MMU
+	depends on !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB

I don't see the mmu option on the main symbol, so either that or the comment dependencies are not correct..

Best regards,
Thomas

#3 lore raw

PATCH v7 1/4 eudev: new package.

Hi!

Quoted 19 lines · Thomas De Schampheleire
Quoted 19 lines
package/eudev/Config.in new file +13 -0
new file mode 100644
index 0000000..94d94e0
@@ -0,0 +1,37 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_LARGEFILE # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_PREFER_STATIC_LIB # kmod
+	select BR2_PACKAGE_UTIL_LINUX
+	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+	select BR2_PACKAGE_KMOD
+	help
+	  Userspace device daemon. This is a standalone version,
+	  independent of systemd. It is a fork maintained by Gentoo.
Quoted 8 lines

package/eudev/Config.in line 18

Quoted 5 lines
package/eudev/Config.in new file +5 -0
+
+	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs
+	  and inotify.
+
+	  http://github.com/gentoo/eudev/

I don't see the mmu option on the main symbol, so either that or the comment dependencies are not correct..

I forgot to add 'depends on BR2_USE_MMU # fork()'. I will fix this.

Best regards,
ELB

#4 lore raw

PATCH v7 2/4 udev: convert to virtual package.

In reply to Eric Le Bihan

This patch converts udev to a virtual package. For the moment, there is only one provider for the udev features: eudev.

Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV.

Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol.

---
 Config.in.legacy                                   |   55 ++++++++++++++++++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 linux/linux.mk                                     |    2 -
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |    1 +
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/libusb/libusb.mk                           |    2 +-
 package/modem-manager/Config.in                    |    6 +--
 package/network-manager/Config.in                  |    8 ++-
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |    6 +--
 package/udev/Config.in                             |   51 ++----------------
 package/udev/udev.mk                               |   49 ++++-------------
 package/udisks/Config.in                           |   14 ++---
 package/usbmount/Config.in                         |    4 +-
 package/vlc/vlc.mk                                 |    2 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   22 ++------
 28 files changed, 112 insertions(+), 150 deletions(-)
Config.in.legacy +55 -0
index 2fe9cf9..6d594c6 100644
@@ -101,6 +101,61 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	bool "/dev management by udev removed"
+	select BR2_LEGACY
+	help
+	  The 'udev' package has been converted to a virtual package.
+	  There is currently one provider for this feature: 'eudev'.
+
+	  Therefore, you must choose 'Dynamic using eudev' in the
+	  '/dev management' menu to get the same behaviour as in your
+	   old configuration.
+
+	  You must also check the packages depending on 'udev' are still
+	  selected.
+
+config BR2_PACKAGE_UDEV
+	bool "udev is now a virtual package"
+	select BR2_LEGACY
+	select BR2_PACKAGE_HAS_UDEV
+	help
+	  The 'udev' package has been converted to a virtual package.
+	  There is currently one provider for this feature: 'eudev'.
+
+	  Your old configuration refers to packages depending on 'udev',
+	  either for build or at runtime.
+
+	  Check that a 'udev' provider is selected, i.e. that 'eudev' is
+	  selected, which is the case if '/dev management' is set to
+	  'Dynamic using eudev'.
+
+config BR2_PACKAGE_UDEV_RULES_GEN
+	bool "udev rules generation handled by eudev"
+	select BR2_LEGACY
+	select BR2_PACKAGE_EUDEV
+	select BR2_PACKAGE_EUDEV_RULES_GEN
+	help
+	  The 'udev' package has been converted to a virtual package.
+	  There is currently one provider for this feature: 'eudev'.
+
+	  udev rules generation will now be handled by 'eudev'.
+
+	  Check that '/dev management' is set to 'Dynamic using eudev'
+	  to get the same behaviour as in your old configuration.
+
+config BR2_PACKAGE_UDEV_ALL_EXTRAS
+	bool "udev extras removed"
+	select BR2_LEGACY
+	help
+	  The 'udev' package has been converted to a virtual package.
+	  There is currently one provider for this feature: 'eudev'.
+
+	  The option to enable the extra features of 'udev' (gudev, ...)
+	  has been removed. These features are automatically enabled in
+	  the 'udev' providers if the dependencies are selected. For
+	  example, selecting 'libglib2' will trigger the build of gudev.
+
 config BR2_sh2
 	bool "sh2 support removed"
 	help
docs/manual/adding-packages-directory.txt +1 -2
index 754a145..40af809 100644
@@ -273,8 +273,7 @@ foo needs a toolchain w/ featA, featB, featC and a Linux kernel to be built
 Dependencies on udev /dev management
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 If a package needs udev /dev management, it should depend on symbol
-+BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV+, and the following comment
-should be added:
++BR2_PACKAGE_HAS_UDEV+, and the following comment should be added:
 
 --------------------------
 foo needs udev /dev management
linux/linux.mk +0 -2
index 206dab8..1bfa279 100644
@@ -188,8 +188,6 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS_MOUNT,$(@D)/.config))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV),
 		$(call KCONFIG_SET_OPT,CONFIG_UEVENT_HELPER_PATH,\"/sbin/mdev\",$(@D)/.config))
-	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_KTAP),
package/ccid/ccid.mk +1 -1
index f39edce..b635aa1 100644
@@ -12,7 +12,7 @@ CCID_LICENSE_FILES = COPYING
 CCID_INSTALL_STAGING = YES
 CCID_DEPENDENCIES = pcsc-lite host-pkgconf libusb
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define CCID_INSTALL_UDEV_RULES
 	if test -d $(TARGET_DIR)/etc/udev/rules.d ; then \
 		cp $(@D)/src/92_pcscd_ccid.rules $(TARGET_DIR)/etc/udev/rules.d/ ; \
package/eudev/Config.in +1 -0
index 94d94e0..90124f2 100644
@@ -5,6 +5,7 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_LARGEFILE # util-linux
 	depends on BR2_USE_WCHAR # util-linux
 	depends on !BR2_PREFER_STATIC_LIB # kmod
+	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
 	select BR2_PACKAGE_KMOD
package/gpsd/gpsd.mk +1 -1
index efc8d37..0f655ba 100644
@@ -222,7 +222,7 @@ define GPSD_INSTALL_STAGING_CMDS
 		install)
 endef
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 define GPSD_INSTALL_UDEV_RULES
 	(cd $(@D); \
 		$(GPSD_SCONS_ENV) \
package/libatasmart/Config.in +2 -2
index a3e44f8..534e7c1 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATASMART
 	bool "libatasmart"
-	depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
 	help
 	  The libatasmart package is a disk reporting library.
 	  It only supports a subset of the ATA S.M.A.R.T. functionality.
@@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBATASMART
 	  http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html
 
 comment "libatasmart requires udev to be enabled"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
package/libcec/libcec.mk +1 -1
index 910f319..99cc767 100644
@@ -18,7 +18,7 @@ ifeq ($(BR2_PACKAGE_LOCKDEV),y)
 LIBCEC_DEPENDENCIES += lockdev
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 LIBCEC_DEPENDENCIES += udev
 endif
 
package/libdrm/libdrm.mk +1 -1
index f5efaf1..a1b0580 100644
@@ -65,7 +65,7 @@ else
 LIBDRM_CONF_OPT += --disable-freedreno-experimental-api
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 LIBDRM_CONF_OPT += --enable-udev
 LIBDRM_DEPENDENCIES += udev
 else
package/libmbim/Config.in +2 -3
index d034e84..bd34dd4 100644
@@ -2,9 +2,8 @@ config BR2_PACKAGE_LIBMBIM
 	bool "libmbim"
 	depends on BR2_USE_WCHAR # libglib2
 	depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LIBGLIB2
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	help
 	  libmbim is a glib-based library for talking to WWAN modems and
 	  devices which speak the Mobile Interface Broadband Model (MBIM)
@@ -14,4 +13,4 @@ config BR2_PACKAGE_LIBMBIM
 
 comment "libmbim needs udev /dev management and a toolchain w/ wchar, threads"
 	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_PACKAGE_HAS_UDEV
package/libusb/libusb.mk +1 -1
index a8ff74c..417b2ce 100644
@@ -21,7 +21,7 @@ ifeq ($(BR2_avr32),y)
 LIBUSB_CONF_OPT += --disable-timerfd
 endif
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 LIBUSB_DEPENDENCIES += udev
 else
 LIBUSB_CONF_OPT += --disable-udev
package/modem-manager/Config.in +2 -4
index e157ca8..fe60850 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MODEM_MANAGER
 	bool "modemmanager"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
@@ -8,8 +8,6 @@ config BR2_PACKAGE_MODEM_MANAGER
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
 	select BR2_PACKAGE_DBUS_GLIB
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	help
 	  ModemManager is a DBus-activated daemon which controls mobile
 	  broadband (2G/3G/4G) devices and connections.
@@ -33,4 +31,4 @@ endif
 
 comment "modemmanager needs udev /dev management and a toolchain w/ largefile, wchar, threads, IPv6"
 	depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV
package/network-manager/Config.in +3 -5
index a194433..a4eeeaf 100644
@@ -1,16 +1,14 @@
 config BR2_PACKAGE_NETWORK_MANAGER
 	bool "NetworkManager"
 	depends on !BR2_avr32 # udev
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	select BR2_PACKAGE_DBUS
 	depends on BR2_INET_IPV6
 	depends on BR2_LARGEFILE # acl
 	depends on BR2_USE_WCHAR # libglib2 and gnutls
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
 	depends on BR2_USE_MMU # dbus
+	depends on BR2_PACKAGE_HAS_UDEV
+	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	select BR2_PACKAGE_GNUTLS
 	select BR2_PACKAGE_LIBGCRYPT
 	select BR2_PACKAGE_LIBNL
@@ -33,4 +31,4 @@ comment "NetworkManager needs udev /dev management and a toolchain w/ IPv6, larg
 	depends on BR2_USE_MMU
 	depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
 		!BR2_TOOLCHAIN_HAS_THREADS || \
-		!BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+		!BR2_PACKAGE_HAS_UDEV
package/ofono/ofono.mk +1 -1
index aaaa8fa..9e30c63 100644
@@ -22,7 +22,7 @@ OFONO_CONF_OPT = --disable-test
 # make sure that it is defined.
 OFONO_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -D_GNU_SOURCE"
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 	OFONO_CONF_OPT += --enable-udev
 	OFONO_DEPENDENCIES += udev
 else
package/pcsc-lite/Config.in +1 -1
index 4cd89e9..aab42e8 100644
@@ -11,7 +11,7 @@ if BR2_PACKAGE_PCSC_LITE
 
 config BR2_PACKAGE_PCSC_LITE_FORCE_LIBUSB
 	bool "use libusb"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LIBUSB
 	help
 	  Select Y if you want to support usb smart card readers.
package/pcsc-lite/pcsc-lite.mk +1 -1
index afbe822..18859cd 100644
@@ -16,7 +16,7 @@ PCSC_LITE_LICENSE_FILES = COPYING
 # - libudev and libusb can't be used together
 # - libudev has a priority over libusb
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 PCSC_LITE_CONF_OPT += --enable-libudev --disable-libusb
 PCSC_LITE_DEPENDENCIES += udev
 else
package/pulseaudio/pulseaudio.mk +1 -1
index cdeabc5..3fd3cd9 100644
@@ -26,7 +26,7 @@ PULSEAUDIO_DEPENDENCIES = \
 	$(if $(BR2_PACKAGE_AVAHI_DAEMON),avahi) \
 	$(if $(BR2_PACKAGE_DBUS),dbus) \
 	$(if $(BR2_PACKAGE_BLUEZ_UTILS),bluez_utils) \
-	$(if $(BR2_PACKAGE_UDEV),udev) \
+	$(if $(BR2_PACKAGE_HAS_UDEV),udev) \
 	$(if $(BR2_PACKAGE_OPENSSL),openssl) \
 	$(if $(BR2_PACKAGE_FFTW),fftw) \
 	$(if $(BR2_PACKAGE_WEBRTC_AUDIO_PROCESSING),webrtc-audio-processing) \
package/systemd/Config.in +3 -3
index fe81900..500e623 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_SYSTEMD
 	bool "systemd"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_INET_IPV6
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
 	depends on BR2_USE_MMU # dbus
@@ -18,7 +18,7 @@ config BR2_PACKAGE_SYSTEMD
 
 	  http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
+comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
 	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || !BR2_INET_IPV6 || \
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
 		!BR2_TOOLCHAIN_HAS_THREADS
package/udev/Config.in +5 -46

52 lines not on this page · raw message

package/udev/udev.mk +9 -40

57 lines not on this page · raw message

package/udisks/Config.in +8 -6
index e9539a3..d560b6c 100644
@@ -1,11 +1,9 @@
 config BR2_PACKAGE_UDISKS
 	bool "udisks"
 	depends on !BR2_avr32 # udev
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2
 	depends on BR2_USE_MMU # lvm2
-	select BR2_PACKAGE_UDEV
-	select BR2_PACKAGE_UDEV_ALL_EXTRAS
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_DBUS_GLIB
 	depends on BR2_USE_WCHAR # dbus-glib -> glib2
@@ -36,8 +34,12 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev management"
 	depends on !BR2_avr32
 	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
-		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_HAS_UDEV
+
+comment "udisks needs a toolchain w/ wchar, threads"
+	depends on !BR2_avr32
+	depends on BR2_USE_MMU
+	depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
package/usbmount/Config.in +2 -2
index 2583e7c..0bb8883 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_USBMOUNT
 	bool "usbmount"
-	depends on BR2_PACKAGE_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_LOCKFILE_PROGS
 	help
 	  The usbmount package automatically mounts USB mass storage devices
@@ -9,4 +9,4 @@ config BR2_PACKAGE_USBMOUNT
 	  http://usbmount.alioth.debian.org/
 
 comment "usbmount requires udev to be enabled"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
package/vlc/vlc.mk +1 -1
index b39c6c7..c45e018 100644
@@ -239,7 +239,7 @@ else
 VLC_CONF_OPT += --disable-tremor
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 VLC_CONF_OPT += --enable-udev
 VLC_DEPENDENCIES += udev
 else
package/weston/Config.in +2 -2
index 247efc8..36bbb01 100644
@@ -1,6 +1,6 @@
 comment "weston needs udev and a toolchain w/ threads"
 	depends on !BR2_avr32
-	depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_PACKAGE_HAS_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -11,7 +11,7 @@ config BR2_PACKAGE_WESTON
 	select BR2_PACKAGE_LIBPNG
 	select BR2_PACKAGE_JPEG
 	select BR2_PACKAGE_MTDEV
-	depends on BR2_PACKAGE_UDEV
+	depends on BR2_PACKAGE_HAS_UDEV
 	depends on !BR2_avr32 # wayland
 	depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
package/x11r7/xdriver_xf86-input-evdev/Config.in +2 -2
index 88d3e6e..6ec14bf 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV
 	bool "xf86-input-evdev"
-	depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+	depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
 	select BR2_PACKAGE_XPROTO_INPUTPROTO
 	select BR2_PACKAGE_XPROTO_RANDRPROTO
 	select BR2_PACKAGE_XPROTO_XPROTO
@@ -8,4 +8,4 @@ config BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV
 	  Generic Linux input driver
 
 comment "xf86-input-evdev requires udev to be enabled"
-	depends on !BR2_PACKAGE_UDEV
+	depends on !BR2_PACKAGE_HAS_UDEV
package/x11r7/xserver_xorg-server/xserver_xorg-server.mk +1 -1
index 4089aab..a7ac9a0 100644
@@ -123,7 +123,7 @@ XSERVER_XORG_SERVER_DEPENDENCIES += tslib
 XSERVER_XORG_SERVER_CONF_OPT += --enable-tslib LDFLAGS="-lts"
 endif
 
-ifeq ($(BR2_PACKAGE_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 XSERVER_XORG_SERVER_DEPENDENCIES += udev
 XSERVER_XORG_SERVER_CONF_OPT += --enable-config-udev
 else
package/xenomai/xenomai.mk +1 -1
index 2dd1bf6..4e9025d 100644
@@ -93,7 +93,7 @@ define XENOMAI_DEVICES
 /dev/rtp     c  666  0  0  150 0    0  1  32
 endef
 
-ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
+ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
 XENOMAI_DEPENDENCIES += udev
 
 define XENOMAI_INSTALL_UDEV_RULES
system/Config.in +3 -19
index d1b0cbb..34726b0 100644
@@ -90,17 +90,17 @@ config BR2_INIT_SYSTEMD
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd needs udev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
+comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
 	depends on BR2_USE_MMU
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
 		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
+		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
 
 config BR2_INIT_NONE
 	bool "None"
@@ -121,22 +121,6 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV
 	bool "Dynamic using mdev"
 	select BR2_PACKAGE_BUSYBOX
 
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-	bool "Dynamic using udev"
-	depends on !BR2_avr32 # udev
-	depends on BR2_LARGEFILE # udev
-	depends on BR2_USE_WCHAR # udev
-	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
-	select BR2_PACKAGE_UDEV
-
-comment "udev needs a toolchain w/ largefile, wchar"
-	depends on !BR2_avr32 # udev
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on !BR2_avr32 # udev
-	depends on BR2_PREFER_STATIC_LIB
-
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using eudev"
 	depends on !BR2_avr32 # eudev
Signature · 1 line
1.7.9.5
#5 lore raw

PATCH v7 2/4 udev: convert to virtual package.

Hi Eric,

Quoted 52 lines · Eric Le Bihan

This patch converts udev to a virtual package. For the moment, there is only one provider for the udev features: eudev.

Packages meant to provide udev-like features must select the symbol BR2_PACKAGE_HAS_UDEV.

Packages depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV or BR2_PACKAGE_UDEV have been converted to use the new symbol.

---
 Config.in.legacy                                   |   55 ++++++++++++++++++++
 docs/manual/adding-packages-directory.txt          |    3 +-
 linux/linux.mk                                     |    2 -
 package/ccid/ccid.mk                               |    2 +-
 package/eudev/Config.in                            |    1 +
 package/gpsd/gpsd.mk                               |    2 +-
 package/libatasmart/Config.in                      |    4 +-
 package/libcec/libcec.mk                           |    2 +-
 package/libdrm/libdrm.mk                           |    2 +-
 package/libmbim/Config.in                          |    5 +-
 package/libusb/libusb.mk                           |    2 +-
 package/modem-manager/Config.in                    |    6 +--
 package/network-manager/Config.in                  |    8 ++-
 package/ofono/ofono.mk                             |    2 +-
 package/pcsc-lite/Config.in                        |    2 +-
 package/pcsc-lite/pcsc-lite.mk                     |    2 +-
 package/pulseaudio/pulseaudio.mk                   |    2 +-
 package/systemd/Config.in                          |    6 +--
 package/udev/Config.in                             |   51 ++----------------
 package/udev/udev.mk                               |   49 ++++-------------
 package/udisks/Config.in                           |   14 ++---
 package/usbmount/Config.in                         |    4 +-
 package/vlc/vlc.mk                                 |    2 +-
 package/weston/Config.in                           |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in   |    4 +-
 .../xserver_xorg-server/xserver_xorg-server.mk     |    2 +-
 package/xenomai/xenomai.mk                         |    2 +-
 system/Config.in                                   |   22 ++------
 28 files changed, 112 insertions(+), 150 deletions(-)
Config.in.legacy +3 -0
index 2fe9cf9..6d594c6 100644
@@ -101,6 +101,61 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       bool "/dev management by udev removed"
+       select BR2_LEGACY

Config.in.legacy endif · line 116

Quoted 10 lines
Config.in.legacy +10 -0
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         Therefore, you must choose 'Dynamic using eudev' in the
+         '/dev management' menu to get the same behaviour as in your
+          old configuration.
+
+         You must also check the packages depending on 'udev' are still
+         selected.

Is there a particular reason why you don't automatically select the suggested alternative?
This will make the transition easier for users...

Quoted 45 lines
Config.in.legacy +42 -0
+
+config BR2_PACKAGE_UDEV
+       bool "udev is now a virtual package"
+       select BR2_LEGACY
+       select BR2_PACKAGE_HAS_UDEV
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         Your old configuration refers to packages depending on 'udev',
+         either for build or at runtime.
+
+         Check that a 'udev' provider is selected, i.e. that 'eudev' is
+         selected, which is the case if '/dev management' is set to
+         'Dynamic using eudev'.
+
+config BR2_PACKAGE_UDEV_RULES_GEN
+       bool "udev rules generation handled by eudev"
+       select BR2_LEGACY
+       select BR2_PACKAGE_EUDEV
+       select BR2_PACKAGE_EUDEV_RULES_GEN
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         udev rules generation will now be handled by 'eudev'.
+
+         Check that '/dev management' is set to 'Dynamic using eudev'
+         to get the same behaviour as in your old configuration.
+
+config BR2_PACKAGE_UDEV_ALL_EXTRAS
+       bool "udev extras removed"
+       select BR2_LEGACY
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         The option to enable the extra features of 'udev' (gudev, ...)
+         has been removed. These features are automatically enabled in
+         the 'udev' providers if the dependencies are selected. For
+         example, selecting 'libglib2' will trigger the build of gudev.
+
 config BR2_sh2
        bool "sh2 support removed"
        help

[..]

Quoted 13 lines
package/libatasmart/Config.in +1 -1
index a3e44f8..534e7c1 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATASMART
        bool "libatasmart"
-       depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+       depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
        help
          The libatasmart package is a disk reporting library.
          It only supports a subset of the ATA S.M.A.R.T. functionality.

package/libatasmart/Config.in config BR2_PACKAGE_LIBATASMART · line 11

Quoted 5 lines
package/libatasmart/Config.in +1 -1
@@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBATASMART
          http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html
 
 comment "libatasmart requires udev to be enabled"
-       depends on !BR2_PACKAGE_UDEV
+       depends on !BR2_PACKAGE_HAS_UDEV

Finally we should also line up all the udev comments, but this can be done in a separate patch.

[..]

Quoted 47 lines
package/udev/Config.in +2 -39
index 7aa79c4..5cd4051 100644
@@ -1,47 +1,6 @@
-config BR2_PACKAGE_UDEV
-       bool "udev"
-       depends on !BR2_avr32 # no epoll_create1
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-       depends on BR2_LARGEFILE # util-linux
-       depends on BR2_USE_WCHAR # util-linux
-       depends on !BR2_PREFER_STATIC_LIB # kmod
-       select BR2_PACKAGE_UTIL_LINUX
-       select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-       select BR2_PACKAGE_KMOD
+config BR2_PACKAGE_HAS_UDEV
+       bool
        help
-         Userspace device daemon.
-
-         udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs
-         and inotify.
-
-         ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
-
-if BR2_PACKAGE_UDEV
-
-config BR2_PACKAGE_UDEV_RULES_GEN
-       bool "enable rules generator"
-       help
-         Enable persistant rules generator
-
-config BR2_PACKAGE_UDEV_ALL_EXTRAS
-       bool "enable all extras"
-       select BR2_PACKAGE_ACL
-       select BR2_PACKAGE_HWDATA
-       select BR2_PACKAGE_LIBGLIB2
-       depends on BR2_USE_WCHAR # libglib2
-       depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-       depends on BR2_USE_MMU # libglib2
-       help
-         Enable all extras with external dependencies like
-         libacl, hwdata and libglib2
-
-comment "enabling all extras needs a toolchain w/ wchar, threads"
-       depends on BR2_USE_MMU
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

package/udev/Config.in line 6

Quoted 10 lines
package/udev/Config.in +3 -7
-
-endif
-
-comment "udev needs udev /dev management and a toolchain w/ largefile, wchar, dynamic library"
-       depends on !BR2_avr32
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
-               !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+         udev is now a virtual package.
+         Packages requiring udevd at run time or libudev/gudev at build time
+         should select it.

Does it make sense to adding a help option on a hidden option? Can the user ever make it visible?

[..]

Best regards,
Thomas

#6 lore raw

PATCH v7 2/4 udev: convert to virtual package.

Hi!

Quoted 17 lines · Thomas De Schampheleire
Quoted 17 lines
Config.in.legacy +9 -0
index 2fe9cf9..6d594c6 100644
@@ -101,6 +101,61 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       bool "/dev management by udev removed"
+       select BR2_LEGACY
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         Therefore, you must choose 'Dynamic using eudev' in the
+         '/dev management' menu to get the same behaviour as in your
Quoted 8 lines

Config.in.legacy endif · line 116

Quoted 4 lines
Config.in.legacy +4 -0
+          old configuration.
+
+         You must also check the packages depending on 'udev' are still
+         selected.

Is there a particular reason why you don't automatically select the suggested alternative?
This will make the transition easier for users...

That's what I did on first try. BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV was selected. But I ended up facing a limit of kconfig: this boolean symbol is used in a choice/endchoice ("/dev management"), which prevents its value from being recalculated when it is selected from Config.in.legacy.

For example, if BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y in test_udev_legacy_defconfig and we perform:

  $ make test_udev_legacy_defconfig

output/.config will contain:

# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y

The default choice is selected. I discussed this issue on IRC with Yann E. Morin last evening, but there is no workaround... So I chose to remove the automatic selection of the new symbol and add detailed instructions.

Quoted 15 lines
Quoted 15 lines
package/libatasmart/Config.in +1 -1
index a3e44f8..534e7c1 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATASMART
        bool "libatasmart"
-       depends on BR2_PACKAGE_UDEV # libudev is configure dependency
+       depends on BR2_PACKAGE_HAS_UDEV # libudev is configure dependency
        help
          The libatasmart package is a disk reporting library.
          It only supports a subset of the ATA S.M.A.R.T. functionality.
@@ -8,4 +8,4 @@ config BR2_PACKAGE_LIBATASMART
          http://www.linuxfromscratch.org/blfs/view/svn/general/libatasmart.html
 
Quoted 6 lines

package/libatasmart/Config.in config BR2_PACKAGE_LIBATASMART · line 11

Quoted 3 lines
package/libatasmart/Config.in +1 -1
 comment "libatasmart requires udev to be enabled"
-       depends on !BR2_PACKAGE_UDEV
+       depends on !BR2_PACKAGE_HAS_UDEV

Finally we should also line up all the udev comments, but this can be done in a separate patch.

I will gladly do it.

Quoted 6 lines

package/libatasmart/Config.in

Quoted 3 lines
package/libatasmart/Config.in +3 -0
+         udev is now a virtual package.
+         Packages requiring udevd at run time or libudev/gudev at build time
+         should select it.

Does it make sense to adding a help option on a hidden option? Can the user ever make it visible?

The end user using the menu will not see it, but I added it for the user who sometimes looks at the sources, as a kind of comment. When ThomasP suggested to convert udev as a virtual package, I looked at opengl.mk hoping to find information but found none... Maybe it would be better to add a section on how to add virtual package and how to use it in the manual.

Thanks for your review.

Best regards,
ELB

#7 lore raw

PATCH v7 2/4 udev: convert to virtual package.

?ric, Thomas, All,

On 2014-02-07 22:14 +0100, Eric Le Bihan spake thusly:

Quoted 38 lines · Thomas De Schampheleire
Quoted 18 lines
Quoted 18 lines
Config.in.legacy +9 -0
index 2fe9cf9..6d594c6 100644
@@ -101,6 +101,61 @@ endif
 ###############################################################################
 comment "Legacy options removed in 2014.02"
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       bool "/dev management by udev removed"
+       select BR2_LEGACY
+       help
+         The 'udev' package has been converted to a virtual package.
+         There is currently one provider for this feature: 'eudev'.
+
+         Therefore, you must choose 'Dynamic using eudev' in the
+         '/dev management' menu to get the same behaviour as in your
Quoted 8 lines

Config.in.legacy endif · line 116

Quoted 4 lines
Config.in.legacy +4 -0
+          old configuration.
+
+         You must also check the packages depending on 'udev' are still
+         selected.

Is there a particular reason why you don't automatically select the suggested alternative?
This will make the transition easier for users...

That's what I did on first try. BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV was selected. But I ended up facing a limit of kconfig: this boolean symbol is used in a choice/endchoice ("/dev management"), which prevents its value from being recalculated when it is selected from Config.in.legacy.

For example, if BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV=y in test_udev_legacy_defconfig and we perform:

  $ make test_udev_legacy_defconfig
Quoted 8 lines

output/.config will contain:

# BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is not set BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y

The default choice is selected. I discussed this issue on IRC with Yann E. Morin last evening, but there is no workaround... So I chose to remove the automatic selection of the new symbol and add detailed instructions.

Indeed. The explanation above (a shorter one, at least) should have been part of the commit log.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#8 lore raw

PATCH v7 2/4 udev: convert to virtual package.

In reply to Eric Le Bihan

Hi Eric,

On Fri, Feb 7, 2014 at 2:21 PM, Eric Le Bihan <[email protected]> wrote:

[...]

Quoted 13 lines
package/modem-manager/Config.in +1 -1
index e157ca8..fe60850 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MODEM_MANAGER
        bool "modemmanager"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_PACKAGE_HAS_UDEV
        select BR2_PACKAGE_DBUS
        depends on BR2_INET_IPV6
        depends on BR2_LARGEFILE # acl

package/modem-manager/Config.in config BR2_PACKAGE_MODEM_MANAGER · line 12

Quoted 5 lines
package/modem-manager/Config.in +0 -2
@@ -8,8 +8,6 @@ config BR2_PACKAGE_MODEM_MANAGER
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
        depends on BR2_USE_MMU # dbus
        select BR2_PACKAGE_DBUS_GLIB
-       select BR2_PACKAGE_UDEV
-       select BR2_PACKAGE_UDEV_ALL_EXTRAS

When removing BR2_PACKAGE_UDEV_ALL_EXTRAS, you should certainly replace it by the
"select ..." statements done in the BR2_PACKAGE_UDEV_ALL_EXTRAS symbol, ie: acl and libglib2 (if I understood correctly hwdata is no longer needed).

Quoted 19 lines
package/modem-manager/Config.in +1 -1
        help
          ModemManager is a DBus-activated daemon which controls mobile
          broadband (2G/3G/4G) devices and connections.
@@ -33,4 +31,4 @@ endif
 
 comment "modemmanager needs udev /dev management and a toolchain w/ largefile, wchar, threads, IPv6"
        depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
-               !BR2_TOOLCHAIN_HAS_THREADS || !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+               !BR2_TOOLCHAIN_HAS_THREADS || !BR2_PACKAGE_HAS_UDEV
package/network-manager/Config.in +0 -2
index a194433..a4eeeaf 100644
@@ -1,16 +1,14 @@
 config BR2_PACKAGE_NETWORK_MANAGER
        bool "NetworkManager"
        depends on !BR2_avr32 # udev
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-       select BR2_PACKAGE_DBUS

package/network-manager/Config.in line 13

Quoted 10 lines
package/network-manager/Config.in +2 -2
        depends on BR2_INET_IPV6
        depends on BR2_LARGEFILE # acl
        depends on BR2_USE_WCHAR # libglib2 and gnutls
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
        depends on BR2_USE_MMU # dbus
+       depends on BR2_PACKAGE_HAS_UDEV
+       select BR2_PACKAGE_DBUS
        select BR2_PACKAGE_DBUS_GLIB
-       select BR2_PACKAGE_UDEV
-       select BR2_PACKAGE_UDEV_ALL_EXTRAS

ditto (select acl and libglib2)

Quoted 9 lines
package/network-manager/Config.in +1 -1
        select BR2_PACKAGE_GNUTLS
        select BR2_PACKAGE_LIBGCRYPT
        select BR2_PACKAGE_LIBNL
@@ -33,4 +31,4 @@ comment "NetworkManager needs udev /dev management and a toolchain w/ IPv6, larg
        depends on BR2_USE_MMU
        depends on !BR2_INET_IPV6 || !BR2_LARGEFILE || !BR2_USE_WCHAR || \
                !BR2_TOOLCHAIN_HAS_THREADS || \
-               !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+               !BR2_PACKAGE_HAS_UDEV

[...]

Quoted 47 lines
package/udev/Config.in +2 -39
index 7aa79c4..5cd4051 100644
@@ -1,47 +1,6 @@
-config BR2_PACKAGE_UDEV
-       bool "udev"
-       depends on !BR2_avr32 # no epoll_create1
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
-       depends on BR2_LARGEFILE # util-linux
-       depends on BR2_USE_WCHAR # util-linux
-       depends on !BR2_PREFER_STATIC_LIB # kmod
-       select BR2_PACKAGE_UTIL_LINUX
-       select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
-       select BR2_PACKAGE_KMOD
+config BR2_PACKAGE_HAS_UDEV
+       bool
        help
-         Userspace device daemon.
-
-         udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs
-         and inotify.
-
-         ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
-
-if BR2_PACKAGE_UDEV
-
-config BR2_PACKAGE_UDEV_RULES_GEN
-       bool "enable rules generator"
-       help
-         Enable persistant rules generator
-
-config BR2_PACKAGE_UDEV_ALL_EXTRAS
-       bool "enable all extras"
-       select BR2_PACKAGE_ACL
-       select BR2_PACKAGE_HWDATA
-       select BR2_PACKAGE_LIBGLIB2
-       depends on BR2_USE_WCHAR # libglib2
-       depends on BR2_TOOLCHAIN_HAS_THREADS # libglib2
-       depends on BR2_USE_MMU # libglib2
-       help
-         Enable all extras with external dependencies like
-         libacl, hwdata and libglib2
-
-comment "enabling all extras needs a toolchain w/ wchar, threads"
-       depends on BR2_USE_MMU
-       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

package/udev/Config.in line 6

Quoted 10 lines
package/udev/Config.in +3 -7
-
-endif
-
-comment "udev needs udev /dev management and a toolchain w/ largefile, wchar, dynamic library"
-       depends on !BR2_avr32
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
-               !BR2_LARGEFILE || !BR2_USE_WCHAR || BR2_PREFER_STATIC_LIB
+         udev is now a virtual package.
+         Packages requiring udevd at run time or libudev/gudev at build time
+         should select it.

I'm not sure a help message is very useful for a hidden symbol, but anyway it does not hurt ;-)

Quoted 46 lines
package/udev/udev.mk +3 -32
index db86850..d274246 100644
@@ -4,48 +4,17 @@
 #
 ################################################################################
 
-UDEV_VERSION = 182
-UDEV_SOURCE = udev-$(UDEV_VERSION).tar.xz
-UDEV_SITE = $(BR2_KERNEL_MIRROR)/linux/utils/kernel/hotplug/
-UDEV_LICENSE = GPLv2+
-UDEV_LICENSE_FILES = COPYING
-UDEV_INSTALL_STAGING = YES
+UDEV_SOURCE =
 
-# mq_getattr is in librt
-UDEV_CONF_ENV += LIBS=-lrt
-
-UDEV_CONF_OPT =                        \
-       --sbindir=/sbin         \
-       --with-rootlibdir=/lib  \
-       --libexecdir=/lib       \
-       --with-usb-ids-path=/usr/share/hwdata/usb.ids   \
-       --with-pci-ids-path=/usr/share/hwdata/pci.ids   \
-       --with-firmware-path=/lib/firmware              \
-       --disable-introspection
-
-UDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
-
-ifeq ($(BR2_PACKAGE_UDEV_RULES_GEN),y)
-UDEV_CONF_OPT += --enable-rule_generator
-endif
-
-ifeq ($(BR2_PACKAGE_UDEV_ALL_EXTRAS),y)
-UDEV_DEPENDENCIES += acl hwdata libglib2
-UDEV_CONF_OPT +=               \
-       --enable-udev_acl
-else
-UDEV_CONF_OPT +=               \
-       --disable-gudev
+ifeq ($(BR2_PACKAGE_EUDEV),y)
+UDEV_DEPENDENCIES += eudev
 endif
 
-ifeq ($(BR2_PACKAGE_SYSTEMD),y)

package/udev/udev.mk line 17

Quoted 10 lines
package/udev/udev.mk +4 -5
-       UDEV_CONF_OPT += --with-systemdsystemunitdir=/lib/systemd/system/
-endif
-
-define UDEV_INSTALL_INITSCRIPT
-       $(INSTALL) -m 0755 package/udev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
+ifeq ($(UDEV_DEPENDENCIES),)
+define UDEV_CONFIGURE_CMDS
+       echo "No Udev implementation selected. Configuration error."
+       exit 1
 endef

The error can be raised here using the make primitive:

$(error No Udev implementation selected. Configuration error.)

Quoted 11 lines
package/udev/udev.mk +2 -3
+endif
 
-UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT
-
-$(eval $(autotools-package))
+$(eval $(generic-package))
package/udisks/Config.in +0 -0
index e9539a3..d560b6c 100644

package/udisks/Config.in line 8

Quoted 9 lines
package/udisks/Config.in +1 -3
@@ -1,11 +1,9 @@
 config BR2_PACKAGE_UDISKS
        bool "udisks"
        depends on !BR2_avr32 # udev
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_PACKAGE_HAS_UDEV
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus-glib -> glib2
        depends on BR2_USE_MMU # lvm2
-       select BR2_PACKAGE_UDEV
-       select BR2_PACKAGE_UDEV_ALL_EXTRAS

ditto (select acl and libglib2)

Quoted 9 lines
package/udisks/Config.in +1 -1
        select BR2_PACKAGE_DBUS
        select BR2_PACKAGE_DBUS_GLIB
        depends on BR2_USE_WCHAR # dbus-glib -> glib2
@@ -36,8 +34,12 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev management"

package/udisks/Config.in config BR2_PACKAGE_UDISKS_LVM2 · line 45

Quoted 10 lines
package/udisks/Config.in +6 -2
        depends on !BR2_avr32
        depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
-               !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
+       depends on !BR2_PACKAGE_HAS_UDEV
+
+comment "udisks needs a toolchain w/ wchar, threads"
+       depends on !BR2_avr32
+       depends on BR2_USE_MMU
+       depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS

[...]

Regards,

Signature · 1 line
Samuel
#9 lore raw

PATCH v7 2/4 udev: convert to virtual package.

Hi!

Quoted 16 lines · Samuel Martin
Quoted 16 lines
package/modem-manager/Config.in +1 -1
index e157ca8..fe60850 100644
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_MODEM_MANAGER
        bool "modemmanager"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+       depends on BR2_PACKAGE_HAS_UDEV
        select BR2_PACKAGE_DBUS
        depends on BR2_INET_IPV6
        depends on BR2_LARGEFILE # acl
@@ -8,8 +8,6 @@ config BR2_PACKAGE_MODEM_MANAGER
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus, libglib2
        depends on BR2_USE_MMU # dbus
        select BR2_PACKAGE_DBUS_GLIB
Quoted 8 lines

package/modem-manager/Config.in config BR2_PACKAGE_MODEM_MANAGER · line 12

Quoted 2 lines
package/modem-manager/Config.in +0 -2
-       select BR2_PACKAGE_UDEV
-       select BR2_PACKAGE_UDEV_ALL_EXTRAS

When removing BR2_PACKAGE_UDEV_ALL_EXTRAS, you should certainly replace it by the
"select ..." statements done in the BR2_PACKAGE_UDEV_ALL_EXTRAS symbol, ie: acl and libglib2 (if I understood correctly hwdata is no longer needed).

In fact BR2_PACKAGE_DBUS_GLIB already selects BR2_PACKAGE_LIBGLIB2, so only BR2_PACKAGE_ACL is needed. I will fix this.

Thanks for your review.

Best regards,
ELB

#10 lore raw

PATCH v7 3/4 systemd: bump to v207.

In reply to Eric Le Bihan

This patch bumps systemd to v207 but also declares it as a provider for the udev virtual package.

Starting with systemd 183, udev has been merged into systemd. The udev daemon is now installed as /lib/systemd/systemd-udevd. This means that /dev management using udev is only available if systemd is chosen as init system.

When configuring systemd, the following options are available:

- activation of systemd-journal-gatewayd, to access the journal via HTTP.
- activation of extra features like journal compression and sealing.

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter.

---
 Config.in.legacy                             |   41 ++++++-----
 linux/linux.mk                               |    3 +-
 package/systemd/Config.in                    |   47 ++++++++++--
 package/systemd/systemd-fix-getty-unit.patch |   36 +++++-----
 package/systemd/systemd-fix-page-size.patch  |   43 -----------
 package/systemd/systemd-uclibc-fix.patch     |   59 ----------------
 package/systemd/systemd.mk                   |   98 ++++++++++++++++++--------
 package/udev/udev.mk                         |    4 ++
 system/Config.in                             |   18 ++---
 9 files changed, 170 insertions(+), 179 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Config.in.legacy +25 -16
index 6d594c6..16d419f 100644
@@ -106,11 +106,14 @@ config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	select BR2_LEGACY
 	help
 	  The 'udev' package has been converted to a virtual package.
-	  There is currently one provider for this feature: 'eudev'.
+	  The providers for this feature are: 'eudev', 'systemd'.
 
-	  Therefore, you must choose 'Dynamic using eudev' in the
-	  '/dev management' menu to get the same behaviour as in your
-	   old configuration.
+	  Therefore, if you are not using 'systemd' as init system, you
+	  must choose 'Dynamic using eudev' in the '/dev management'
+	  menu to get the same behaviour as in your old configuration.
+
+	  If you are using 'systemd', its internal implementation of
+	  'udev' will be used automatically.
 
 	  You must also check the packages depending on 'udev' are still
 	  selected.
@@ -121,35 +124,41 @@ config BR2_PACKAGE_UDEV
 	select BR2_PACKAGE_HAS_UDEV
 	help
 	  The 'udev' package has been converted to a virtual package.
-	  There is currently one provider for this feature: 'eudev'.
+	  The providers for this feature are: 'eudev', 'systemd'.
 
 	  Your old configuration refers to packages depending on 'udev',
 	  either for build or at runtime.
 
-	  Check that a 'udev' provider is selected, i.e. that 'eudev' is
-	  selected, which is the case if '/dev management' is set to
-	  'Dynamic using eudev'.
+	  Check that a 'udev' provider is selected. If you are not using
+	  'systemd' as init system, 'eudev' should be selected, which is
+	  the case if '/dev management' is set to 'Dynamic using eudev'.
+
+	  If you are using 'systemd', its internal implementation of 'udev'
+	  is used.
 
 config BR2_PACKAGE_UDEV_RULES_GEN
-	bool "udev rules generation handled by eudev"
+	bool "udev rules generation handled by provider"
 	select BR2_LEGACY
-	select BR2_PACKAGE_EUDEV
-	select BR2_PACKAGE_EUDEV_RULES_GEN
+	select BR2_PACKAGE_EUDEV if !BR2_INIT_SYSTEMD
+	select BR2_PACKAGE_EUDEV_RULES_GEN if !BR2_INIT_SYSTEMD
 	help
 	  The 'udev' package has been converted to a virtual package.
-	  There is currently one provider for this feature: 'eudev'.
+	  The providers for this feature are: 'eudev', 'systemd'.
 
-	  udev rules generation will now be handled by 'eudev'.
+	  If you are not using 'systemd' as init system, udev rules
+	  generation will be handled by 'eudev'. Check that
+	  '/dev management' is set to 'Dynamic using eudev' to get
+	  the same behaviour as in your old configuration.
 
-	  Check that '/dev management' is set to 'Dynamic using eudev'
-	  to get the same behaviour as in your old configuration.
+	  If you are using 'systemd', it internal implementation of 'udev'
+	  will generate the rules.
 
 config BR2_PACKAGE_UDEV_ALL_EXTRAS
 	bool "udev extras removed"
 	select BR2_LEGACY
 	help
 	  The 'udev' package has been converted to a virtual package.
-	  There is currently one provider for this feature: 'eudev'.
+	  The providers for this feature are: 'eudev', 'systemd'.
 
 	  The option to enable the extra features of 'udev' (gudev, ...)
 	  has been removed. These features are automatically enabled in
linux/linux.mk +2 -1
index 1bfa279..dc000ee 100644
@@ -196,7 +196,8 @@ define LINUX_CONFIGURE_CMDS
 		$(call KCONFIG_ENABLE_OPT,CONFIG_PERF_EVENTS,$(@D)/.config)
 		$(call KCONFIG_ENABLE_OPT,CONFIG_FUNCTION_TRACER,$(@D)/.config))
 	$(if $(BR2_PACKAGE_SYSTEMD),
-		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config))
+		$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS,$(@D)/.config)
+		$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER,$(@D)/.config))
 	$(if $(BR2_LINUX_KERNEL_APPENDED_DTB),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_ARM_APPENDED_DTB,$(@D)/.config))
 	yes '' | $(TARGET_MAKE_ENV) $(MAKE1) $(LINUX_MAKE_FLAGS) -C $(@D) oldconfig
package/systemd/Config.in +42 -5

62 lines not on this page · raw message

package/systemd/systemd-fix-getty-unit.patch +17 -19
index 6df54b1..166a2e5 100644
@@ -1,34 +1,32 @@
 Prefer getty to agetty in console setup systemd units
 
 Signed-off-by: Maxime Ripard <[email protected]>
+Signed-off-by: Eric Le Bihan <[email protected]>
 ---
- units/getty at .service.m4        |    2 +-
- units/serial-getty at .service.m4 |    2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
 
-Index: systemd-37/units/getty at .service.m4
+Index: systemd-206/units/getty at .service.m4
 ===================================================================
---- systemd-37.orig/units/getty at .service.m4
-+++ systemd-37/units/getty at .service.m4
-@@ -32,7 +32,7 @@
- 
+--- systemd-206.orig/units/getty at .service.m4	2013-07-22 00:43:28.000000000 +0200
++++ systemd-206/units/getty at .service.m4	2013-09-18 10:20:17.000000000 +0200
+@@ -27,7 +27,7 @@
+
  [Service]
- Environment=TERM=linux
--ExecStart=-/sbin/agetty %I 38400
+ # the VT is cleared by TTYVTDisallocate
+-ExecStart=-/sbin/agetty --noclear %I
 +ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
  Restart=always
  RestartSec=0
- UtmpIdentifier=%I
-Index: systemd-37/units/serial-getty at .service.m4
+Index: systemd-206/units/serial-getty at .service.m4
 ===================================================================
---- systemd-37.orig/units/serial-getty at .service.m4
-+++ systemd-37/units/serial-getty at .service.m4
-@@ -32,7 +32,7 @@
- 
+--- systemd-206.orig/units/serial-getty at .service.m4	2013-07-22 00:43:28.000000000 +0200
++++ systemd-206/units/serial-getty at .service.m4	2013-09-18 10:21:31.000000000 +0200
+@@ -22,7 +22,7 @@
+ IgnoreOnIsolate=yes
+
  [Service]
- Environment=TERM=vt100
--ExecStart=-/sbin/agetty -s %I 115200,38400,9600
+-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
 +ExecStart=-/sbin/getty -L %I 115200 vt100
+ Type=idle
  Restart=always
  RestartSec=0
- UtmpIdentifier=%I
package/systemd/systemd-fix-page-size.patch deleted +0 -43

43 lines not on this page · raw message

package/systemd/systemd-uclibc-fix.patch deleted +0 -59

59 lines not on this page · raw message

package/systemd/systemd.mk +70 -28

145 lines not on this page · raw message

package/udev/udev.mk +4 -0
index d274246..a5d0f80 100644
@@ -10,6 +10,10 @@ ifeq ($(BR2_PACKAGE_EUDEV),y)
 UDEV_DEPENDENCIES += eudev
 endif
 
+ifeq ($(BR2_PACKAGE_SYSTEMD),y)
+UDEV_DEPENDENCIES += systemd
+endif
+
 ifeq ($(UDEV_DEPENDENCIES),)
 define UDEV_CONFIGURE_CMDS
 	echo "No Udev implementation selected. Configuration error."
system/Config.in +10 -8
index 34726b0..30d8efe 100644
@@ -87,20 +87,19 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
 	bool "systemd"
+	depends on !BR2_avr32 # no epoll_create1
+	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_LARGEFILE
 	depends on BR2_USE_WCHAR
 	depends on BR2_INET_IPV6
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_TOOLCHAIN_HAS_THREADS
+	depends on BR2_TOOLCHAIN_HAS_SSP
 	depends on BR2_USE_MMU
-	select BR2_PACKAGE_DBUS
+	depends on !BR2_PREFER_STATIC_LIB
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
-	depends on BR2_USE_MMU
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
+comment 'systemd needs an (e)glibc toolchain'
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 config BR2_INIT_NONE
 	bool "None"
@@ -108,7 +107,7 @@ config BR2_INIT_NONE
 endchoice
 
 choice
-	prompt "/dev management"
+	prompt "/dev management" if !BR2_INIT_SYSTEMD
 	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
 
 config BR2_ROOTFS_DEVICE_CREATION_STATIC
@@ -135,6 +134,9 @@ comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
 
 endchoice
 
+comment "/dev management using udev (from systemd)"
+	depends on BR2_INIT_SYSTEMD
+
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"
 	default "system/device_table.txt"
Signature · 1 line
1.7.9.5
#11 lore raw

PATCH v7 3/4 systemd: bump to v207.

Quoted 14 lines · Eric Le Bihan

This patch bumps systemd to v207 but also declares it as a provider for the udev virtual package.

Starting with systemd 183, udev has been merged into systemd. The udev daemon is now installed as /lib/systemd/systemd-udevd. This means that /dev management using udev is only available if systemd is chosen as init system.

When configuring systemd, the following options are available:

- activation of systemd-journal-gatewayd, to access the journal via HTTP.
- activation of extra features like journal compression and sealing.

Quoted 7 lines

Support for uClibc has also been removed because:

- upstream has no interest in supporting uClibc.
- using a shrinked libc brings no advantage, given the size of all the programs included in Systemd. So using glibc does not matter.

#12 lore raw

PATCH v7 3/4 systemd: bump to v207.

In reply to Eric Le Bihan

Hi Eric,

On Fri, Feb 7, 2014 at 2:21 PM, Eric Le Bihan <[email protected]> wrote:

[...]

Quoted 28 lines
package/systemd/Config.in +11 -1
index 500e623..e3ea433 100644
@@ -1,11 +1,21 @@
 config BR2_PACKAGE_SYSTEMD
        bool "systemd"
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+       depends on BR2_INIT_SYSTEMD
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_LARGEFILE # util-linux
+       depends on BR2_USE_WCHAR # util-linux
        depends on BR2_INET_IPV6
+       depends on !BR2_PREFER_STATIC_LIB # kmod
        depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
        depends on BR2_USE_MMU # dbus
+       select BR2_PACKAGE_HAS_UDEV
        select BR2_PACKAGE_DBUS
        select BR2_PACKAGE_LIBCAP
+       select BR2_PACKAGE_UTIL_LINUX
+       select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
+       select BR2_PACKAGE_KMOD
+       select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
+       select BR2_PACKAGE_KMOD_TOOLS
        help
          systemd is a system and service manager for Linux, compatible with
          SysV and LSB init scripts. systemd provides aggressive parallelization

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 30

Quoted 5 lines
package/systemd/Config.in +2 -0
@@ -16,9 +26,36 @@ config BR2_PACKAGE_SYSTEMD
          elaborate transactional dependency-based service control logic.
          It can work as a drop-in replacement for sysvinit.
 
+         Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
+         tmpfs vfs and tmpfs POSIX ACL enabled.

Linux >= 3.0, really? IIRC systemd requires devtmpfs (available for a long time), and cgroup which has been available since linux-2.6.36 (though the patch to make them available on older kernel is easy to backport on older kernel).

Quoted 35 lines
package/systemd/Config.in +29 -4
+
+         Systemd also provides udev, the userspace device daemon.
+
+         The selection of other packages will enable some features:
+
+         - libglib2 package will add support for gudev.
+         - acl package will add support for multi-seat.
+
          http://freedesktop.org/wiki/Software/systemd
 
-comment "systemd needs eudev /dev management and a toolchain w/ IPv6, threads"
-       depends on BR2_USE_MMU
-       depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
-               !BR2_TOOLCHAIN_HAS_THREADS
+if BR2_PACKAGE_SYSTEMD
+
+config BR2_PACKAGE_SYSTEMD_ALL_EXTRAS
+       bool "enable all extras"
+       select BR2_PACKAGE_XZ
+       select BR2_PACKAGE_LIBGCRYPT
+       help
+         Enable extra features for Systemd: journal compression and
+         signing.
+
+config BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
+       bool "HTTP server for journal events"
+       select BR2_PACKAGE_LIBMICROHTTPD
+       help
+         systemd-journal-gatewayd serves journal events over the
+         network. Clients must connect using HTTP. The server
+         listens on port 19531 by default.
+
+         http://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
+
+endif

[...]

Quoted 10 lines
system/Config.in +2 -0
index 34726b0..30d8efe 100644
@@ -87,20 +87,19 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
        bool "systemd"
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_TOOLCHAIN_USES_GLIBC

system/Config.in config BR2_INIT_SYSV · line 99

Quoted 10 lines
system/Config.in +2 -2
        depends on BR2_LARGEFILE
        depends on BR2_USE_WCHAR
        depends on BR2_INET_IPV6
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_TOOLCHAIN_HAS_SSP
        depends on BR2_USE_MMU
-       select BR2_PACKAGE_DBUS
+       depends on !BR2_PREFER_STATIC_LIB
        select BR2_PACKAGE_SYSTEMD

How does this play with kconfig?
Does not kconfig complain about some circular dependencies here, because you have BR2_INIT_SYSTEMD selecting BR2_PACAKGE_SYSTEMD, while BR2_PACKAGE_SYSTEMD depends on BR2_INIT_SYSTEMD?

Quoted 31 lines
system/Config.in +6 -7
-comment 'systemd needs eudev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
-       depends on BR2_USE_MMU
-       depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
-                    BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
-                    BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV)
+comment 'systemd needs an (e)glibc toolchain'
+       depends on !BR2_TOOLCHAIN_USES_GLIBC
 
 config BR2_INIT_NONE
        bool "None"
@@ -108,7 +107,7 @@ config BR2_INIT_NONE
 endchoice
 
 choice
-       prompt "/dev management"
+       prompt "/dev management" if !BR2_INIT_SYSTEMD
        default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
 
 config BR2_ROOTFS_DEVICE_CREATION_STATIC
@@ -135,6 +134,9 @@ comment "eudev needs a toolchain w/ largefile, wchar, dynamic library"
 
 endchoice
 
+comment "/dev management using udev (from systemd)"
+       depends on BR2_INIT_SYSTEMD
+
 config BR2_ROOTFS_DEVICE_TABLE
        string "Path to the permission tables"
        default "system/device_table.txt"
--
Quoted 2 lines

1.7.9.5

Regards,

Signature · 1 line
Samuel
#13 lore raw

PATCH v7 3/4 systemd: bump to v207.

Samuel, all,

Quoted 7 lines · Samuel Martin

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 30

Quoted 2 lines
package/systemd/Config.in +2 -0
+         Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
+         tmpfs vfs and tmpfs POSIX ACL enabled.

Linux >= 3.0, really? IIRC systemd requires devtmpfs (available for a long time), and cgroup which has been available since linux-2.6.36 (though the patch to make them available on older kernel is easy to backport on older kernel).

I set the restriction to "Linux >= 3.0" as it is the one mentioned in the README file of systemd. Linux 3.0 introduced the cgroup.procs file, needed by systemd v207.

What should the help menu contain? Should it be only the minimum version required with its reason, or the full list of features needed?

The README file contains a list of the kernel configuration options that are needed to run systemd:

- CONFIG_DEVTMPFS
- CONFIG_CGROUPS
- CONFIG_INOTIFY_USER
- CONFIG_SIGNALFD
- CONFIG_TIMERFD
- CONFIG_EPOLL
- CONFIG_NET
- CONFIG_SYSFS
- CONFIG_PROC_FS
- CONFIG_FHANDLE

Others are strongly recommended:

- CONFIG_IPV6
- CONFIG_AUTOFS4_FS
- CONFIG_TMPFS_POSIX_ACL
- CONFIG_TMPFS_XATTR
- CONFIG_SECCOMP

The LINUX_CONFIGURE_CMDS in linux/linux.mk forces some kernel options for some packages. Should I add all the ones previously listed for systemd?

I'm in favor of setting the help text to:

Systemd requires a Linux kernel >= 3.0.

The following features will be enabled in the Linux kernel:
devtmpfs, cgroups, [...]

So the end user is informed and will have a working configuration out of the box.

Quoted 17 lines
Quoted 17 lines
system/Config.in +3 -1
index 34726b0..30d8efe 100644
@@ -87,20 +87,19 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
        bool "systemd"
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on BR2_LARGEFILE
        depends on BR2_USE_WCHAR
        depends on BR2_INET_IPV6
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_TOOLCHAIN_HAS_SSP
        depends on BR2_USE_MMU
Quoted 8 lines

system/Config.in config BR2_INIT_SYSV · line 99

Quoted 3 lines
system/Config.in +1 -1
-       select BR2_PACKAGE_DBUS
+       depends on !BR2_PREFER_STATIC_LIB
        select BR2_PACKAGE_SYSTEMD

How does this play with kconfig?
Does not kconfig complain about some circular dependencies here, because you have BR2_INIT_SYSTEMD selecting BR2_PACAKGE_SYSTEMD, while BR2_PACKAGE_SYSTEMD depends on BR2_INIT_SYSTEMD?

I do not get any error from kconfig. I used the same trick to hide the systemv package when 'SysV' is not chosen as init system. I do not know if it is a bug or a feature of kconfig :)

Best regards,
ELB

#14 lore raw

PATCH v7 3/4 systemd: bump to v207.

Eric,

Quoted 39 lines · Eric Le Bihan

Samuel, all,

Quoted 7 lines · Samuel Martin

package/systemd/Config.in config BR2_PACKAGE_SYSTEMD · line 30

Quoted 2 lines
package/systemd/Config.in +2 -0
+         Systemd requires a Linux kernel >= 3.0, with inotify, devtmpfs,
+         tmpfs vfs and tmpfs POSIX ACL enabled.

Linux >= 3.0, really? IIRC systemd requires devtmpfs (available for a long time), and cgroup which has been available since linux-2.6.36 (though the patch to make them available on older kernel is easy to backport on older kernel).

I set the restriction to "Linux >= 3.0" as it is the one mentioned in the README file of systemd. Linux 3.0 introduced the cgroup.procs file, needed by systemd v207.

What should the help menu contain? Should it be only the minimum version required with its reason, or the full list of features needed?

The README file contains a list of the kernel configuration options that are needed to run systemd:

- CONFIG_DEVTMPFS
- CONFIG_CGROUPS
- CONFIG_INOTIFY_USER
- CONFIG_SIGNALFD
- CONFIG_TIMERFD
- CONFIG_EPOLL
- CONFIG_NET
- CONFIG_SYSFS
- CONFIG_PROC_FS
- CONFIG_FHANDLE

Others are strongly recommended:

- CONFIG_IPV6
- CONFIG_AUTOFS4_FS
- CONFIG_TMPFS_POSIX_ACL
- CONFIG_TMPFS_XATTR
- CONFIG_SECCOMP

Quoted 6 lines

The LINUX_CONFIGURE_CMDS in linux/linux.mk forces some kernel options for some packages. Should I add all the ones previously listed for systemd?

I'm in favor of setting the help text to:

Systemd requires a Linux kernel >= 3.0.

Anyway, Buildroot only offers linux >=3.12, and 3.0 is old enough to keep it like this. ;)

Quoted 6 lines

The following features will be enabled in the Linux kernel:
devtmpfs, cgroups, [...]

So the end user is informed and will have a working configuration out of the box.

Indeed, you can look at the help message for lttng-modules for example (having the actual symbol name may be good imho).
BTW, to be consistent, imho, we should automatically enable all the mandatory kernel options (like Buildroot already does for a couple of them).

Quoted 26 lines
Quoted 18 lines
Quoted 18 lines
system/Config.in +3 -1
index 34726b0..30d8efe 100644
@@ -87,20 +87,19 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
        bool "systemd"
+       depends on !BR2_avr32 # no epoll_create1
+       depends on BR2_TOOLCHAIN_USES_GLIBC
        depends on BR2_LARGEFILE
        depends on BR2_USE_WCHAR
        depends on BR2_INET_IPV6
-       depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
        depends on BR2_TOOLCHAIN_HAS_THREADS
+       depends on BR2_TOOLCHAIN_HAS_SSP
        depends on BR2_USE_MMU
Quoted 8 lines

system/Config.in config BR2_INIT_SYSV · line 99

Quoted 3 lines
system/Config.in +1 -1
-       select BR2_PACKAGE_DBUS
+       depends on !BR2_PREFER_STATIC_LIB
        select BR2_PACKAGE_SYSTEMD

How does this play with kconfig?
Does not kconfig complain about some circular dependencies here, because you have BR2_INIT_SYSTEMD selecting BR2_PACAKGE_SYSTEMD, while BR2_PACKAGE_SYSTEMD depends on BR2_INIT_SYSTEMD?

Quoted 3 lines

I do not get any error from kconfig. I used the same trick to hide the systemv package when 'SysV' is not chosen as init system. I do not know if it is a bug or a feature of kconfig :)

If no bug is trigger, it's nice; otherwise... we'll report it to the kconfig maintainer :P

Regards,

Signature · 1 line
Samuel
#15 lore raw

PATCH v7 4/4 manual: update /dev management section.

In reply to Eric Le Bihan

This patch updates the /dev management section in the manual with information about eudev, which replaces udev.

---
 docs/manual/configure.txt |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
docs/manual/configure.txt +11 -9
index 89df3d9..9b8135a 100644
@@ -216,7 +216,7 @@ x86_64 target, you have to generate a cross-compilation toolchain with
 Buildroot or crosstool-NG.
 
 If you want to generate a custom toolchain for your project, that can
-be used as an external toolchain in Buildroot, our recommandation is
+be used as an external toolchain in Buildroot, our recommendation is
 definitely to build it with http://crosstool-ng.org[crosstool-NG]. We
 recommend to build the toolchain separately from Buildroot, and then
 _import_ it in Buildroot using the external toolchain backend.
@@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory :
    about +mdev+ and the syntax of its configuration file, see
    http://git.busybox.net/busybox/tree/docs/mdev.txt.
 
- * The fourth solution is *Dynamic using udev*. This method also
+ * The fourth solution is *Dynamic using eudev*. This method also
    relies on the _devtmpfs_ virtual filesystem detailed above, but
-   adds the +udev+ userspace daemon on top of it. +udev+ is a daemon
+   adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon
    that runs in the background, and gets called by the kernel when a
    device gets added or removed from the system. It is a more
-   heavyweight solution than +mdev+, but provides higher flexibility
-   and is sometimes mandatory for some system components (systemd for
-   example). +udev+ is the mechanism used in most desktop Linux
-   distributions. For more details about +udev+, see
-   http://en.wikipedia.org/wiki/Udev.
+   heavyweight solution than +mdev+, but provides higher flexibility.
+   +eudev+ is a standalone version of +udev+, the original userspace
+   daemon used in most desktop Linux distributions, which is now part
+   of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev.
 
-The Buildroot developers recommandation is to start with the *Dynamic
+The Buildroot developers recommendation is to start with the *Dynamic
 using devtmpfs only* solution, until you have the need for userspace
 to be notified when devices are added/removed, or if firmwares are
 needed, in which case *Dynamic using mdev* is usually a good solution.
 
+Note that if +systemd+ is chosen as init system, /dev management will
+be performed by the +udev+ program provided by +systemd+.
+
 init system
 ~~~~~~~~~~~
 
Signature · 1 line
1.7.9.5
#16 lore raw

PATCH v7 4/4 manual: update /dev management section.

Quoted 44 lines · Eric Le Bihan

This patch updates the /dev management section in the manual with information about eudev, which replaces udev.

---
 docs/manual/configure.txt |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
docs/manual/configure.txt +8 -9
index 89df3d9..9b8135a 100644
@@ -216,7 +216,7 @@ x86_64 target, you have to generate a cross-compilation toolchain with
 Buildroot or crosstool-NG.
 
 If you want to generate a custom toolchain for your project, that can
-be used as an external toolchain in Buildroot, our recommandation is
+be used as an external toolchain in Buildroot, our recommendation is
 definitely to build it with http://crosstool-ng.org[crosstool-NG]. We
 recommend to build the toolchain separately from Buildroot, and then
 _import_ it in Buildroot using the external toolchain backend.
@@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory :
    about +mdev+ and the syntax of its configuration file, see
    http://git.busybox.net/busybox/tree/docs/mdev.txt.
 
- * The fourth solution is *Dynamic using udev*. This method also
+ * The fourth solution is *Dynamic using eudev*. This method also
    relies on the _devtmpfs_ virtual filesystem detailed above, but
-   adds the +udev+ userspace daemon on top of it. +udev+ is a daemon
+   adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon
    that runs in the background, and gets called by the kernel when a
    device gets added or removed from the system. It is a more
-   heavyweight solution than +mdev+, but provides higher flexibility
-   and is sometimes mandatory for some system components (systemd for
-   example). +udev+ is the mechanism used in most desktop Linux
-   distributions. For more details about +udev+, see
-   http://en.wikipedia.org/wiki/Udev.
+   heavyweight solution than +mdev+, but provides higher flexibility.
+   +eudev+ is a standalone version of +udev+, the original userspace
+   daemon used in most desktop Linux distributions, which is now part
+   of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev.
 
-The Buildroot developers recommandation is to start with the *Dynamic
+The Buildroot developers recommendation is to start with the *Dynamic

docs/manual/configure.txt different solutions to handle the +/dev+ directory : · line 333

Quoted 10 lines
docs/manual/configure.txt +3 -0
 using devtmpfs only* solution, until you have the need for userspace
 to be notified when devices are added/removed, or if firmwares are
 needed, in which case *Dynamic using mdev* is usually a good solution.
 
+Note that if +systemd+ is chosen as init system, /dev management will
+be performed by the +udev+ program provided by +systemd+.
+
 init system
 ~~~~~~~~~~~
 
#17 lore raw

PATCH v7 4/4 manual: update /dev management section.

Quoted 49 lines · Thomas De Schampheleire
Quoted 48 lines · Eric Le Bihan

This patch updates the /dev management section in the manual with information about eudev, which replaces udev.

---
 docs/manual/configure.txt |   20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
docs/manual/configure.txt +8 -9
index 89df3d9..9b8135a 100644
@@ -216,7 +216,7 @@ x86_64 target, you have to generate a cross-compilation toolchain with
 Buildroot or crosstool-NG.
 
 If you want to generate a custom toolchain for your project, that can
-be used as an external toolchain in Buildroot, our recommandation is
+be used as an external toolchain in Buildroot, our recommendation is
 definitely to build it with http://crosstool-ng.org[crosstool-NG]. We
 recommend to build the toolchain separately from Buildroot, and then
 _import_ it in Buildroot using the external toolchain backend.
@@ -310,22 +310,24 @@ different solutions to handle the +/dev+ directory :
    about +mdev+ and the syntax of its configuration file, see
    http://git.busybox.net/busybox/tree/docs/mdev.txt.
 
- * The fourth solution is *Dynamic using udev*. This method also
+ * The fourth solution is *Dynamic using eudev*. This method also
    relies on the _devtmpfs_ virtual filesystem detailed above, but
-   adds the +udev+ userspace daemon on top of it. +udev+ is a daemon
+   adds the +eudev+ userspace daemon on top of it. +eudev+ is a daemon
    that runs in the background, and gets called by the kernel when a
    device gets added or removed from the system. It is a more
-   heavyweight solution than +mdev+, but provides higher flexibility
-   and is sometimes mandatory for some system components (systemd for
-   example). +udev+ is the mechanism used in most desktop Linux
-   distributions. For more details about +udev+, see
-   http://en.wikipedia.org/wiki/Udev.
+   heavyweight solution than +mdev+, but provides higher flexibility.
+   +eudev+ is a standalone version of +udev+, the original userspace
+   daemon used in most desktop Linux distributions, which is now part
+   of Systemd. For more details, see http://en.wikipedia.org/wiki/Udev.
 
-The Buildroot developers recommandation is to start with the *Dynamic
+The Buildroot developers recommendation is to start with the *Dynamic
 using devtmpfs only* solution, until you have the need for userspace
 to be notified when devices are added/removed, or if firmwares are
 needed, in which case *Dynamic using mdev* is usually a good solution.
 
Quoted 8 lines

docs/manual/configure.txt different solutions to handle the +/dev+ directory : · line 333

Quoted 6 lines
docs/manual/configure.txt +3 -0
+Note that if +systemd+ is chosen as init system, /dev management will
+be performed by the +udev+ program provided by +systemd+.
+
 init system
 ~~~~~~~~~~~
 

Regards,

Signature · 1 line
Samuel
#18 lore raw

v7 cover udev is now provided by systemd or eudev

In reply to Eric Le Bihan
Quoted 14 lines · Eric Le Bihan

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 also introduces new options, like the activation of the journal gateway.

Quoted 6 lines

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Hi Eric,

I'm very happy with this patch series, it really cleans things up a lot.
I first had some reservations about how the choices were organised in the menus, but after trying out a few things it turns out to work pretty well.

I do agree with the comments Thomas has made, though. However, I
wouldn't want to stop this series to go into 2014.02-rc1, so I propose that Peter still merges it for the release and that these small things are fixed in follow-up patches.

I have one more remark about the way the udev virtual package is
implemented. We found out for the opengl packages that there is a better way to do it, something like:

udev/Config.in:

config BR2_PACKAGE_HAS_UDEV
bool

config BR2_PACKAGE_PROVIDES_UDEV
depends on BR2_PACKAGE_HAS_UDEV
string

udev/udev.mk:

UDEV_SRC =
UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))

ifeq ($(UDEV_DEPENDENCIES),)
define UDEV_CONFIGURE_CMDS
echo "No Udev implementation selected. Configuration error." exit 1
endef
endif

eudev/Config.in:

...
if BR2_PACKAGE_EUDEV
config BR2_PACKAGE_PROVIDES_UDEV
default "eudev"
endif

That moves all the provider logic to the provider itself, which for
instance makes it possible for BR2_EXTERNAL to provide an alternative udev implementation (e.g. a different udev version, which could be _very_ relevant).

I repeat, though: this can be done as a follow-up patch.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#19 lore raw

v7 cover udev is now provided by systemd or eudev

All,

Quoted 24 lines · Arnout Vandecappelle
Quoted 14 lines · Eric Le Bihan

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 also introduces new options, like the activation of the journal gateway.

Quoted 6 lines

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Hi Eric,

Quoted 8 lines

I'm very happy with this patch series, it really cleans things up a lot.
I first had some reservations about how the choices were organised in the menus, but after trying out a few things it turns out to work pretty well.

I do agree with the comments Thomas has made, though. However, I
wouldn't want to stop this series to go into 2014.02-rc1, so I propose that Peter still merges it for the release and that these small things are fixed in follow-up patches.

Just for the record: my comments are indeed minor and I agree they shouldn't block the integration of this series.
Some of them could even be handled by Peter while merging the patches, or otherwise as follow-up patches in 2014.05.

Best regards,
Thomas

#20 lore raw

v7 cover udev is now provided by systemd or eudev

In reply to Arnout Vandecappelle

Hi!

Quoted 38 lines · Arnout Vandecappelle

I have one more remark about the way the udev virtual package is
implemented. We found out for the opengl packages that there is a better way to do it, something like:

udev/Config.in:

config BR2_PACKAGE_HAS_UDEV
bool

config BR2_PACKAGE_PROVIDES_UDEV
depends on BR2_PACKAGE_HAS_UDEV
string

udev/udev.mk:

UDEV_SRC =
UDEV_DEPENDENCIES = $(call qstrip,$(BR2_PACKAGE_PROVIDES_UDEV))

ifeq ($(UDEV_DEPENDENCIES),)
define UDEV_CONFIGURE_CMDS
echo "No Udev implementation selected. Configuration error." exit 1
endef
endif

eudev/Config.in:

...
if BR2_PACKAGE_EUDEV
config BR2_PACKAGE_PROVIDES_UDEV
default "eudev"
endif

Quoted 7 lines

That moves all the provider logic to the provider itself, which for
instance makes it possible for BR2_EXTERNAL to provide an alternative udev implementation (e.g. a different udev version, which could be _very_ relevant).

I repeat, though: this can be done as a follow-up patch.

Yes, the word 'provides' is more explicit. I'll put this in a follow-up patch. If this is the definitive way of implementing a virtual package, shouldn't it be added to docs/manual/adding-packages-tips.txt?

Thanks for the review.

Best regards,
ELB

#21 lore raw

v7 cover udev is now provided by systemd or eudev

Dear Eric Le Bihan,

Quoted 3 lines · Eric Le Bihan

Yes, the word 'provides' is more explicit. I'll put this in a follow-up patch. If this is the definitive way of implementing a virtual package, shouldn't it be added to docs/manual/adding-packages-tips.txt?

Yes, it should, and patches to improve the documentation are welcome!

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#22 lore raw

v7 cover udev is now provided by systemd or eudev

In reply to Eric Le Bihan
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Eric" == Eric Le Bihan <[email protected]> writes:

This series converts udev to a virtual package, either provided by systemd or eudev.

Starting with version 183, udev has been merged into systemd. This forces the use of systemd as the init system if /dev is to be dynamically managed by udev. eudev is a fork of udev, maintained by Gentoo, but isolated from systemd, so it can be used with any init system.

Systemd has been bumped to v207 and a new eudev package has been added. Version 1.3 of eudev is in sync with systemd v207.

The bump of systemd to v207 also introduces new options, like the activation of the journal gateway.

In the end:

- if systemd is selected as init system, the /dev management will handled by udev. No other choice possible.
- if busybox or SysV is chosen, the user can choose to manage /dev statically, or dynamically using mdev or eudev.

Quoted 7 lines

Changes v6 -> v7:
- updated udev related symbols and improved help text in Config.in.legacy (suggested by ThomasDS).
- removed redundant comments on dependencies for systemd and eudev (suggested by ThomasDS).
- fixed packages not properly converted to BR2_PACKAGE_HAS_UDEV (reported by SamuelM).

Committed series to next, thanks!

Signature · 1 line
Bye, Peter Korsgaard