Move all to deprecated folder.
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
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>
|
||||
---
|
||||
|
||||
diff -aburN systemd-212.orig/units/getty@.service.m4 systemd-212/units/getty@.service.m4
|
||||
--- systemd-212.orig/units/getty@.service.m4 2014-01-28 11:08:51.000000000 +0100
|
||||
+++ systemd-212/units/getty@.service.m4 2014-03-26 11:06:27.000000000 +0100
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
[Service]
|
||||
# the VT is cleared by TTYVTDisallocate
|
||||
-ExecStart=-/sbin/agetty --noclear %I $TERM
|
||||
+ExecStart=-/sbin/getty -L %I 115200 vt100
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
diff -aburN systemd-212.orig/units/serial-getty@.service.m4 systemd-212/units/serial-getty@.service.m4
|
||||
--- systemd-212.orig/units/serial-getty@.service.m4 2014-03-13 18:47:24.000000000 +0100
|
||||
+++ systemd-212/units/serial-getty@.service.m4 2014-03-26 11:07:01.000000000 +0100
|
||||
@@ -22,7 +22,7 @@
|
||||
IgnoreOnIsolate=yes
|
||||
|
||||
[Service]
|
||||
-ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
|
||||
+ExecStart=-/sbin/getty -L %I 115200 vt100
|
||||
Type=idle
|
||||
Restart=always
|
||||
RestartSec=0
|
||||
@@ -0,0 +1,84 @@
|
||||
From 582c9a734a0e976592946ff5b577f98551170a38 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Date: Mon, 21 Jul 2014 11:34:38 +0200
|
||||
Subject: [PATCH 1/1] build-sys: revert use of ln relative option.
|
||||
|
||||
Systemd build system now uses the `--relative` option from `ln(1)`.
|
||||
This option was added to GNU coreutils 8.16, which is not widely
|
||||
deployed yet by GNU/Linux distributions (not available in Debian Wheezy
|
||||
for example).
|
||||
|
||||
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
---
|
||||
Makefile.am | 19 +++++--------------
|
||||
configure.ac | 2 --
|
||||
2 files changed, 5 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index e238cde..02b39ea 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -219,8 +219,8 @@ define move-to-rootlibdir
|
||||
if test "$(libdir)" != "$(rootlibdir)"; then \
|
||||
$(MKDIR_P) $(DESTDIR)$(rootlibdir) && \
|
||||
so_img_name=$$(readlink $(DESTDIR)$(libdir)/$$libname) && \
|
||||
- rm -f $(DESTDIR)$(libdir)/$$libname && \
|
||||
- $(LN_S) --relative -f $(DESTDIR)$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
|
||||
+ so_img_rel_target_prefix=$$(echo $(libdir) | sed 's,\(^/\|\)[^/][^/]*,..,g') && \
|
||||
+ $(LN_S) -f $$so_img_rel_target_prefix$(rootlibdir)/$$so_img_name $(DESTDIR)$(libdir)/$$libname && \
|
||||
mv $(DESTDIR)$(libdir)/$$libname.* $(DESTDIR)$(rootlibdir); \
|
||||
fi
|
||||
endef
|
||||
@@ -279,9 +279,9 @@ install-aliases-hook:
|
||||
set -- $(SYSTEM_UNIT_ALIASES) && \
|
||||
dir=$(systemunitdir) && $(install-aliases)
|
||||
set -- $(USER_UNIT_ALIASES) && \
|
||||
- dir=$(userunitdir) && $(install-relative-aliases)
|
||||
+ dir=$(userunitdir) && $(install-aliases)
|
||||
set -- $(GENERAL_ALIASES) && \
|
||||
- dir= && $(install-relative-aliases)
|
||||
+ dir= && $(install-aliases)
|
||||
|
||||
define install-aliases
|
||||
while [ -n "$$1" ]; do \
|
||||
@@ -292,15 +292,6 @@ define install-aliases
|
||||
done
|
||||
endef
|
||||
|
||||
-define install-relative-aliases
|
||||
- while [ -n "$$1" ]; do \
|
||||
- $(MKDIR_P) `dirname $(DESTDIR)$$dir/$$2` && \
|
||||
- rm -f $(DESTDIR)$$dir/$$2 && \
|
||||
- $(LN_S) --relative $(DESTDIR)$$1 $(DESTDIR)$$dir/$$2 && \
|
||||
- shift 2 || exit $$?; \
|
||||
- done
|
||||
-endef
|
||||
-
|
||||
install-touch-usr-hook:
|
||||
touch -c $(DESTDIR)/$(prefix)
|
||||
|
||||
@@ -2034,7 +2025,7 @@ systemd_dbus1_generator_LDADD = \
|
||||
dbus1-generator-install-hook:
|
||||
$(AM_V_at)$(MKDIR_P) $(DESTDIR)$(usergeneratordir)
|
||||
$(AM_V_RM)rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
|
||||
- $(AM_V_LN)$(LN_S) --relative -f $(DESTDIR)$(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
|
||||
+ $(AM_V_LN)$(LN_S) -f $(systemgeneratordir)/systemd-dbus1-generator $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
|
||||
|
||||
dbus1-generator-uninstall-hook:
|
||||
rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ae88382..ec220af 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -96,8 +96,6 @@ AC_PATH_PROG([KMOD], [kmod], [/usr/bin/kmod], [$PATH:/usr/sbin:/sbin])
|
||||
|
||||
AC_PATH_PROG([KEXEC], [kexec], [/usr/sbin/kexec], [$PATH:/usr/sbin:/sbin])
|
||||
|
||||
-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
|
||||
-
|
||||
M4_DEFINES=
|
||||
|
||||
# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
|
||||
--
|
||||
1.7.10.4
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
Fix AM_PATH_LIBGCRYPT not found
|
||||
|
||||
This patch installs a copy of libgcrypt.m4 from the libgcrypt source tarball
|
||||
to systemd m4 directory.
|
||||
|
||||
Libgcrypt uses a custom m4 macro and not pkg-config to check if the
|
||||
development files are available. Though libgcrypt support is optional in
|
||||
systemd, this macro should be available whenever autoreconf is used, otherwise
|
||||
the re-configuration will fail with:
|
||||
|
||||
configure.ac:616: warning: macro 'AM_PATH_LIBGCRYPT' not found in library
|
||||
|
||||
As asking the user to install the development package of libgcrypt on the host
|
||||
machine or adding libgcrypt as a build dependency to systemd is not
|
||||
acceptable, the required file is added to the m4 directory.
|
||||
|
||||
Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Index: systemd-213/m4/libgcrypt.m4
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ systemd-213/m4/libgcrypt.m4 2014-06-11 10:41:11.749305509 +0200
|
||||
@@ -0,0 +1,123 @@
|
||||
+dnl Autoconf macros for libgcrypt
|
||||
+dnl Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||
+dnl
|
||||
+dnl This file is free software; as a special exception the author gives
|
||||
+dnl unlimited permission to copy and/or distribute it, with or without
|
||||
+dnl modifications, as long as this notice is preserved.
|
||||
+dnl
|
||||
+dnl This file is distributed in the hope that it will be useful, but
|
||||
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
+
|
||||
+
|
||||
+dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION,
|
||||
+dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
|
||||
+dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS.
|
||||
+dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed
|
||||
+dnl with the API version to also check the API compatibility. Example:
|
||||
+dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed
|
||||
+dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using
|
||||
+dnl this features allows to prevent build against newer versions of libgcrypt
|
||||
+dnl with a changed API.
|
||||
+dnl
|
||||
+AC_DEFUN([AM_PATH_LIBGCRYPT],
|
||||
+[ AC_ARG_WITH(libgcrypt-prefix,
|
||||
+ AC_HELP_STRING([--with-libgcrypt-prefix=PFX],
|
||||
+ [prefix where LIBGCRYPT is installed (optional)]),
|
||||
+ libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="")
|
||||
+ if test x$libgcrypt_config_prefix != x ; then
|
||||
+ if test x${LIBGCRYPT_CONFIG+set} != xset ; then
|
||||
+ LIBGCRYPT_CONFIG=$libgcrypt_config_prefix/bin/libgcrypt-config
|
||||
+ fi
|
||||
+ fi
|
||||
+
|
||||
+ AC_PATH_TOOL(LIBGCRYPT_CONFIG, libgcrypt-config, no)
|
||||
+ tmp=ifelse([$1], ,1:1.2.0,$1)
|
||||
+ if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
|
||||
+ req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'`
|
||||
+ min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
|
||||
+ else
|
||||
+ req_libgcrypt_api=0
|
||||
+ min_libgcrypt_version="$tmp"
|
||||
+ fi
|
||||
+
|
||||
+ AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version)
|
||||
+ ok=no
|
||||
+ if test "$LIBGCRYPT_CONFIG" != "no" ; then
|
||||
+ req_major=`echo $min_libgcrypt_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
|
||||
+ req_minor=`echo $min_libgcrypt_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
|
||||
+ req_micro=`echo $min_libgcrypt_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
|
||||
+ libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version`
|
||||
+ major=`echo $libgcrypt_config_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
|
||||
+ minor=`echo $libgcrypt_config_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
|
||||
+ micro=`echo $libgcrypt_config_version | \
|
||||
+ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
|
||||
+ if test "$major" -gt "$req_major"; then
|
||||
+ ok=yes
|
||||
+ else
|
||||
+ if test "$major" -eq "$req_major"; then
|
||||
+ if test "$minor" -gt "$req_minor"; then
|
||||
+ ok=yes
|
||||
+ else
|
||||
+ if test "$minor" -eq "$req_minor"; then
|
||||
+ if test "$micro" -ge "$req_micro"; then
|
||||
+ ok=yes
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ if test $ok = yes; then
|
||||
+ AC_MSG_RESULT([yes ($libgcrypt_config_version)])
|
||||
+ else
|
||||
+ AC_MSG_RESULT(no)
|
||||
+ fi
|
||||
+ if test $ok = yes; then
|
||||
+ # If we have a recent libgcrypt, we should also check that the
|
||||
+ # API is compatible
|
||||
+ if test "$req_libgcrypt_api" -gt 0 ; then
|
||||
+ tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0`
|
||||
+ if test "$tmp" -gt 0 ; then
|
||||
+ AC_MSG_CHECKING([LIBGCRYPT API version])
|
||||
+ if test "$req_libgcrypt_api" -eq "$tmp" ; then
|
||||
+ AC_MSG_RESULT([okay])
|
||||
+ else
|
||||
+ ok=no
|
||||
+ AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp])
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ if test $ok = yes; then
|
||||
+ LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
|
||||
+ LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
|
||||
+ ifelse([$2], , :, [$2])
|
||||
+ if test x"$host" != x ; then
|
||||
+ libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none`
|
||||
+ if test x"$libgcrypt_config_host" != xnone ; then
|
||||
+ if test x"$libgcrypt_config_host" != x"$host" ; then
|
||||
+ AC_MSG_WARN([[
|
||||
+***
|
||||
+*** The config script $LIBGCRYPT_CONFIG was
|
||||
+*** built for $libgcrypt_config_host and thus may not match the
|
||||
+*** used host $host.
|
||||
+*** You may want to use the configure option --with-libgcrypt-prefix
|
||||
+*** to specify a matching config script.
|
||||
+***]])
|
||||
+ fi
|
||||
+ fi
|
||||
+ fi
|
||||
+ else
|
||||
+ LIBGCRYPT_CFLAGS=""
|
||||
+ LIBGCRYPT_LIBS=""
|
||||
+ ifelse([$3], , :, [$3])
|
||||
+ fi
|
||||
+ AC_SUBST(LIBGCRYPT_CFLAGS)
|
||||
+ AC_SUBST(LIBGCRYPT_LIBS)
|
||||
+])
|
||||
141
deprecated/firmware/buildroot/package/systemd/Config.in
Normal file
141
deprecated/firmware/buildroot/package/systemd/Config.in
Normal file
@@ -0,0 +1,141 @@
|
||||
config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
|
||||
bool
|
||||
# see src/shared/architecture.h
|
||||
default y if BR2_arm || BR2_armeb || BR2_i386 || BR2_mips || \
|
||||
BR2_mipsel || BR2_powerpc || BR2_powerpc64 || \
|
||||
BR2_powerpc64le || BR2_sh4 || BR2_sh4eb || \
|
||||
BR2_sh4a || BR2_sh4aeb || BR2_sparc || BR2_x86_64 || \
|
||||
BR2_aarch64 || BR2_m68k
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD
|
||||
bool "systemd"
|
||||
depends on BR2_INIT_SYSTEMD
|
||||
depends on BR2_USE_WCHAR # util-linux
|
||||
depends on !BR2_STATIC_LIBS # kmod
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # dbus
|
||||
depends on BR2_USE_MMU # dbus
|
||||
select BR2_PACKAGE_HAS_UDEV
|
||||
select BR2_PACKAGE_DBUS # runtime dependency only
|
||||
select BR2_PACKAGE_LIBCAP
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBBLKID
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
|
||||
select BR2_PACKAGE_UTIL_LINUX_BINARIES
|
||||
select BR2_PACKAGE_UTIL_LINUX_MOUNT
|
||||
select BR2_PACKAGE_UTIL_LINUX_NOLOGIN
|
||||
select BR2_PACKAGE_KMOD
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
|
||||
select BR2_PACKAGE_KMOD_TOOLS
|
||||
help
|
||||
systemd is a system and service manager for Linux, compatible with
|
||||
SysV and LSB init scripts. systemd provides aggressive parallelization
|
||||
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.
|
||||
|
||||
Systemd requires a Linux kernel >= 3.0 with the following options
|
||||
enabled:
|
||||
|
||||
- CONFIG_CGROUPS
|
||||
- CONFIG_INOTIFY_USER
|
||||
- CONFIG_FHANDLE
|
||||
- CONFIG_AUTOFS4_FS
|
||||
- CONFIG_TMPFS_POSIX_ACL
|
||||
- CONFIG_TMPFS_XATTR
|
||||
|
||||
These options will be automatically enabled by Buildroot if
|
||||
it is responsible for building the kernel. Otherwise, if you
|
||||
are building your kernel outside of Buildroot, make sure
|
||||
these options are enabled.
|
||||
|
||||
Systemd also provides udev, the userspace device daemon.
|
||||
|
||||
The selection of other packages will enable some features:
|
||||
|
||||
- acl package will add support for multi-seat.
|
||||
|
||||
http://freedesktop.org/wiki/Software/systemd
|
||||
|
||||
if BR2_PACKAGE_SYSTEMD
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_UDEV
|
||||
default "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_KDBUS
|
||||
bool "enable kdbus support"
|
||||
help
|
||||
Enable kdbus support for Systemd.
|
||||
|
||||
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
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_NETWORKD
|
||||
bool "enable network manager"
|
||||
help
|
||||
systemd-networkd is a system service that manages networks.
|
||||
It detects and configures network devices as they appear, as well as
|
||||
creating virtual network devices.
|
||||
|
||||
This simple network configuration solution is an alternative to
|
||||
dhcpcd or ISC dhcp.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-networkd.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_TIMESYNCD
|
||||
bool "enable SNTP client"
|
||||
depends on BR2_PACKAGE_SYSTEMD_NETWORKD
|
||||
help
|
||||
systemd-timesyncd is a service that may be used to synchronize the
|
||||
local system clock with a Network Time Protocol Server.
|
||||
|
||||
This simple NTP solution is an alternative to sntp/ntpd from the ntp
|
||||
package.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-timesyncd.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_COMPAT
|
||||
bool "enable compatibility libraries"
|
||||
help
|
||||
Since systemd 209, the following libraries have been merged into
|
||||
libsystemd.so:
|
||||
|
||||
- libsystemd-daemon
|
||||
- libsystemd-id128
|
||||
- libsystemd-journal
|
||||
- libsystemd-login
|
||||
|
||||
This option enables the installation of compatibility *.pc files.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
|
||||
bool "enable SMACK support"
|
||||
select BR2_PACKAGE_ATTR
|
||||
select BR2_PACKAGE_SMACK
|
||||
help
|
||||
Enable support for SMACK, the Simple Mandatory Access Control
|
||||
Kernel, a minimal approach to Access Control implemented as a kernel
|
||||
LSM.
|
||||
|
||||
This feature requires a kernel >= 3.8.
|
||||
|
||||
When this feature is enabled, Systemd mounts smackfs and manages
|
||||
security labels for sockets.
|
||||
|
||||
endif
|
||||
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Network Connectivity
|
||||
Wants=network.target
|
||||
Before=network.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
|
||||
# lo is brought up earlier, which will cause the upcoming "ifup -a" to fail
|
||||
# with exit code 1, due to an "ip: RTNETLINK answers: File exists" error during
|
||||
# its "ip addr add ..." command, subsequently causing this unit to fail even
|
||||
# though it is a benign error. Flushing the lo address with the command below
|
||||
# before ifup prevents this failure.
|
||||
ExecStart=/sbin/ip addr flush dev lo
|
||||
|
||||
ExecStart=/sbin/ifup -a
|
||||
ExecStop=/sbin/ifdown -a
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,2 @@
|
||||
# sha256 locally computed
|
||||
sha256 dd124ff561a07e6439ed2b3713f38ca914df7747f110ce86deea17b56d245ae6 systemd-228.tar.gz
|
||||
191
deprecated/firmware/buildroot/package/systemd/systemd.mk
Normal file
191
deprecated/firmware/buildroot/package/systemd/systemd.mk
Normal file
@@ -0,0 +1,191 @@
|
||||
################################################################################
|
||||
#
|
||||
# systemd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SYSTEMD_VERSION = 228
|
||||
SYSTEMD_SITE = $(call github,systemd,systemd,v$(SYSTEMD_VERSION))
|
||||
SYSTEMD_LICENSE = LGPLv2.1+, GPLv2+ (udev), Public Domain (few source files, see README)
|
||||
SYSTEMD_LICENSE_FILES = LICENSE.GPL2 LICENSE.LGPL2.1 README
|
||||
SYSTEMD_INSTALL_STAGING = YES
|
||||
SYSTEMD_DEPENDENCIES = \
|
||||
host-intltool \
|
||||
libcap \
|
||||
util-linux \
|
||||
kmod \
|
||||
host-gperf
|
||||
|
||||
SYSTEMD_PROVIDES = udev
|
||||
SYSTEMD_AUTORECONF = YES
|
||||
|
||||
# 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_OPTS += \
|
||||
--with-rootprefix= \
|
||||
--enable-static=no \
|
||||
--disable-manpages \
|
||||
--disable-selinux \
|
||||
--disable-pam \
|
||||
--disable-libcryptsetup \
|
||||
--disable-efi \
|
||||
--disable-gnuefi \
|
||||
--disable-ldconfig \
|
||||
--disable-tests \
|
||||
--without-python
|
||||
|
||||
SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
|
||||
|
||||
# Override path to kmod, used in kmod-static-nodes.service
|
||||
SYSTEMD_CONF_ENV = \
|
||||
CFLAGS="$(SYSTEMD_CFLAGS)" \
|
||||
ac_cv_path_KMOD=/usr/bin/kmod
|
||||
|
||||
define SYSTEMD_RUN_INTLTOOLIZE
|
||||
cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
|
||||
endef
|
||||
SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_COMPAT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-compat-libs
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-compat-libs
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-acl
|
||||
SYSTEMD_DEPENDENCIES += acl
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-acl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-seccomp
|
||||
SYSTEMD_DEPENDENCIES += libseccomp
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-seccomp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-kdbus
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-kdbus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_ALL_EXTRAS),y)
|
||||
SYSTEMD_DEPENDENCIES += xz libgcrypt
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
--enable-xz \
|
||||
--enable-gcrypt \
|
||||
--with-libgcrypt-prefix=$(STAGING_DIR)/usr
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
--disable-xz \
|
||||
--disable-gcrypt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
|
||||
SYSTEMD_DEPENDENCIES += libmicrohttpd
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-microhttpd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-networkd
|
||||
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
ln -sf ../run/systemd/resolve/resolv.conf \
|
||||
$(TARGET_DIR)/etc/resolv.conf
|
||||
endef
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-networkd
|
||||
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
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-timesyncd
|
||||
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
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-timesyncd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-smack
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-smack
|
||||
endif
|
||||
|
||||
# mq_getattr needs -lrt
|
||||
SYSTEMD_MAKE_OPTS += LIBS=-lrt
|
||||
SYSTEMD_MAKE_OPTS += LDFLAGS+=-ldl
|
||||
|
||||
define SYSTEMD_INSTALL_INIT_HOOK
|
||||
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 ../../../lib/systemd/system/multi-user.target \
|
||||
$(TARGET_DIR)/etc/systemd/system/default.target
|
||||
endef
|
||||
|
||||
define SYSTEMD_INSTALL_MACHINEID_HOOK
|
||||
touch $(TARGET_DIR)/etc/machine-id
|
||||
endef
|
||||
|
||||
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
|
||||
SYSTEMD_INSTALL_INIT_HOOK \
|
||||
SYSTEMD_INSTALL_MACHINEID_HOOK \
|
||||
SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
|
||||
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
|
||||
systemd-journal-remote -1 systemd-journal-remote -1 * /var/log/journal/remote - - Journal Remote
|
||||
systemd-journal-upload -1 systemd-journal-upload -1 * - - - Journal Upload
|
||||
systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
|
||||
systemd-bus-proxy -1 systemd-bus-proxy -1 * - - - Proxy D-Bus messages to/from a bus
|
||||
systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
|
||||
systemd-network -1 systemd-network -1 * - - - Network Manager
|
||||
- - input -1 * - - - Input device group
|
||||
endef
|
||||
|
||||
define SYSTEMD_DISABLE_SERVICE_TTY1
|
||||
rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
|
||||
endef
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
|
||||
# systemd needs getty.service for VTs and serial-getty.service for serial ttys
|
||||
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 \
|
||||
$(TARGET_DIR)/etc/systemd/system/getty.target.wants/$${SERVICE}@$(BR2_TARGET_GENERIC_GETTY_PORT).service
|
||||
endef
|
||||
endif
|
||||
|
||||
define SYSTEMD_INSTALL_INIT_SYSTEMD
|
||||
$(SYSTEMD_DISABLE_SERVICE_TTY1)
|
||||
$(SYSTEMD_INSTALL_SERVICE_TTY)
|
||||
$(SYSTEMD_INSTALL_SERVICE_NETWORK)
|
||||
$(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user