Skip to contentSkip to conversation

udev is now provided by systemd or eudev

PATCH Superseded Eric Le Bihan 2 participants 8 messages Jan 3, 2014

v5 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

v5 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 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 (5):
sysvinit: depend on SysV selected as init system.
eudev: new package.
udev: convert to virtual package.
systemd: bump to v207.
manual: update /dev management section.

 Config.in.legacy                                 |    8 ++
 docs/manual/configure.txt                        |   16 ++--
 package/Config.in                                |    1 +
 package/ccid/ccid.mk                             |    2 +-
 package/eudev/Config.in                          |   37 ++++++++
 package/{udev => eudev}/S10udev                  |    2 +-
 package/eudev/eudev.mk                           |   48 +++++++++++
 package/gpsd/gpsd.mk                             |    2 +-
 package/libatasmart/Config.in                    |    4 +-
 package/network-manager/Config.in                |    6 +-
 package/pcsc-lite/Config.in                      |    2 +-
 package/systemd/Config.in                        |   57 ++++++++++++-
 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/sysvinit/Config.in                       |    1 +
 package/udev/Config.in                           |   48 +----------
 package/udev/udev.mk                             |   47 +++--------
 package/udisks/Config.in                         |    8 +-
 package/usbmount/Config.in                       |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in |    4 +-
 package/xenomai/xenomai.mk                       |    2 +-
 system/Config.in                                 |   47 +++++++----
 24 files changed, 302 insertions(+), 280 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

--
1.7.9.5

#1 lore raw

PATCH v5 1/5 sysvinit: depend on SysV selected as init system.

In order to prevent sysvinit and systemd to be selected at the same time, sysvinit can now only be selected if SysV is chosen as init system.

---
 package/sysvinit/Config.in |    1 +
 1 file changed, 1 insertion(+)
package/sysvinit/Config.in +1 -0
index 34ec391..d91c643 100644
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SYSVINIT
 	bool "sysvinit"
+	depends on BR2_INIT_SYSV
 	help
 	  /sbin/init - parent of all processes
 
Signature · 1 line
1.7.9.5
#2 lore raw

PATCH v5 2/5 eudev: new package.

In reply to Eric Le Bihan

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.

---
 package/Config.in               |    1 +
 package/eudev/Config.in         |   36 +++++++++++++++++++++++++++++
 package/{udev => eudev}/S10udev |    2 +-
 package/eudev/eudev.mk          |   48 +++++++++++++++++++++++++++++++++++++++
 system/Config.in                |   15 ++++++++++++
 5 files changed, 101 insertions(+), 1 deletion(-)
 create mode 100644 package/eudev/Config.in
 copy package/{udev => eudev}/S10udev (98%)
 create mode 100644 package/eudev/eudev.mk
package/Config.in +1 -0
index 429b519..58a2381 100644
@@ -274,6 +274,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/evtest/Config.in"
 source "package/fan-ctrl/Config.in"
 source "package/fconfig/Config.in"
package/eudev/Config.in new file +36 -0
new file mode 100644
index 0000000..4406810
@@ -0,0 +1,36 @@
+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.32: it relies on devtmpfs.
+
+	  http://github.com/gentoo/eudev/
+
+if BR2_PACKAGE_EUDEV
+
+config BR2_PACKAGE_EUDEV_RULES_GEN
+	bool "enable rules generator"
+	help
+	  Enable persistant rules generator
+
+endif
+
+comment "eudev needs /dev management set to eudev"
+	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+
+comment "eudev needs a toolchain w/ largefile, wchar"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+	depends on BR2_avr32
+	depends on 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 +48 -0

48 lines not on this page · raw message

system/Config.in +15 -0
index 54c196c..969bf42 100644
@@ -130,6 +130,21 @@ 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"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev needs a toolchain w/ dynamic library"
+	depends on BR2_avr32 # eudev
+	depends on BR2_PREFER_STATIC_LIB
+
 endchoice
 
 config BR2_ROOTFS_DEVICE_TABLE
Signature · 1 line
1.7.9.5
#3 lore raw

PATCH v5 3/5 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                                 |    8 ++++
 package/ccid/ccid.mk                             |    2 +-
 package/eudev/Config.in                          |    1 +
 package/gpsd/gpsd.mk                             |    2 +-
 package/libatasmart/Config.in                    |    4 +-
 package/network-manager/Config.in                |    6 +--
 package/pcsc-lite/Config.in                      |    2 +-
 package/systemd/Config.in                        |    6 +--
 package/udev/Config.in                           |   48 +--------------------
 package/udev/udev.mk                             |   49 ++++------------------
 package/udisks/Config.in                         |    8 ++--
 package/usbmount/Config.in                       |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in |    4 +-
 package/xenomai/xenomai.mk                       |    2 +-
 system/Config.in                                 |   22 ++--------
 15 files changed, 41 insertions(+), 127 deletions(-)
Config.in.legacy +8 -0
index c75e25e..80161db 100644
@@ -218,6 +218,14 @@ config BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION_WRAP
 # Note: BR2_LINUX_KERNEL_CUSTOM_GIT_VERSION is still referenced from
 # linux/Config.in
 
+config BR2_PACKAGE_UDEV
+	bool "udev is now a virtual package"
+	select BR2_PACKAGE_HAS_UDEV
+	help
+	  The 'udev' package is now a virtual package. It is
+	  currently only provided by 'eudev'.
+
+
 ###############################################################################
 comment "Legacy options removed in 2013.08"
 
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 4406810..66e14b4 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 24b0146..08f6925 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/network-manager/Config.in +2 -4
index a194433..311e5fd 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
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/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 +2 -46

48 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 +3 -5
index e9539a3..62d5598 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,8 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
+comment "udisks needs udev /dev mgmnt, toolchain w/ wchar, threads"
 	depends on !BR2_avr32
 	depends on BR2_USE_MMU
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
+	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!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/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/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 969bf42..0559a6e 100644
@@ -83,17 +83,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"
@@ -114,22 +114,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
#4 lore raw

PATCH v5 4/5 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                             |    2 +-
 package/systemd/Config.in                    |   57 +++++++++++++--
 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                             |   26 +++++--
 8 files changed, 165 insertions(+), 160 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch
Config.in.legacy +1 -1
index 80161db..8614958 100644
@@ -223,7 +223,7 @@ config BR2_PACKAGE_UDEV
 	select BR2_PACKAGE_HAS_UDEV
 	help
 	  The 'udev' package is now a virtual package. It is
-	  currently only provided by 'eudev'.
+	  currently provided by 'eudev' or 'systemd'.
 
 
 ###############################################################################
package/systemd/Config.in +53 -4

73 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 +20 -6
index 0559a6e..da6e67a 100644
@@ -80,20 +80,31 @@ 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'
+comment 'systemd needs a (e)glibc toolchain'
+	depends on !BR2_TOOLCHAIN_USES_GLIBC
+
+comment 'systemd needs a toolchain w/ largefile, wchar, IPv6, threads'
+	depends on BR2_avr32
 	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)
+		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS)
+
+comment 'systemd needs a toolchain w/ SSP'
+	depends on !BR2_TOOLCHAIN_HAS_SSP
+
+comment "systemd needs a toolchain w/ dynamic library"
+	depends on BR2_PREFER_STATIC_LIB
 
 config BR2_INIT_NONE
 	bool "None"
@@ -101,7 +112,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
@@ -131,6 +142,9 @@ comment "eudev needs a toolchain w/ 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
#5 lore raw

PATCH v5 5/5 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 |   16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)
docs/manual/configure.txt +9 -7
index 89df3d9..32a12ce 100644
@@ -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
 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
#6 lore raw

v5 cover udev is now provided by systemd or eudev

In reply to Eric Le Bihan

Hi Eric,

2014/1/3 Eric Le Bihan <[email protected]>

Quoted 71 lines

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 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.

Quoted 1 line

Thanks for this new series :-)

I played a bit with the previous series some months ago, and I had to do a couple of fixes to get it works properly.
Apologies for not reporting them that time. :-s

The problems were:

- Some packages still use BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV after applying the patchs:

  $ git grep -l BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
  docs/manual/adding-packages-directory.txt
  package/libmbim/Config.in
  package/modem-manager/Config.in
  package/network-manager/Config.in

- Kconfig circular dependencies between some packages selecting BR2_PACKAGE_UDEV
and depending on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV or BR2_PACKAGE_HAS_UDEV
at the same time.
(I may have introduced this circular dependency after fixing the previous issue)

- What does BR2_PACKAGE_UDEV_ALL_EXTRAS become?
The symbol does not exists after applying the patchs, but few packages still select it.

I also bump systemd to version 208, but this can wait after this series get merged ;-)

Regards,

Signature · 4 lines
Samuel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140103/e183c8ac/attachment-0001.html>
#7 lore raw

v5 cover udev is now provided by systemd or eudev

Hi!

Thanks for the feedback!

Quoted 8 lines · Samuel Martin

The problems were:
- Some packages still use BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV after applying the patchs:

   A  $ git grep -l BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
   A  docs/manual/adding-packages-directory.txt
   A  package/libmbim/Config.in
   A  package/modem-manager/Config.in
   A  package/network-manager/Config.in

modem-manager and libmbim are recent additions that fell off my radar... I'll fix this and update my test configs.

Quoted 1 line

- What does BR2_PACKAGE_UDEV_ALL_EXTRAS become?

This symbol has been removed after this discussion:
http://lists.busybox.net/pipermail/buildroot/2013-September/078503.html.

Best regards,
ELB