2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2012-03-23 16:49:52 +01:00
|
|
|
#
|
|
|
|
# systemd
|
|
|
|
#
|
2013-06-06 01:53:30 +02:00
|
|
|
################################################################################
|
2013-06-06 01:53:25 +02:00
|
|
|
|
2016-05-23 14:56:27 +02:00
|
|
|
SYSTEMD_VERSION = 230
|
2015-10-03 11:20:14 +02:00
|
|
|
SYSTEMD_SITE = $(call github,systemd,systemd,v$(SYSTEMD_VERSION))
|
2015-06-30 22:52:30 +02:00
|
|
|
SYSTEMD_LICENSE = LGPLv2.1+, GPLv2+ (udev), Public Domain (few source files, see README)
|
|
|
|
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README
|
2012-05-20 12:52:49 +02:00
|
|
|
SYSTEMD_INSTALL_STAGING = YES
|
2012-03-23 16:49:52 +01:00
|
|
|
SYSTEMD_DEPENDENCIES = \
|
|
|
|
host-intltool \
|
|
|
|
libcap \
|
2014-02-07 14:21:34 +01:00
|
|
|
util-linux \
|
2014-03-02 16:14:21 +01:00
|
|
|
kmod \
|
|
|
|
host-gperf
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-05-15 19:37:05 +02:00
|
|
|
SYSTEMD_PROVIDES = udev
|
2014-06-04 23:40:49 +02:00
|
|
|
SYSTEMD_AUTORECONF = YES
|
2014-05-15 19:37:05 +02:00
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
# 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)
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_DEPENDENCIES += busybox
|
2012-03-23 16:49:52 +01:00
|
|
|
endif
|
|
|
|
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += \
|
2014-02-07 14:21:34 +01:00
|
|
|
--with-rootprefix= \
|
2016-07-01 23:51:28 +02:00
|
|
|
--enable-blkid \
|
2014-02-07 14:21:34 +01:00
|
|
|
--enable-static=no \
|
|
|
|
--disable-manpages \
|
2012-03-23 16:49:52 +01:00
|
|
|
--disable-selinux \
|
|
|
|
--disable-pam \
|
2016-07-01 23:51:22 +02:00
|
|
|
--disable-ima \
|
2012-03-23 16:49:52 +01:00
|
|
|
--disable-libcryptsetup \
|
2014-02-07 14:21:34 +01:00
|
|
|
--disable-efi \
|
2015-06-29 15:14:43 +02:00
|
|
|
--disable-gnuefi \
|
2015-11-03 23:24:30 +01:00
|
|
|
--disable-ldconfig \
|
2014-02-07 14:21:34 +01:00
|
|
|
--disable-tests \
|
2016-07-01 23:51:21 +02:00
|
|
|
--disable-coverage \
|
2016-05-23 14:56:27 +02:00
|
|
|
--with-default-dnssec=no \
|
2014-02-07 14:21:34 +01:00
|
|
|
--without-python
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-08-12 22:28:27 +02:00
|
|
|
SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
|
|
|
|
|
2014-07-03 18:57:36 +02:00
|
|
|
# Override path to kmod, used in kmod-static-nodes.service
|
|
|
|
SYSTEMD_CONF_ENV = \
|
2014-08-12 22:28:27 +02:00
|
|
|
CFLAGS="$(SYSTEMD_CFLAGS)" \
|
2014-07-03 18:57:36 +02:00
|
|
|
ac_cv_path_KMOD=/usr/bin/kmod
|
|
|
|
|
2015-10-03 11:20:14 +02:00
|
|
|
define SYSTEMD_RUN_INTLTOOLIZE
|
|
|
|
cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
|
|
|
|
endef
|
|
|
|
SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE
|
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ACL),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-acl
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_DEPENDENCIES += acl
|
2012-03-23 16:49:52 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-acl
|
2012-03-23 16:49:52 +01:00
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:20 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-audit
|
|
|
|
SYSTEMD_DEPENDENCIES += audit
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-audit
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:23 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBIDN),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-libidn
|
|
|
|
SYSTEMD_DEPENDENCIES += libidn
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-libidn
|
|
|
|
endif
|
|
|
|
|
2014-09-23 11:45:45 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-seccomp
|
2014-09-23 11:45:45 +02:00
|
|
|
SYSTEMD_DEPENDENCIES += libseccomp
|
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-seccomp
|
2014-09-23 11:45:45 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:27 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-xkbcommon
|
|
|
|
SYSTEMD_DEPENDENCIES += libxkbcommon
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-xkbcommon
|
|
|
|
endif
|
|
|
|
|
2015-04-06 00:10:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-kdbus
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-kdbus
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:12 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += bzip2
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-bzip2
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-bzip2
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:13 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LZ4),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += lz4
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-lz4
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-lz4
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:11 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_XZ),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += xz
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-xz
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-xz
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:14 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += zlib
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-zlib
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-zlib
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:15 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += libcurl
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-libcurl
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-libcurl
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:11 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += libgcrypt
|
2015-07-12 14:14:33 +02:00
|
|
|
SYSTEMD_CONF_OPTS += \
|
2014-02-07 14:21:34 +01:00
|
|
|
--enable-gcrypt \
|
2016-03-29 20:00:20 +02:00
|
|
|
--with-libgcrypt-prefix=$(STAGING_DIR)/usr \
|
|
|
|
--with-libgpg-error-prefix=$(STAGING_DIR)/usr
|
2014-02-07 14:21:34 +01:00
|
|
|
else
|
2016-02-25 22:55:11 +01:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-gcrypt
|
2014-02-07 14:21:34 +01:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
|
|
|
|
SYSTEMD_DEPENDENCIES += libmicrohttpd
|
2016-02-25 22:55:16 +01:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-microhttpd
|
2016-07-01 23:51:24 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-qrencode
|
|
|
|
SYSTEMD_DEPENDENCIES += libqrencode
|
2014-02-07 14:21:34 +01:00
|
|
|
else
|
2016-07-01 23:51:24 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-qrencode
|
|
|
|
endif
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-microhttpd --disable-qrencode
|
2012-04-04 16:46:59 +02:00
|
|
|
endif
|
|
|
|
|
2016-04-15 12:46:30 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-hwdb
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-hwdb
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:19 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-binfmt
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-binfmt
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:20 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-vconsole
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-vconsole
|
|
|
|
endif
|
|
|
|
|
2016-02-25 22:55:22 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-quotacheck
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-quotacheck
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:01 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-tmpfiles
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-tmpfiles
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:02 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-sysusers
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-sysusers
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:03 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-firstboot
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-firstboot
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:04 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-randomseed
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-randomseed
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:05 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-backlight
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-backlight
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:06 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-rfkill
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-rfkill
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-logind
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-logind
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:08 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-machined
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-machined
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:09 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-importd
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-importd
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:10 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-hostnamed
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-hostnamed
|
|
|
|
endif
|
|
|
|
|
2016-07-02 15:59:07 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-myhostname
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-myhostname
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:11 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-timedated
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-timedated
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:12 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-localed
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-localed
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:13 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-coredump
|
2016-07-02 15:59:09 +02:00
|
|
|
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
|
2016-07-01 23:51:13 +02:00
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-coredump
|
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:14 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-polkit
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-polkit
|
|
|
|
endif
|
|
|
|
|
2014-03-17 15:25:42 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-networkd
|
2016-07-02 15:59:09 +02:00
|
|
|
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
|
2014-07-18 15:02:00 +02:00
|
|
|
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
|
|
|
ln -sf ../run/systemd/resolve/resolv.conf \
|
|
|
|
$(TARGET_DIR)/etc/resolv.conf
|
|
|
|
endef
|
2014-03-17 15:25:42 +01:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-networkd
|
2014-06-23 11:52:06 +02:00
|
|
|
define SYSTEMD_INSTALL_SERVICE_NETWORK
|
|
|
|
$(INSTALL) -D -m 644 package/systemd/network.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/network.service
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
|
|
|
|
ln -fs ../network.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/network.service
|
|
|
|
endef
|
2014-03-17 15:25:42 +01:00
|
|
|
endif
|
|
|
|
|
2016-07-02 15:59:08 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-resolved
|
2016-07-02 15:59:09 +02:00
|
|
|
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
|
2016-07-02 15:59:08 +02:00
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-resolved
|
|
|
|
endif
|
|
|
|
|
2014-06-04 23:40:49 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-timesyncd
|
2016-07-02 15:59:09 +02:00
|
|
|
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
|
2014-07-18 15:02:01 +02:00
|
|
|
define SYSTEMD_INSTALL_SERVICE_TIMESYNC
|
|
|
|
mkdir -p $(TARGET_DIR)/etc/systemd/system/sysinit.target.wants
|
|
|
|
ln -sf ../../../../lib/systemd/system/systemd-timesyncd.service \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/sysinit.target.wants/systemd-timesyncd.service
|
|
|
|
endef
|
2014-06-04 23:40:49 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-timesyncd
|
2014-06-04 23:40:49 +02:00
|
|
|
endif
|
|
|
|
|
2014-04-20 20:54:04 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --enable-smack
|
2014-04-20 20:54:04 +02:00
|
|
|
else
|
2014-09-27 21:32:44 +02:00
|
|
|
SYSTEMD_CONF_OPTS += --disable-smack
|
2014-04-20 20:54:04 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-01 23:51:15 +02:00
|
|
|
ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
|
|
|
|
SYSTEMD_CONF_OPTS += --enable-hibernate
|
|
|
|
else
|
|
|
|
SYSTEMD_CONF_OPTS += --disable-hibernate
|
|
|
|
endif
|
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
define SYSTEMD_INSTALL_INIT_HOOK
|
2014-02-07 14:21:34 +01:00
|
|
|
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
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2015-07-12 14:14:33 +02:00
|
|
|
ln -fs ../../../lib/systemd/system/multi-user.target \
|
|
|
|
$(TARGET_DIR)/etc/systemd/system/default.target
|
2012-03-23 16:49:52 +01:00
|
|
|
endef
|
|
|
|
|
2014-02-07 14:21:34 +01:00
|
|
|
define SYSTEMD_INSTALL_MACHINEID_HOOK
|
|
|
|
touch $(TARGET_DIR)/etc/machine-id
|
|
|
|
endef
|
|
|
|
|
2012-03-23 16:49:52 +01:00
|
|
|
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
|
2014-02-07 14:21:34 +01:00
|
|
|
SYSTEMD_INSTALL_INIT_HOOK \
|
|
|
|
SYSTEMD_INSTALL_MACHINEID_HOOK \
|
2016-02-11 00:44:03 +01:00
|
|
|
SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
2014-02-07 14:21:34 +01:00
|
|
|
|
|
|
|
define SYSTEMD_USERS
|
2016-07-01 23:51:17 +02:00
|
|
|
- - input -1 * - - - Input device group
|
|
|
|
- - systemd-journal -1 * - - - Journal
|
|
|
|
systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
|
2014-02-07 14:21:34 +01:00
|
|
|
systemd-journal-gateway -1 systemd-journal-gateway -1 * /var/log/journal - - Journal Gateway
|
2014-09-15 23:06:22 +02:00
|
|
|
systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
|
|
|
|
systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload
|
2016-07-02 15:59:09 +02:00
|
|
|
$(SYSTEMD_COREDUMP_USER)
|
|
|
|
$(SYSTEMD_NETWORKD_USER)
|
|
|
|
$(SYSTEMD_RESOLVED_USER)
|
|
|
|
$(SYSTEMD_TIMESYNCD_USER)
|
2014-02-07 14:21:34 +01:00
|
|
|
endef
|
2012-03-23 16:49:52 +01:00
|
|
|
|
2014-10-09 15:58:02 +02:00
|
|
|
define SYSTEMD_DISABLE_SERVICE_TTY1
|
2014-06-23 11:52:06 +02:00
|
|
|
rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
|
2014-10-09 15:58:02 +02:00
|
|
|
endef
|
|
|
|
|
2014-10-09 15:58:03 +02:00
|
|
|
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
|
2014-10-09 15:58:02 +02:00
|
|
|
# systemd needs getty.service for VTs and serial-getty.service for serial ttys
|
2016-03-07 02:05:09 +01:00
|
|
|
# also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
|
2014-10-09 15:58:02 +02:00
|
|
|
define SYSTEMD_INSTALL_SERVICE_TTY
|
|
|
|
if echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
|
|
|
|
then \
|
|
|
|
SERVICE="getty"; \
|
|
|
|
else \
|
|
|
|
SERVICE="serial-getty"; \
|
|
|
|
fi; \
|
|
|
|
ln -fs ../../../../lib/systemd/system/$${SERVICE}@.service \
|
2016-03-07 02:05:09 +01:00
|
|
|
$(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service; \
|
|
|
|
if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \
|
|
|
|
then \
|
|
|
|
$(SED) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR)/lib/systemd/system/$${SERVICE}@.service; \
|
|
|
|
fi
|
2014-06-23 11:52:06 +02:00
|
|
|
endef
|
2014-10-09 15:58:03 +02:00
|
|
|
endif
|
2014-06-23 11:52:06 +02:00
|
|
|
|
|
|
|
define SYSTEMD_INSTALL_INIT_SYSTEMD
|
2014-10-09 15:58:02 +02:00
|
|
|
$(SYSTEMD_DISABLE_SERVICE_TTY1)
|
2014-06-23 11:52:06 +02:00
|
|
|
$(SYSTEMD_INSTALL_SERVICE_TTY)
|
|
|
|
$(SYSTEMD_INSTALL_SERVICE_NETWORK)
|
2014-07-18 15:02:01 +02:00
|
|
|
$(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
|
2014-06-23 11:52:06 +02:00
|
|
|
endef
|
|
|
|
|
2012-07-03 00:07:32 +02:00
|
|
|
$(eval $(autotools-package))
|