summaryrefslogtreecommitdiffstats
path: root/package/systemd
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2012-03-23 16:49:52 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2012-03-31 23:41:49 +0200
commitf4a5eed474c561557b0c21a05682ed9585c6c60a (patch)
tree4a8ad0d652baf4c3919ee6a66c222a257d09d235 /package/systemd
parentf179d3315c781f2f3cbfc26092b67dc75417efd0 (diff)
downloadbuildroot-novena-f4a5eed474c561557b0c21a05682ed9585c6c60a.tar.gz
buildroot-novena-f4a5eed474c561557b0c21a05682ed9585c6c60a.zip
Add the systemd package
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/systemd')
-rw-r--r--package/systemd/Config.in20
-rw-r--r--package/systemd/systemd-fix-getty-unit.patch34
-rw-r--r--package/systemd/systemd.mk62
3 files changed, 116 insertions, 0 deletions
diff --git a/package/systemd/Config.in b/package/systemd/Config.in
new file mode 100644
index 000000000..8df3318f1
--- /dev/null
+++ b/package/systemd/Config.in
@@ -0,0 +1,20 @@
+config BR2_PACKAGE_SYSTEMD
+ bool "systemd"
+ depends on BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV
+ depends on BR2_INET_IPV6
+ select BR2_PACKAGE_DBUS
+ select BR2_PACKAGE_LIBCAP
+ help
+ systemd is a system and service manager for Linux, compatible with
+ SysV and LSB init scripts. systemd provides aggressive parallelization
+ capabilities, uses socket and D-Bus activation for starting services,
+ offers on-demand starting of daemons, keeps track of processes using
+ Linux cgroups, supports snapshotting and restoring of the system
+ state, maintains mount and automount points and implements an
+ elaborate transactional dependency-based service control logic.
+ It can work as a drop-in replacement for sysvinit.
+
+ http://freedesktop.org/wiki/Software/systemd
+
+comment "systemd not available (depends on /dev management with udev and ipv6 support)"
+ depends on !(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV && BR2_INET_IPV6)
diff --git a/package/systemd/systemd-fix-getty-unit.patch b/package/systemd/systemd-fix-getty-unit.patch
new file mode 100644
index 000000000..6df54b132
--- /dev/null
+++ b/package/systemd/systemd-fix-getty-unit.patch
@@ -0,0 +1,34 @@
+Prefer getty to agetty in console setup systemd units
+
+Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
+---
+ units/getty@.service.m4 | 2 +-
+ units/serial-getty@.service.m4 | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+Index: systemd-37/units/getty@.service.m4
+===================================================================
+--- systemd-37.orig/units/getty@.service.m4
++++ systemd-37/units/getty@.service.m4
+@@ -32,7 +32,7 @@
+
+ [Service]
+ Environment=TERM=linux
+-ExecStart=-/sbin/agetty %I 38400
++ExecStart=-/sbin/getty -L %I 115200 vt100
+ Restart=always
+ RestartSec=0
+ UtmpIdentifier=%I
+Index: systemd-37/units/serial-getty@.service.m4
+===================================================================
+--- systemd-37.orig/units/serial-getty@.service.m4
++++ systemd-37/units/serial-getty@.service.m4
+@@ -32,7 +32,7 @@
+
+ [Service]
+ Environment=TERM=vt100
+-ExecStart=-/sbin/agetty -s %I 115200,38400,9600
++ExecStart=-/sbin/getty -L %I 115200 vt100
+ Restart=always
+ RestartSec=0
+ UtmpIdentifier=%I
diff --git a/package/systemd/systemd.mk b/package/systemd/systemd.mk
new file mode 100644
index 000000000..fc49f3c7f
--- /dev/null
+++ b/package/systemd/systemd.mk
@@ -0,0 +1,62 @@
+#############################################################
+#
+# systemd
+#
+#############################################################
+SYSTEMD_VERSION = 37
+SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
+SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.bz2
+SYSTEMD_DEPENDENCIES = \
+ host-intltool \
+ libcap \
+ udev \
+ dbus
+
+# Make sure that systemd will always be built after busybox so that we have
+# a consistent init setup between two builds
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+ SYSTEMD_DEPENDENCIES += busybox
+endif
+
+SYSTEMD_CONF_OPT += \
+ --with-distro=other \
+ --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
+
+ifeq ($(BR2_PACKAGE_ACL),y)
+ SYSTEMD_CONF_OPT += --enable-acl
+ SYSTEMD_DEPENDENCIES += acl
+else
+ SYSTEMD_CONF_OPT += --disable-acl
+endif
+
+define SYSTEMD_INSTALL_INIT_HOOK
+ ln -fs ../bin/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 ../../../../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@tty1.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
+
+SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
+ SYSTEMD_INSTALL_INIT_HOOK \
+ SYSTEMD_INSTALL_TTY_HOOK \
+
+$(eval $(call AUTOTARGETS))