All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev
@ 2013-11-06 15:34 Eric Le Bihan
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management Eric Le Bihan
                   ` (6 more replies)
  0 siblings, 7 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

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 either choice possible.
  - if busybox or SysV is chosen, the user can choose to manage /dev
    statically, or dynamically using mdev or eudev.

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):
  system: move init system option above /dev management.
  sysvinit: depend on SysV selected as init system.
  eudev: new package.
  udev: convert to virtual package.
  systemd: bump to v207.

 Config.in.legacy                                 |    8 ++
 package/Config.in                                |    1 +
 package/eudev/Config.in                          |   25 +++++++
 package/eudev/S10udev                            |   48 ++++++++++++
 package/eudev/eudev.mk                           |   50 +++++++++++++
 package/libatasmart/Config.in                    |    4 +-
 package/network-manager/Config.in                |    6 +-
 package/pcsc-lite/Config.in                      |    2 +-
 package/systemd/Config.in                        |   43 +++++++++--
 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                       |   85 +++++++++++++++++-----
 package/sysvinit/Config.in                       |    1 +
 package/udev/Config.in                           |   43 +----------
 package/udev/udev.mk                             |   47 +++---------
 package/udisks/Config.in                         |    8 +-
 package/usbmount/Config.in                       |    4 +-
 package/weston/Config.in                         |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in |    4 +-
 system/Config.in                                 |   81 ++++++++++++---------
 21 files changed, 326 insertions(+), 276 deletions(-)
 create mode 100644 package/eudev/Config.in
 create mode 100755 package/eudev/S10udev
 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

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management.
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
@ 2013-11-06 15:34 ` Eric Le Bihan
  2013-11-11  0:29   ` Peter Korsgaard
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system Eric Le Bihan
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

The option to choose init system was below the one for /dev management.
As Systemd forces the use of udev, it is logical to swap them.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 system/Config.in |   60 +++++++++++++++++++++++++++---------------------------
 1 file changed, 30 insertions(+), 30 deletions(-)

diff --git a/system/Config.in b/system/Config.in
index 4c80087..1fe4127 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -67,35 +67,6 @@ config BR2_TARGET_GENERIC_PASSWD_METHOD
 	default "sha-512"   if BR2_TARGET_GENERIC_PASSWD_SHA512
 
 choice
-	prompt "/dev management"
-	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
-
-config BR2_ROOTFS_DEVICE_CREATION_STATIC
-	bool "Static using device table"
-
-config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
-	bool "Dynamic using devtmpfs only"
-
-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_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_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on BR2_PREFER_STATIC_LIB
-
-endchoice
-
-choice
 	prompt "Init system"
 	default BR2_INIT_BUSYBOX
 
@@ -118,7 +89,7 @@ config BR2_INIT_SYSTEMD
 	select BR2_PACKAGE_DBUS
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd needs udev /dev management and a toolchain w/ largefile, wchar, IPv6, threads'
+comment 'systemd requires largefile, wchar, IPv6, threads and udev support'
 	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR && \
 		     BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS && \
 		     BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV)
@@ -128,6 +99,35 @@ config BR2_INIT_NONE
 
 endchoice
 
+choice
+	prompt "/dev management"
+	default BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
+
+config BR2_ROOTFS_DEVICE_CREATION_STATIC
+	bool "Static using device table"
+
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS
+	bool "Dynamic using devtmpfs only"
+
+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_LARGEFILE # udev
+	depends on BR2_USE_WCHAR # udev
+	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
+	select BR2_PACKAGE_UDEV
+
+comment "udev requires a toolchain with LARGEFILE + WCHAR support"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "udev doesn't work with 'prefer static libraries'"
+	depends on BR2_PREFER_STATIC_LIB
+
+endchoice
+
 config BR2_ROOTFS_DEVICE_TABLE
 	string "Path to the permission tables"
 	default "system/device_table.txt"
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system.
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management Eric Le Bihan
@ 2013-11-06 15:34 ` Eric Le Bihan
  2013-11-13 21:37   ` Thomas Petazzoni
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 3/5] eudev: new package Eric Le Bihan
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 package/sysvinit/Config.in |    1 +
 1 file changed, 1 insertion(+)

diff --git a/package/sysvinit/Config.in b/package/sysvinit/Config.in
index 34ec391..d91c643 100644
--- a/package/sysvinit/Config.in
+++ b/package/sysvinit/Config.in
@@ -1,5 +1,6 @@
 config BR2_PACKAGE_SYSVINIT
 	bool "sysvinit"
+	depends on BR2_INIT_SYSV
 	help
 	  /sbin/init - parent of all processes
 
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management Eric Le Bihan
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system Eric Le Bihan
@ 2013-11-06 15:34 ` Eric Le Bihan
  2013-11-13 22:41   ` Thomas Petazzoni
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 4/5] udev: convert to virtual package Eric Le Bihan
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 package/Config.in       |    1 +
 package/eudev/Config.in |   26 ++++++++++++++++++++++++
 package/eudev/S10udev   |   48 +++++++++++++++++++++++++++++++++++++++++++++
 package/eudev/eudev.mk  |   50 +++++++++++++++++++++++++++++++++++++++++++++++
 system/Config.in        |   13 ++++++++++++
 5 files changed, 138 insertions(+)
 create mode 100644 package/eudev/Config.in
 create mode 100755 package/eudev/S10udev
 create mode 100644 package/eudev/eudev.mk

diff --git a/package/Config.in b/package/Config.in
index 4c4da51..4c349da 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -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"
diff --git a/package/eudev/Config.in b/package/eudev/Config.in
new file mode 100644
index 0000000..5a89325
--- /dev/null
+++ b/package/eudev/Config.in
@@ -0,0 +1,26 @@
+config BR2_PACKAGE_EUDEV
+	bool "eudev"
+	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	depends on BR2_LARGEFILE # util-linux
+	depends on BR2_USE_WCHAR # util-linux
+	depends on !BR2_PACKAGE_SYSTEMD
+	select BR2_PACKAGE_HAS_UDEV
+	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.
+
+	  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
diff --git a/package/eudev/S10udev b/package/eudev/S10udev
new file mode 100755
index 0000000..e4d28a2
--- /dev/null
+++ b/package/eudev/S10udev
@@ -0,0 +1,48 @@
+#!/bin/sh
+#
+# udev	This is a minimal non-LSB version of a UDEV startup script.  It
+#	was derived by stripping down the udev-058 LSB version for use
+#	with buildroot on embedded hardware using Linux 2.6.34+ kernels.
+#
+#	You may need to customize this for your system's resource limits
+#	(including startup time!) and administration.  For example, if
+#	your early userspace has a custom initramfs or initrd you might
+#	need /dev much earlier; or without hotpluggable busses (like USB,
+#	PCMCIA, MMC/SD, and so on) your /dev might be static after boot.
+#
+#	This script assumes your system boots right into the eventual root
+#	filesystem, and that init runs this udev script before any programs
+#	needing more device nodes than the bare-bones set -- /dev/console,
+#	/dev/zero, /dev/null -- that's needed to boot and run this script.
+#
+
+# Check for missing binaries
+UDEV_BIN=/sbin/udevd
+test -x $UDEV_BIN || exit 5
+
+# Check for config file and read it
+UDEV_CONFIG=/etc/udev/udev.conf
+test -r $UDEV_CONFIG || exit 6
+. $UDEV_CONFIG
+
+case "$1" in
+    start)
+        echo -n "Populating ${udev_root:-/dev} using udev: "
+        echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
+        $UDEV_BIN -d || (echo "FAIL" && exit 1)
+        udevadm trigger
+        echo "done"
+        ;;
+    stop)
+        # Stop execution of events
+        udevadm control --stop-exec-queue
+        killall udevd
+        ;;
+    *)
+        echo "Usage: $0 {start|stop}"
+        exit 1
+        ;;
+esac
+
+
+exit 0
diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
new file mode 100644
index 0000000..8603c42
--- /dev/null
+++ b/package/eudev/eudev.mk
@@ -0,0 +1,50 @@
+################################################################################
+#
+# eudev
+#
+################################################################################
+
+EUDEV_VERSION         = 1.3
+EUDEV_SITE            = https://github.com/gentoo/eudev/archive/
+EUDEV_SOURCE          = v$(EUDEV_VERSION).tar.gz
+EUDEV_LICENSE         = GPLv2+
+EUDEV_LICENSE_FILES   = COPYING
+EUDEV_INSTALL_STAGING = YES
+EUDEV_AUTORECONF      = YES
+
+# mq_getattr is in librt
+EUDEV_CONF_ENV += LIBS=-lrt
+
+EUDEV_CONF_OPT =		\
+	--sbindir=/sbin		\
+	--with-rootlibdir=/lib	\
+	--libexecdir=/lib	\
+	--with-firmware-path=/lib/firmware	\
+	--disable-introspection			\
+	--enable-split-usr			\
+	--enable-libkmod
+
+EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
+
+ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
+	EUDEV_CONF_OPT += --enable-rule_generator
+endif
+
+ifneq ($(BR2_LARGEFILE),y)
+	EUDEV_CONF_OPT += --disable-largefile
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+	EUDEV_CONF_OPT += --enable-gudev
+	EUDEV_DEPENDENCIES += libglib2
+else
+	EUDEV_CONF_OPT += --disable-gudev
+endif
+
+define EUDEV_INSTALL_INIT_SYSV
+	$(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
+endef
+
+EUDEV_POST_INSTALL_TARGET_HOOKS += EUDEV_INSTALL_INIT_SYSV
+
+$(eval $(autotools-package))
diff --git a/system/Config.in b/system/Config.in
index 1fe4127..1867b25 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -126,6 +126,19 @@ comment "udev requires a toolchain with LARGEFILE + WCHAR support"
 comment "udev doesn't work with 'prefer static libraries'"
 	depends on BR2_PREFER_STATIC_LIB
 
+config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
+	bool "Dynamic using eudev"
+	depends on BR2_LARGEFILE
+	depends on BR2_USE_WCHAR
+	depends on !BR2_PREFER_STATIC_LIB
+	select BR2_PACKAGE_EUDEV
+
+comment "eudev requires a toolchain w/ largefile, wchar"
+	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
+
+comment "eudev requires a toolchain w/ dynamic library"
+	depends on BR2_PREFER_STATIC_LIB
+
 endchoice
 
 config BR2_ROOTFS_DEVICE_TABLE
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 4/5] udev: convert to virtual package.
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
                   ` (2 preceding siblings ...)
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 3/5] eudev: new package Eric Le Bihan
@ 2013-11-06 15:34 ` Eric Le Bihan
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 5/5] systemd: bump to v207 Eric Le Bihan
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 Config.in.legacy                                 |    8 ++++
 package/eudev/Config.in                          |    1 -
 package/libatasmart/Config.in                    |    4 +-
 package/network-manager/Config.in                |    6 +--
 package/pcsc-lite/Config.in                      |    2 +-
 package/systemd/Config.in                        |    4 +-
 package/udev/Config.in                           |   43 +------------------
 package/udev/udev.mk                             |   49 ++++------------------
 package/udisks/Config.in                         |    8 ++--
 package/usbmount/Config.in                       |    4 +-
 package/weston/Config.in                         |    4 +-
 package/x11r7/xdriver_xf86-input-evdev/Config.in |    4 +-
 system/Config.in                                 |   19 ++-------
 13 files changed, 38 insertions(+), 118 deletions(-)

diff --git a/Config.in.legacy b/Config.in.legacy
index 588cd8b..96ccbed 100644
--- a/Config.in.legacy
+++ b/Config.in.legacy
@@ -167,6 +167,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"
 
diff --git a/package/eudev/Config.in b/package/eudev/Config.in
index 5a89325..ee485ba 100644
--- a/package/eudev/Config.in
+++ b/package/eudev/Config.in
@@ -3,7 +3,6 @@ config BR2_PACKAGE_EUDEV
 	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	depends on BR2_LARGEFILE # util-linux
 	depends on BR2_USE_WCHAR # util-linux
-	depends on !BR2_PACKAGE_SYSTEMD
 	select BR2_PACKAGE_HAS_UDEV
 	select BR2_PACKAGE_UTIL_LINUX
 	select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
diff --git a/package/libatasmart/Config.in b/package/libatasmart/Config.in
index a3e44f8..534e7c1 100644
--- a/package/libatasmart/Config.in
+++ b/package/libatasmart/Config.in
@@ -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
diff --git a/package/network-manager/Config.in b/package/network-manager/Config.in
index f39293c..7420bd9 100644
--- a/package/network-manager/Config.in
+++ b/package/network-manager/Config.in
@@ -1,15 +1,13 @@
 config BR2_PACKAGE_NETWORK_MANAGER
 	bool "NetworkManager"
-	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
diff --git a/package/pcsc-lite/Config.in b/package/pcsc-lite/Config.in
index 87139d9..1ef9e02 100644
--- a/package/pcsc-lite/Config.in
+++ b/package/pcsc-lite/Config.in
@@ -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.
diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 49536be..0ab10b6 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -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
@@ -19,5 +19,5 @@ config BR2_PACKAGE_SYSTEMD
 	  http://freedesktop.org/wiki/Software/systemd
 
 comment "systemd needs udev /dev management and a toolchain w/ IPv6, threads"
-	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
diff --git a/package/udev/Config.in b/package/udev/Config.in
index 2bcd685..1c9251b 100644
--- a/package/udev/Config.in
+++ b/package/udev/Config.in
@@ -1,41 +1,2 @@
-config BR2_PACKAGE_UDEV
-	bool "udev"
-	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
-	help
-	  Userspace device daemon.
-
-	  udev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.
-
-	  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
-	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_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
-
-endif
-
-comment "udev requires /dev mgmnt set to udev under System configuration"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+config BR2_PACKAGE_HAS_UDEV
+	bool
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index db86850..4857683 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -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)
-	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
+endif
 
-UDEV_POST_INSTALL_TARGET_HOOKS += UDEV_INSTALL_INITSCRIPT
-
-$(eval $(autotools-package))
+$(eval $(generic-package))
diff --git a/package/udisks/Config.in b/package/udisks/Config.in
index eae76b2..7899155 100644
--- a/package/udisks/Config.in
+++ b/package/udisks/Config.in
@@ -1,10 +1,8 @@
 config BR2_PACKAGE_UDISKS
 	bool "udisks"
-	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
@@ -35,6 +33,6 @@ config BR2_PACKAGE_UDISKS_LVM2
 
 endif
 
-comment "udisks needs udev /dev management and a toolchain w/ wchar, threads"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV || \
+comment "udisks requires /dev mgmnt set to udev, toolchain w/ wchar, threads"
+	depends on !BR2_PACKAGE_HAS_UDEV || \
 		!BR2_USE_WCHAR || !BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/usbmount/Config.in b/package/usbmount/Config.in
index 2583e7c..0bb8883 100644
--- a/package/usbmount/Config.in
+++ b/package/usbmount/Config.in
@@ -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
diff --git a/package/weston/Config.in b/package/weston/Config.in
index b7f8468..7ce5a3c 100644
--- a/package/weston/Config.in
+++ b/package/weston/Config.in
@@ -1,5 +1,5 @@
 comment "weston needs udev and a toolchain w/ threads"
-	depends on !BR2_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
+	depends on !BR2_HAS_PACKAGE_UDEV || !BR2_TOOLCHAIN_HAS_THREADS
 
 config BR2_PACKAGE_WESTON
 	bool "weston"
@@ -10,7 +10,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_TOOLCHAIN_HAS_THREADS # wayland
 	# Runtime dependency
 	select BR2_PACKAGE_XKEYBOARD_CONFIG
diff --git a/package/x11r7/xdriver_xf86-input-evdev/Config.in b/package/x11r7/xdriver_xf86-input-evdev/Config.in
index cc159c9..05ee314 100644
--- a/package/x11r7/xdriver_xf86-input-evdev/Config.in
+++ b/package/x11r7/xdriver_xf86-input-evdev/Config.in
@@ -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
diff --git a/system/Config.in b/system/Config.in
index 1867b25..3ee0c20 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -83,16 +83,16 @@ 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 requires largefile, wchar, IPv6, threads and udev support'
+comment 'systemd requires largefile, wchar, IPv6, threads and eudev support'
 	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"
@@ -113,19 +113,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_LARGEFILE # udev
-	depends on BR2_USE_WCHAR # udev
-	depends on !BR2_PREFER_STATIC_LIB # udev -> kmod
-	select BR2_PACKAGE_UDEV
-
-comment "udev requires a toolchain with LARGEFILE + WCHAR support"
-	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
-
-comment "udev doesn't work with 'prefer static libraries'"
-	depends on BR2_PREFER_STATIC_LIB
-
 config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
 	bool "Dynamic using eudev"
 	depends on BR2_LARGEFILE
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 5/5] systemd: bump to v207.
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
                   ` (3 preceding siblings ...)
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 4/5] udev: convert to virtual package Eric Le Bihan
@ 2013-11-06 15:34 ` Eric Le Bihan
  2013-11-06 15:42 ` [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
  2013-11-13 23:53 ` Thomas Petazzoni
  6 siblings, 0 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:34 UTC (permalink / raw)
  To: buildroot

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.

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 package/systemd/Config.in                    |   43 +++++++++++--
 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                   |   85 ++++++++++++++++++++------
 package/udev/udev.mk                         |    4 ++
 system/Config.in                             |   25 ++++++--
 7 files changed, 143 insertions(+), 152 deletions(-)
 delete mode 100644 package/systemd/systemd-fix-page-size.patch
 delete mode 100644 package/systemd/systemd-uclibc-fix.patch

diff --git a/package/systemd/Config.in b/package/systemd/Config.in
index 0ab10b6..e4b31fe 100644
--- a/package/systemd/Config.in
+++ b/package/systemd/Config.in
@@ -1,11 +1,15 @@
 config BR2_PACKAGE_SYSTEMD
 	bool "systemd"
-	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
-	depends on BR2_INET_IPV6
+	depends on BR2_INIT_SYSTEMD
 	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_KMOD_TOOLS
 	help
 	  systemd is a system and service manager for Linux, compatible with
 	  SysV and LSB init scripts. systemd provides aggressive parallelization
@@ -16,8 +20,37 @@ config BR2_PACKAGE_SYSTEMD
 	  elaborate transactional dependency-based service control logic.
 	  It can work as a drop-in replacement for sysvinit.
 
+	  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 udev /dev management and a toolchain w/ IPv6, threads"
-	depends on !BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV || !BR2_INET_IPV6 || \\
-		!BR2_TOOLCHAIN_HAS_THREADS
+comment "systemd needs an (e)glibc toolchain w/ threads"
+	depends on (!BR2_INIT_SYSTEMD || !BR2_TOOLCHAIN_HAS_THREADS || \\
+		    !BR2_USE_MMU)
+
+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
diff --git a/package/systemd/systemd-fix-getty-unit.patch b/package/systemd/systemd-fix-getty-unit.patch
index 6df54b1..166a2e5 100644
--- a/package/systemd/systemd-fix-getty-unit.patch
+++ b/package/systemd/systemd-fix-getty-unit.patch
@@ -1,34 +1,32 @@
 Prefer getty to agetty in console setup systemd units
 
 Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
 ---
- 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
diff --git a/package/systemd/systemd-fix-page-size.patch b/package/systemd/systemd-fix-page-size.patch
deleted file mode 100644
index 241ceb8..0000000
--- a/package/systemd/systemd-fix-page-size.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-commit 7264278fbbdc1dc6c30fedc902d1337594aa6ff6
-Author: Lennart Poettering <lennart@poettering.net>
-Date:   Wed Mar 21 23:47:44 2012 +0100
-
-    journal: PAGE_SIZE is not known on ppc and other archs
-    
-    Let's use NAME_MAX, as suggested by Dan Walsh
-
-diff --git a/src/journal/journald.c b/src/journal/journald.c
-index d27cb60..87390bd 100644
---- a/src/journal/journald.c
-+++ b/src/journal/journald.c
-@@ -29,7 +29,6 @@
- #include <sys/ioctl.h>
- #include <linux/sockios.h>
- #include <sys/statvfs.h>
--#include <sys/user.h>
- 
- #include <systemd/sd-journal.h>
- #include <systemd/sd-login.h>
-@@ -2149,10 +2148,20 @@ static int process_event(Server *s, struct epoll_event *ev) {
-                         size_t label_len = 0;
-                         union {
-                                 struct cmsghdr cmsghdr;
-+
-+                                /* We use NAME_MAX space for the
-+                                 * SELinux label here. The kernel
-+                                 * currently enforces no limit, but
-+                                 * according to suggestions from the
-+                                 * SELinux people this will change and
-+                                 * it will probably be identical to
-+                                 * NAME_MAX. For now we use that, but
-+                                 * this should be updated one day when
-+                                 * the final limit is known.*/
-                                 uint8_t buf[CMSG_SPACE(sizeof(struct ucred)) +
-                                             CMSG_SPACE(sizeof(struct timeval)) +
--                                            CMSG_SPACE(sizeof(int)) +
--                                            CMSG_SPACE(PAGE_SIZE)]; /* selinux label */
-+                                            CMSG_SPACE(sizeof(int)) + /* fd */
-+                                            CMSG_SPACE(NAME_MAX)]; /* selinux label */
-                         } control;
-                         ssize_t n;
-                         int v;
diff --git a/package/systemd/systemd-uclibc-fix.patch b/package/systemd/systemd-uclibc-fix.patch
deleted file mode 100644
index 9a20845..0000000
--- a/package/systemd/systemd-uclibc-fix.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-[PATCH] fix build with uClibc
-
-Based on OE patch from Khem Raj:
-
-http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/systemd/systemd/paper-over-mkostemp.patch
-
-But extended to also cover execvpe (OE carries a patch adding execvpe
-support to uClibc).
-
-Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
----
- src/journal/journal-file.c |    2 ++
- src/macro.h                |   15 +++++++++++++++
- 2 files changed, 17 insertions(+)
-
-Index: systemd-44/src/macro.h
-===================================================================
---- systemd-44.orig/src/macro.h
-+++ systemd-44/src/macro.h
-@@ -28,6 +28,21 @@
- #include <sys/uio.h>
- #include <inttypes.h>
- 
-+#ifdef __UCLIBC__
-+/* uclibc does not implement mkostemp GNU extension */
-+#define mkostemp(x,y) mkstemp(x)
-+/* uclibc does not implement execvpe GNU extension */
-+#ifndef _GNU_SOURCE
-+#define _GNU_SOURCE
-+#endif
-+#include <unistd.h>
-+static inline int execvpe(const char *file, char *const argv[],
-+                          char *const envp[])
-+{
-+        environ = (char **)envp;
-+        return execvp(file, argv);
-+}
-+#endif
- #define _printf_attr_(a,b) __attribute__ ((format (printf, a, b)))
- #define _sentinel_ __attribute__ ((sentinel))
- #define _noreturn_ __attribute__((noreturn))
-Index: systemd-44/src/journal/journal-file.c
-===================================================================
---- systemd-44.orig/src/journal/journal-file.c
-+++ systemd-44/src/journal/journal-file.c
-@@ -229,11 +229,13 @@
-                 }
-         }
- 
-+#ifndef __UCLIBC__
-         /* Note that the glibc fallocate() fallback is very
-            inefficient, hence we try to minimize the allocation area
-            as we can. */
-         if (posix_fallocate(f->fd, old_size, new_size - old_size) < 0)
-                 return -errno;
-+#endif
- 
-         if (fstat(f->fd, &f->last_stat) < 0)
-                 return -errno;
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
index 4e4955e..763471c 100644
--- a/package/systemd/systemd.mk
+++ b/package/systemd/systemd.mk
@@ -4,17 +4,18 @@
 #
 ################################################################################
 
-SYSTEMD_VERSION = 44
+SYSTEMD_VERSION = 207
 SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
 SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz
 SYSTEMD_LICENSE = GPLv2+
-SYSTEMD_LICENSE_FILES = LICENSE
+SYSTEMD_LICENSE_FILES = LICENSE.GPLV2 LICENSE.LGPL2.1 LICENSE.MIT
 SYSTEMD_INSTALL_STAGING = YES
 SYSTEMD_DEPENDENCIES = \
 	host-intltool \
 	libcap \
-	udev \
-	dbus
+	dbus \
+	util-linux \
+	kmod
 
 # Make sure that systemd will always be built after busybox so that we have
 # a consistent init setup between two builds
@@ -23,21 +24,26 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 endif
 
 SYSTEMD_CONF_OPT += \
-	--with-distro=other \
+	--with-rootprefix= \
+	--with-rootlibdir=/lib \
+	--localstatedir=/var \
+	--enable-static=no \
+	--disable-manpages \
 	--disable-selinux \
 	--disable-pam \
 	--disable-libcryptsetup \
-	--disable-gtk \
-	--disable-plymouth \
-	--with-rootdir=/ \
 	--with-dbuspolicydir=/etc/dbus-1/system.d \
 	--with-dbussessionservicedir=/usr/share/dbus-1/services \
 	--with-dbussystemservicedir=/usr/share/dbus-1/system-services \
 	--with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
-	--with-udevrulesdir=/etc/udev/rules.d \
-	--with-sysvinit-path=/etc/init.d/ \
-	--without-sysvrcd-path \
-	--enable-split-usr
+	--with-firmware-path=/lib/firmware \
+	--enable-split-usr \
+	--enable-introspection=no \
+	--disable-efi \
+	--disable-myhostname \
+	--disable-tcpwrap \
+	--disable-tests \
+	--without-python
 
 ifeq ($(BR2_PACKAGE_ACL),y)
 	SYSTEMD_CONF_OPT += --enable-acl
@@ -46,8 +52,31 @@ else
 	SYSTEMD_CONF_OPT += --disable-acl
 endif
 
-ifneq ($(BR2_LARGEFILE),y)
-	SYSTEMD_CONF_OPT += --disable-largefile
+ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
+	SYSTEMD_CONF_OPT += --enable-gudev
+	SYSTEMD_DEPENDENCIES += libglib2
+else
+	SYSTEMD_CONF_OPT += --disable-gudev
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
+	SYSTEMD_DEPENDENCIES += \
+		xz 		\
+		libgcrypt
+	SYSTEMD_CONF_OPT += 	\
+		--enable-xz 	\
+		--enable-gcrypt	\
+		--with-libgcrypt-prefix=$(STAGING_DIR)/usr
+else
+	SYSTEMD_CONF_OPT += 	\
+		--disable-xz 	\
+		--disable-gcrypt
+endif
+
+ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
+        SYSTEMD_DEPENDENCIES += libmicrohttpd
+else
+        SYSTEMD_CONF_OPT += --disable-microhttpd
 endif
 
 # mq_getattr needs -lrt
@@ -55,21 +84,37 @@ SYSTEMD_MAKE_OPT += LIBS=-lrt
 SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl
 
 define SYSTEMD_INSTALL_INIT_HOOK
-	ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init
-	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
-	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff
-	ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot
+	ln -fs ../lib/systemd/systemd $(TARGET_DIR)/sbin/init
+	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/halt
+	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/poweroff
+	ln -fs ../bin/systemctl $(TARGET_DIR)/sbin/reboot
 
-	ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
+	ln -fs ../../../lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
 endef
 
 define SYSTEMD_INSTALL_TTY_HOOK
 	rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty at tty1.service
-	ln -fs ../../../../usr/lib/systemd/system/serial-getty at .service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service
+	ln -fs ../../../../lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service
+endef
+
+define SYSTEMD_INSTALL_MACHINEID_HOOK
+	touch $(TARGET_DIR)/etc/machine-id
+endef
+
+define SYSTEMD_SANITIZE_PATH_IN_UNITS
+	find $(TARGET_DIR)/lib/systemd/system -name '*.service' \
+		-exec sed -i -e 's,$(HOST_DIR),,g' {} \;
 endef
 
 SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
 	SYSTEMD_INSTALL_INIT_HOOK \
 	SYSTEMD_INSTALL_TTY_HOOK \
+	SYSTEMD_INSTALL_MACHINEID_HOOK \
+	SYSTEMD_SANITIZE_PATH_IN_UNITS
+
+define SYSTEMD_USERS
+	systemd-journal -1 systemd-journal -1 * /var/log/journal - - Journal
+	systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
+endef
 
 $(eval $(autotools-package))
diff --git a/package/udev/udev.mk b/package/udev/udev.mk
index 4857683..0056d1d 100644
--- a/package/udev/udev.mk
+++ b/package/udev/udev.mk
@@ -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."
diff --git a/system/Config.in b/system/Config.in
index 3ee0c20..9144d5b 100644
--- a/system/Config.in
+++ b/system/Config.in
@@ -80,19 +80,29 @@ config BR2_INIT_SYSV
 
 config BR2_INIT_SYSTEMD
 	bool "systemd"
+	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_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
 	select BR2_PACKAGE_SYSTEMD
 
-comment 'systemd requires largefile, wchar, IPv6, threads and eudev support'
+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_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"
@@ -100,7 +110,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
@@ -128,6 +138,9 @@ comment "eudev requires 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"
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
                   ` (4 preceding siblings ...)
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 5/5] systemd: bump to v207 Eric Le Bihan
@ 2013-11-06 15:42 ` Eric Le Bihan
  2013-11-13 23:53 ` Thomas Petazzoni
  6 siblings, 0 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-06 15:42 UTC (permalink / raw)
  To: buildroot

Hi!

Configuration files to build kernel and file system (for QEMU x86 and ARM)
with support for systemd or eudev are available in the 'systemd-eudev-v2'
branch of https://github.com/elebihan/buildroot/:

- elebihan_demo_systemd_{arm,x86}_defconfig
- elebihan_demo_eudev_{arm,x86}_defconfig.

Best Regards,
ELB

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management.
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management Eric Le Bihan
@ 2013-11-11  0:29   ` Peter Korsgaard
  0 siblings, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2013-11-11  0:29 UTC (permalink / raw)
  To: buildroot

>>>>> "Eric" == Eric Le Bihan <eric.le.bihan.dev@free.fr> writes:

> The option to choose init system was below the one for /dev
> management.  As Systemd forces the use of udev, it is logical to swap
> them.

Committed with some minor fixups to get it to apply, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system.
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system Eric Le Bihan
@ 2013-11-13 21:37   ` Thomas Petazzoni
  0 siblings, 0 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-11-13 21:37 UTC (permalink / raw)
  To: buildroot

Dear Eric Le Bihan,

On Wed,  6 Nov 2013 16:34:35 +0100, Eric Le Bihan wrote:
> 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.
> 
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-06 15:34 ` [Buildroot] [PATCH v3 3/5] eudev: new package Eric Le Bihan
@ 2013-11-13 22:41   ` Thomas Petazzoni
  2013-11-17  8:16     ` Thomas De Schampheleire
  2013-11-18 15:02     ` Eric Le Bihan
  0 siblings, 2 replies; 17+ messages in thread
From: Thomas Petazzoni @ 2013-11-13 22:41 UTC (permalink / raw)
  To: buildroot

Dear Eric Le Bihan,

On Wed,  6 Nov 2013 16:34:36 +0100, Eric Le Bihan wrote:
> 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.
> 
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
>  package/Config.in       |    1 +
>  package/eudev/Config.in |   26 ++++++++++++++++++++++++
>  package/eudev/S10udev   |   48 +++++++++++++++++++++++++++++++++++++++++++++
>  package/eudev/eudev.mk  |   50 +++++++++++++++++++++++++++++++++++++++++++++++
>  system/Config.in        |   13 ++++++++++++
>  5 files changed, 138 insertions(+)
>  create mode 100644 package/eudev/Config.in
>  create mode 100755 package/eudev/S10udev
>  create mode 100644 package/eudev/eudev.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 4c4da51..4c349da 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -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"
> diff --git a/package/eudev/Config.in b/package/eudev/Config.in
> new file mode 100644
> index 0000000..5a89325
> --- /dev/null
> +++ b/package/eudev/Config.in
> @@ -0,0 +1,26 @@
> +config BR2_PACKAGE_EUDEV
> +	bool "eudev"
> +	depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
> +	depends on BR2_LARGEFILE # util-linux
> +	depends on BR2_USE_WCHAR # util-linux
> +	depends on !BR2_PACKAGE_SYSTEMD
> +	select BR2_PACKAGE_HAS_UDEV
> +	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.

The indentation of this part of the help text is wrong. It should be
one tab + two spaces. Also, this package has dependencies on toolchain
options, so we usually have corresponding comments... but it's true
that the package will anyway only be visible when
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, and you have added the
comments where BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is defined.

There is also a decision to be taken here: do we duplicate the
dependencies here? If we don't duplicate the comments, then maybe we
shouldn't duplicate the dependencies?

It is also worth noting that you forgot the !BR2_PREFER_STATIC_LIB
dependency, which you have added on
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV.

> +	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.

I thought devtmpfs was added in 2.6.32. Are there other kernel features
that are needed to make eudev work?

> +	  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
> diff --git a/package/eudev/S10udev b/package/eudev/S10udev
> new file mode 100755
> index 0000000..e4d28a2
> --- /dev/null
> +++ b/package/eudev/S10udev

Are you using "git format-patch -M" to create your patches? It detects
renames/copies, and this file appears to be a copy of the one in
package/udev/, no?

> diff --git a/package/eudev/eudev.mk b/package/eudev/eudev.mk
> new file mode 100644
> index 0000000..8603c42
> --- /dev/null
> +++ b/package/eudev/eudev.mk
> @@ -0,0 +1,50 @@
> +################################################################################
> +#
> +# eudev
> +#
> +################################################################################
> +
> +EUDEV_VERSION         = 1.3
> +EUDEV_SITE            = https://github.com/gentoo/eudev/archive/
> +EUDEV_SOURCE          = v$(EUDEV_VERSION).tar.gz
> +EUDEV_LICENSE         = GPLv2+
> +EUDEV_LICENSE_FILES   = COPYING
> +EUDEV_INSTALL_STAGING = YES
> +EUDEV_AUTORECONF      = YES
> +
> +# mq_getattr is in librt
> +EUDEV_CONF_ENV += LIBS=-lrt
> +
> +EUDEV_CONF_OPT =		\
> +	--sbindir=/sbin		\
> +	--with-rootlibdir=/lib	\
> +	--libexecdir=/lib	\
> +	--with-firmware-path=/lib/firmware	\
> +	--disable-introspection			\
> +	--enable-split-usr			\
> +	--enable-libkmod
> +
> +EUDEV_DEPENDENCIES = host-gperf host-pkgconf util-linux kmod
> +
> +ifeq ($(BR2_PACKAGE_EUDEV_RULES_GEN),y)
> +	EUDEV_CONF_OPT += --enable-rule_generator
> +endif

We usually don't indent the body of conditionals.

> +
> +ifneq ($(BR2_LARGEFILE),y)

ifeq ($(BR2_LARGEFILE),)

to use positive logic.

> +	EUDEV_CONF_OPT += --disable-largefile
> +endif
> +
> +ifeq ($(BR2_PACKAGE_LIBGLIB2),y)
> +	EUDEV_CONF_OPT += --enable-gudev
> +	EUDEV_DEPENDENCIES += libglib2
> +else
> +	EUDEV_CONF_OPT += --disable-gudev
> +endif
> +
> +define EUDEV_INSTALL_INIT_SYSV
> +	$(INSTALL) -m 0755 package/eudev/S10udev $(TARGET_DIR)/etc/init.d/S10udev
> +endef
> +
> +EUDEV_POST_INSTALL_TARGET_HOOKS += EUDEV_INSTALL_INIT_SYSV

This last line is not needed. <pkg>_INIT_SYSV is automatically used.

> diff --git a/system/Config.in b/system/Config.in
> index 1fe4127..1867b25 100644
> --- a/system/Config.in
> +++ b/system/Config.in
> @@ -126,6 +126,19 @@ comment "udev requires a toolchain with LARGEFILE + WCHAR support"
>  comment "udev doesn't work with 'prefer static libraries'"
>  	depends on BR2_PREFER_STATIC_LIB
>  
> +config BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
> +	bool "Dynamic using eudev"
> +	depends on BR2_LARGEFILE
> +	depends on BR2_USE_WCHAR
> +	depends on !BR2_PREFER_STATIC_LIB
> +	select BR2_PACKAGE_EUDEV
> +
> +comment "eudev requires a toolchain w/ largefile, wchar"
> +	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
> +
> +comment "eudev requires a toolchain w/ dynamic library"
> +	depends on BR2_PREFER_STATIC_LIB

Can't you group those two comments?

> +
>  endchoice
>  
>  config BR2_ROOTFS_DEVICE_TABLE

Other than these fairly minor comments, this patch looks ready to me.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev
  2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
                   ` (5 preceding siblings ...)
  2013-11-06 15:42 ` [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
@ 2013-11-13 23:53 ` Thomas Petazzoni
  2013-11-15 19:54   ` Eric Le Bihan
  6 siblings, 1 reply; 17+ messages in thread
From: Thomas Petazzoni @ 2013-11-13 23:53 UTC (permalink / raw)
  To: buildroot

Dear Eric Le Bihan,

On Wed,  6 Nov 2013 16:34:33 +0100, Eric Le Bihan wrote:

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

I've tested this patch series. I managed to get the eudev part working
without any problem.

However, while your demo defconfig work fine, I was not able to get
a working configuration started from scratch. I.e, I have the following
Buildroot configuration:

BR2_arm=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_INIT_SYSTEMD=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"

and I boot it with the same kernel image that I used to boot the eudev
example (under the ARM Versatile Qemu emulation). The kernel has
cgroup support. But the boot hangs at:

Freeing unused kernel memory: 120K (c0399000 - c03b7000)
systemd[1]: Failed to mount /dev/shm: Invalid argument

Also, I've noted that kconfig complains about a dependency problem
after applying your patch set:

warning: (BR2_PACKAGE_SYSTEMD && BR2_PACKAGE_MODULE_INIT_TOOLS) selects
BR2_PACKAGE_KMOD_TOOLS which has unmet direct dependencies
(BR2_PACKAGE_KMOD && BR2_PACKAGE_BUSYBOX_SHOW_OTHERS)

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev
  2013-11-13 23:53 ` Thomas Petazzoni
@ 2013-11-15 19:54   ` Eric Le Bihan
  0 siblings, 0 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-15 19:54 UTC (permalink / raw)
  To: buildroot

Hi!

Le 14/11/2013 00:53, Thomas Petazzoni a ?crit :

> However, while your demo defconfig work fine, I was not able to get
> a working configuration started from scratch. I.e, I have the following
> Buildroot configuration:
> 
> BR2_arm=y
> BR2_TOOLCHAIN_EXTERNAL=y
> BR2_INIT_SYSTEMD=y
> BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0"
> 
> and I boot it with the same kernel image that I used to boot the eudev
> example (under the ARM Versatile Qemu emulation). The kernel has
> cgroup support. But the boot hangs at:
> 
> Freeing unused kernel memory: 120K (c0399000 - c03b7000)
> systemd[1]: Failed to mount /dev/shm: Invalid argument

This problem occurs because tmpfs support is not enabled in your kernel
configuration. Setting CONFIG_TMPFS and CONFIG_TMPFS_POSIX_ACL will
solve this issue. I will add these kernel requirements in the help menu
of Systemd.

> Also, I've noted that kconfig complains about a dependency problem
> after applying your patch set:
> 
> warning: (BR2_PACKAGE_SYSTEMD && BR2_PACKAGE_MODULE_INIT_TOOLS) selects
> BR2_PACKAGE_KMOD_TOOLS which has unmet direct dependencies
> (BR2_PACKAGE_KMOD && BR2_PACKAGE_BUSYBOX_SHOW_OTHERS)

Thanks for noticing! As module-init-tools has been deprecated in favor
of kmod, the tools lsmod, modprobe and friends are now symlinks to kmod.
Systemd directly invokes kmod, so it can not be used with the ones
provided by Busybox.
I will had a 'select BR2_PACKAGE_BUSYBOX_SHOW_OTHER' in the Config.in of
Systemd.

Best regards,
ELB

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-13 22:41   ` Thomas Petazzoni
@ 2013-11-17  8:16     ` Thomas De Schampheleire
  2013-11-17  8:19       ` Peter Korsgaard
  2013-11-18  8:46       ` Eric Le Bihan
  2013-11-18 15:02     ` Eric Le Bihan
  1 sibling, 2 replies; 17+ messages in thread
From: Thomas De Schampheleire @ 2013-11-17  8:16 UTC (permalink / raw)
  To: buildroot

Hi Thomas, all,

On Wed, Nov 13, 2013 at 11:41 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
[..]

>> +config BR2_PACKAGE_EUDEV
>> +     bool "eudev"
>> +     depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV
>> +     depends on BR2_LARGEFILE # util-linux
>> +     depends on BR2_USE_WCHAR # util-linux
>> +     depends on !BR2_PACKAGE_SYSTEMD
>> +     select BR2_PACKAGE_HAS_UDEV
>> +     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.
>
> The indentation of this part of the help text is wrong. It should be
> one tab + two spaces. Also, this package has dependencies on toolchain
> options, so we usually have corresponding comments... but it's true
> that the package will anyway only be visible when
> BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV, and you have added the
> comments where BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV is defined.
>
> There is also a decision to be taken here: do we duplicate the
> dependencies here? If we don't duplicate the comments, then maybe we
> shouldn't duplicate the dependencies?
>

The advantage of duplicating the dependencies is that there is no room
for mistakes. The policy is clear.
Take the example where package A depends on B and B needs threads.
Strictly speaking, A does not need to repeat the dependency.
However, what if A also needs threads. This may or may not be known to
the author of that package (or anyone who touches its Config.in
files). If a new version of B appears that no longer depends on
threads and this dependency is removed from B/Config.in, the
dependency of A on threads will no longer be expressed. This is a
problem.

As making the difference between 'does the package itself also needs
this dependency' or 'only the package dependencies have this
dependency' is not obvious, having different rules in this matter
creates a difficult to maintain situation IMO. Therefore, I am more in
favor of duplicating the dependencies consistently, along with the
comments.

Other inputs are obviously very welcome.

Best regards,
Thomas

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-17  8:16     ` Thomas De Schampheleire
@ 2013-11-17  8:19       ` Peter Korsgaard
  2013-11-18  8:46       ` Eric Le Bihan
  1 sibling, 0 replies; 17+ messages in thread
From: Peter Korsgaard @ 2013-11-17  8:19 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas De Schampheleire <patrickdepinguin@gmail.com> writes:

Hi,

 >> There is also a decision to be taken here: do we duplicate the
 >> dependencies here? If we don't duplicate the comments, then maybe we
 >> shouldn't duplicate the dependencies?
 >> 

 > The advantage of duplicating the dependencies is that there is no room
 > for mistakes. The policy is clear.
 > Take the example where package A depends on B and B needs threads.
 > Strictly speaking, A does not need to repeat the dependency.
 > However, what if A also needs threads. This may or may not be known to
 > the author of that package (or anyone who touches its Config.in
 > files). If a new version of B appears that no longer depends on
 > threads and this dependency is removed from B/Config.in, the
 > dependency of A on threads will no longer be expressed. This is a
 > problem.

 > As making the difference between 'does the package itself also needs
 > this dependency' or 'only the package dependencies have this
 > dependency' is not obvious, having different rules in this matter
 > creates a difficult to maintain situation IMO. Therefore, I am more in
 > favor of duplicating the dependencies consistently, along with the
 > comments.

That's fine by me. It is certainly the simplest solution.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-17  8:16     ` Thomas De Schampheleire
  2013-11-17  8:19       ` Peter Korsgaard
@ 2013-11-18  8:46       ` Eric Le Bihan
  1 sibling, 0 replies; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-18  8:46 UTC (permalink / raw)
  To: buildroot

Hi!

On Sun, Nov 17, 2013 at 09:16:26AM +0100, Thomas De Schampheleire wrote:

> As making the difference between 'does the package itself also needs
> this dependency' or 'only the package dependencies have this
> dependency' is not obvious, having different rules in this matter
> creates a difficult to maintain situation IMO. Therefore, I am more in
> favor of duplicating the dependencies consistently, along with the
> comments.

Thanks for clarifying. I'll duplicate the dependencies and the comments
in the next series.

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-13 22:41   ` Thomas Petazzoni
  2013-11-17  8:16     ` Thomas De Schampheleire
@ 2013-11-18 15:02     ` Eric Le Bihan
  2013-11-18 23:19       ` Arnout Vandecappelle
  1 sibling, 1 reply; 17+ messages in thread
From: Eric Le Bihan @ 2013-11-18 15:02 UTC (permalink / raw)
  To: buildroot

Hi!

On Wed, Nov 13, 2013 at 11:41:33PM +0100, Thomas Petazzoni wrote:

> > +	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.
>
> I thought devtmpfs was added in 2.6.32. Are there other kernel features
> that are needed to make eudev work?

That's a typo. There are no exotic dependencies (unlike systemd which requires
cgroup and tmpfs).

> Are you using "git format-patch -M" to create your patches? It detects
> renames/copies, and this file appears to be a copy of the one in
> package/udev/, no?

Surprisingly, '-M' is not enough. I must use the '--find-copies-harder' option
to detect the file copy.

> > +comment "eudev requires a toolchain w/ largefile, wchar"
> > +	depends on !(BR2_LARGEFILE && BR2_USE_WCHAR)
> > +
> > +comment "eudev requires a toolchain w/ dynamic library"
> > +	depends on BR2_PREFER_STATIC_LIB
>
> Can't you group those two comments?

Unfortunately no. If I group them, the text gets cut in the kconfig menu.

Best Regards,
ELB

^ permalink raw reply	[flat|nested] 17+ messages in thread

* [Buildroot] [PATCH v3 3/5] eudev: new package.
  2013-11-18 15:02     ` Eric Le Bihan
@ 2013-11-18 23:19       ` Arnout Vandecappelle
  0 siblings, 0 replies; 17+ messages in thread
From: Arnout Vandecappelle @ 2013-11-18 23:19 UTC (permalink / raw)
  To: buildroot

On 18/11/13 16:02, Eric Le Bihan wrote:
> Hi!
>
> On Wed, Nov 13, 2013 at 11:41:33PM +0100, Thomas Petazzoni wrote:
>
>>> > >+	  eudev requires a Linux kernel >= 2.6.34: it relies on devtmpfs.
>> >
>> >I thought devtmpfs was added in 2.6.32. Are there other kernel features
>> >that are needed to make eudev work?
> That's a typo. There are no exotic dependencies (unlike systemd which requires
> cgroup and tmpfs).
>
>> >Are you using "git format-patch -M" to create your patches? It detects
>> >renames/copies, and this file appears to be a copy of the one in
>> >package/udev/, no?
> Surprisingly, '-M' is not enough. I must use the '--find-copies-harder' option
> to detect the file copy.

  Since it's a copy, not a rename, you'd have to use -C.

  Regards,
  Arnout


[snip]


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

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-11-18 23:19 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-06 15:34 [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
2013-11-06 15:34 ` [Buildroot] [PATCH v3 1/5] system: move init system option above /dev management Eric Le Bihan
2013-11-11  0:29   ` Peter Korsgaard
2013-11-06 15:34 ` [Buildroot] [PATCH v3 2/5] sysvinit: depend on SysV selected as init system Eric Le Bihan
2013-11-13 21:37   ` Thomas Petazzoni
2013-11-06 15:34 ` [Buildroot] [PATCH v3 3/5] eudev: new package Eric Le Bihan
2013-11-13 22:41   ` Thomas Petazzoni
2013-11-17  8:16     ` Thomas De Schampheleire
2013-11-17  8:19       ` Peter Korsgaard
2013-11-18  8:46       ` Eric Le Bihan
2013-11-18 15:02     ` Eric Le Bihan
2013-11-18 23:19       ` Arnout Vandecappelle
2013-11-06 15:34 ` [Buildroot] [PATCH v3 4/5] udev: convert to virtual package Eric Le Bihan
2013-11-06 15:34 ` [Buildroot] [PATCH v3 5/5] systemd: bump to v207 Eric Le Bihan
2013-11-06 15:42 ` [Buildroot] [PATCH v3 0/5] udev is now provided by systemd or eudev Eric Le Bihan
2013-11-13 23:53 ` Thomas Petazzoni
2013-11-15 19:54   ` Eric Le Bihan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.