update buildroot to 2017.02.11
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
From a924f43f30f9c4acaf70618dd2a055f8b0f166be Mon Sep 17 00:00:00 2001
|
||||
From: Evgeny Vereshchagin <evvers@ya.ru>
|
||||
Date: Wed, 24 May 2017 08:56:48 +0300
|
||||
Subject: [PATCH] resolved: bugfix of null pointer p->question dereferencing
|
||||
(#6020)
|
||||
|
||||
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396
|
||||
|
||||
[Upstream commit: https://github.com/systemd/systemd/commit/a924f43f30f9c4acaf70618dd2a055f8b0f166be]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
src/resolve/resolved-dns-packet.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
|
||||
index 652970284e..240ee448f4 100644
|
||||
--- a/src/resolve/resolved-dns-packet.c
|
||||
+++ b/src/resolve/resolved-dns-packet.c
|
||||
@@ -2269,6 +2269,9 @@ int dns_packet_is_reply_for(DnsPacket *p, const DnsResourceKey *key) {
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
+ if (!p->question)
|
||||
+ return 0;
|
||||
+
|
||||
if (p->question->n_keys != 1)
|
||||
return 0;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
From db848813bae4d28c524b3b6a7dad135e426659ce Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 18 Jun 2017 16:07:57 -0400
|
||||
Subject: [PATCH] resolved: simplify alloc size calculation
|
||||
|
||||
The allocation size was calculated in a complicated way, and for values
|
||||
close to the page size we would actually allocate less than requested.
|
||||
|
||||
Reported by Chris Coulson <chris.coulson@canonical.com>.
|
||||
|
||||
CVE-2017-9445
|
||||
|
||||
[Upstream commit: https://github.com/systemd/systemd/commit/db848813bae4d28c524b3b6a7dad135e426659ce]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
src/resolve/resolved-dns-packet.c | 8 +-------
|
||||
src/resolve/resolved-dns-packet.h | 2 --
|
||||
2 files changed, 1 insertion(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
|
||||
index 240ee448f4..821b66e266 100644
|
||||
--- a/src/resolve/resolved-dns-packet.c
|
||||
+++ b/src/resolve/resolved-dns-packet.c
|
||||
@@ -47,13 +47,7 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
|
||||
|
||||
assert(ret);
|
||||
|
||||
- if (mtu <= UDP_PACKET_HEADER_SIZE)
|
||||
- a = DNS_PACKET_SIZE_START;
|
||||
- else
|
||||
- a = mtu - UDP_PACKET_HEADER_SIZE;
|
||||
-
|
||||
- if (a < DNS_PACKET_HEADER_SIZE)
|
||||
- a = DNS_PACKET_HEADER_SIZE;
|
||||
+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
|
||||
|
||||
/* round up to next page size */
|
||||
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
|
||||
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h
|
||||
index 2c92392e4d..3abcaf8cf3 100644
|
||||
--- a/src/resolve/resolved-dns-packet.h
|
||||
+++ b/src/resolve/resolved-dns-packet.h
|
||||
@@ -66,8 +66,6 @@ struct DnsPacketHeader {
|
||||
/* With EDNS0 we can use larger packets, default to 4096, which is what is commonly used */
|
||||
#define DNS_PACKET_UNICAST_SIZE_LARGE_MAX 4096
|
||||
|
||||
-#define DNS_PACKET_SIZE_START 512
|
||||
-
|
||||
struct DnsPacket {
|
||||
int n_ref;
|
||||
DnsProtocol protocol;
|
||||
@@ -0,0 +1,48 @@
|
||||
From 88795538726a5bbfd9efc13d441cb05e1d7fc139 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 27 Jun 2017 14:20:00 -0400
|
||||
Subject: [PATCH] resolved: do not allocate packets with minimum size
|
||||
|
||||
dns_packet_new() is sometimes called with mtu == 0, and in that case we should
|
||||
allocate more than the absolute minimum (which is the dns packet header size),
|
||||
otherwise we have to resize immediately again after appending the first data to
|
||||
the packet.
|
||||
|
||||
This partially reverts the previous commit.
|
||||
|
||||
[Upstream commit: https://github.com/systemd/systemd/commit/88795538726a5bbfd9efc13d441cb05e1d7fc139]
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
src/resolve/resolved-dns-packet.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c
|
||||
index 821b66e266..d1f0f760a4 100644
|
||||
--- a/src/resolve/resolved-dns-packet.c
|
||||
+++ b/src/resolve/resolved-dns-packet.c
|
||||
@@ -28,6 +28,9 @@
|
||||
|
||||
#define EDNS0_OPT_DO (1<<15)
|
||||
|
||||
+#define DNS_PACKET_SIZE_START 512
|
||||
+assert_cc(DNS_PACKET_SIZE_START > UDP_PACKET_HEADER_SIZE)
|
||||
+
|
||||
typedef struct DnsPacketRewinder {
|
||||
DnsPacket *packet;
|
||||
size_t saved_rindex;
|
||||
@@ -47,7 +50,14 @@ int dns_packet_new(DnsPacket **ret, DnsProtocol protocol, size_t mtu) {
|
||||
|
||||
assert(ret);
|
||||
|
||||
- a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
|
||||
+ /* When dns_packet_new() is called with mtu == 0, allocate more than the
|
||||
+ * absolute minimum (which is the dns packet header size), to avoid
|
||||
+ * resizing immediately again after appending the first data to the packet.
|
||||
+ */
|
||||
+ if (mtu < UDP_PACKET_HEADER_SIZE)
|
||||
+ a = DNS_PACKET_SIZE_START;
|
||||
+ else
|
||||
+ a = MAX(mtu, DNS_PACKET_HEADER_SIZE);
|
||||
|
||||
/* round up to next page size */
|
||||
a = PAGE_ALIGN(ALIGN(sizeof(DnsPacket)) + a) - ALIGN(sizeof(DnsPacket));
|
||||
@@ -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,72 @@
|
||||
From 32b6c22006767f0762edfa116b8b0f7be0c5c121 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
|
||||
Date: Wed, 27 Jul 2016 15:43:16 +0200
|
||||
Subject: [PATCH] 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>
|
||||
[Maxime: refresh the patch]
|
||||
[Vincent:
|
||||
refresh the patch, move-to-rootlibdir removed by:
|
||||
https://github.com/systemd/systemd/commit/082210c7a837063fd8b520b18c221b42059d7eff
|
||||
]
|
||||
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
|
||||
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
|
||||
---
|
||||
Makefile.am | 11 ++---------
|
||||
configure.ac | 2 --
|
||||
2 files changed, 2 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 0c27f81..4de1595 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -312,9 +312,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 \
|
||||
@@ -325,15 +325,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)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index cf595e6..d58f303 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -110,8 +110,6 @@ AC_PATH_PROG([SULOGIN], [sulogin], [/usr/sbin/sulogin], [$PATH:/usr/sbin:/sbin])
|
||||
AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
|
||||
AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
|
||||
|
||||
-AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
|
||||
-
|
||||
M4_DEFINES=
|
||||
|
||||
AC_CHECK_TOOL(OBJCOPY, objcopy)
|
||||
--
|
||||
2.8.1
|
||||
|
||||
@@ -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)
|
||||
+])
|
||||
332
bsp/buildroot-2017.02.11/package/systemd/Config.in
Normal file
332
bsp/buildroot-2017.02.11/package/systemd/Config.in
Normal file
@@ -0,0 +1,332 @@
|
||||
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
|
||||
|
||||
menuconfig BR2_PACKAGE_SYSTEMD
|
||||
bool "systemd"
|
||||
depends on BR2_INIT_SYSTEMD
|
||||
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_UTIL_LINUX_FSCK
|
||||
select BR2_PACKAGE_KMOD
|
||||
select BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # kmod-tools
|
||||
select BR2_PACKAGE_KMOD_TOOLS
|
||||
select BR2_TARGET_TZ_INFO
|
||||
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.
|
||||
- xz and/or l4 packages will add compression support in
|
||||
journal and coredump.
|
||||
- libcurl package will add support for systemd-journal-upload.
|
||||
- libgcrypt package will add support for journal sealing and
|
||||
DNSSEC verification in resolved.
|
||||
|
||||
Notice that systemd selects the fsck wrapper from util-linux
|
||||
but no particular fsck.<fstype> is selected. You must choose
|
||||
the apropriate ones (e.g. e2fsck, from the e2fsprogs package)
|
||||
according to the system configuration.
|
||||
|
||||
http://freedesktop.org/wiki/Software/systemd
|
||||
|
||||
if BR2_PACKAGE_SYSTEMD
|
||||
|
||||
config BR2_PACKAGE_PROVIDES_UDEV
|
||||
default "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_BACKLIGHT
|
||||
bool "enable backlight support"
|
||||
help
|
||||
systemd-backlight is a service that restores the display
|
||||
backlight brightness at early boot and saves it at shutdown.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-backlight@.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_BINFMT
|
||||
bool "enable binfmt tool"
|
||||
help
|
||||
systemd-binfmt is an early boot service that registers
|
||||
additional binary formats for executables in the kernel.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-binfmt.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_COREDUMP
|
||||
bool "enable coredump hook"
|
||||
help
|
||||
systemd-coredump can be used as a helper binary by the
|
||||
kernel when a user space program receives a fatal signal and
|
||||
dumps core.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-coredump.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_FIRSTBOOT
|
||||
bool "enable firstboot support"
|
||||
help
|
||||
systemd-firstboot initializes the most basic system settings
|
||||
interactively on the first boot.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-firstboot.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_HIBERNATE
|
||||
bool "enable hibernation support"
|
||||
help
|
||||
When this features is enabled, additional tools and services
|
||||
are built to support suspending and resuming the system.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-sleep.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_HOSTNAMED
|
||||
bool "enable hostname daemon"
|
||||
default y
|
||||
help
|
||||
systemd-hostnamed is a system service that may be used as a
|
||||
mechanism to change the system's hostname.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-hostnamed.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_HWDB
|
||||
bool "enable hwdb installation"
|
||||
default y
|
||||
help
|
||||
Enables hardware database installation to /usr/lib/udev/hwdb.d
|
||||
|
||||
Disabling this option improves first boot time (or every boot
|
||||
time in case of initramfs images) and saves several MB space.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/hwdb.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_IMPORTD
|
||||
bool "enable import daemon"
|
||||
depends on BR2_PACKAGE_LIBGPG_ERROR_ARCH_SUPPORTS # libgcrypt
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBGCRYPT
|
||||
select BR2_PACKAGE_BZIP2
|
||||
select BR2_PACKAGE_LZ4
|
||||
select BR2_PACKAGE_XZ
|
||||
select BR2_PACKAGE_ZLIB
|
||||
help
|
||||
systemd-importd is a system service that manages virtual
|
||||
machine and container images for systemd-machined and
|
||||
machinectl.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/machinectl.html#Image%20Transfer%20Commands
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_KDBUS
|
||||
bool "enable kdbus support"
|
||||
help
|
||||
Enable kdbus support for Systemd.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_LOCALED
|
||||
bool "enable locale daemon"
|
||||
help
|
||||
systemd-localed is a system service that may be used as
|
||||
mechanism to change the system locale settings, as well as
|
||||
the console key mapping and default X11 key mapping.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-localed.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_LOGIND
|
||||
bool "enable login daemon"
|
||||
help
|
||||
systemd-logind is a system service that manages user logins.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-logind.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_MACHINED
|
||||
bool "enable machine daemon"
|
||||
help
|
||||
systemd-machined is a system service that keeps track of
|
||||
virtual machines and containers, and processes belonging to
|
||||
them.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-machined.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_MYHOSTNAME
|
||||
bool "enable myhostname NSS plugin"
|
||||
default y
|
||||
help
|
||||
nss-myhostname is a plug-in module for the GNU Name Service
|
||||
Switch (NSS) functionality of the GNU C Library (glibc),
|
||||
primarily providing hostname resolution for the locally
|
||||
configured system hostname as returned by gethostname(2).
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/nss-myhostname.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_NETWORKD
|
||||
bool "enable network manager"
|
||||
default y
|
||||
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_POLKIT
|
||||
bool "enable polkit support"
|
||||
select BR2_PACKAGE_POLKIT
|
||||
help
|
||||
If enabled, systemd is built with polkit support and policy
|
||||
files for its services are generated and installed. It is
|
||||
useful for allowing unprivileged processes to speak to
|
||||
systemd's many privileged processes.
|
||||
|
||||
http://wiki.freedesktop.org/www/Software/polkit/
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_QUOTACHECK
|
||||
bool "enable quotacheck tools"
|
||||
help
|
||||
systemd-quotacheck is a service responsible for file system
|
||||
quota checks. It is run once at boot after all necessary
|
||||
file systems are mounted. It is pulled in only if at least
|
||||
one file system has quotas enabled.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-quotacheck.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_RANDOMSEED
|
||||
bool "enable random-seed support"
|
||||
help
|
||||
systemd-random-seed is a service that restores the random
|
||||
seed of the system at early boot and saves it at
|
||||
shutdown. Saving/restoring the random seed across boots
|
||||
increases the amount of available entropy early at boot.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-random-seed.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_RESOLVED
|
||||
bool "enable resolve daemon"
|
||||
default y
|
||||
help
|
||||
systemd-resolved is a system service that provides network
|
||||
name resolution to local applications. It implements a
|
||||
caching and validating DNS/DNSSEC stub resolver, as well as
|
||||
an LLMNR resolver and responder.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-resolved.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_RFKILL
|
||||
bool "enable rfkill tools"
|
||||
help
|
||||
systemd-rfkill is a service that restores the RF kill switch
|
||||
state at early boot and saves it at shutdown.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-rfkill@.service.html
|
||||
|
||||
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.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_SYSUSERS
|
||||
bool "enable sysusers support"
|
||||
help
|
||||
systemd-sysusers creates system users and groups, based on
|
||||
the file format and location specified in sysusers.d(5).
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-sysusers.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_TIMEDATED
|
||||
bool "enable timedate daemon"
|
||||
default y
|
||||
help
|
||||
systemd-timedated is a system service that may be used as a
|
||||
mechanism to change the system clock and timezone, as well
|
||||
as to enable/disable NTP time synchronization.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-timedated.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_TIMESYNCD
|
||||
bool "enable timesync daemon"
|
||||
default y
|
||||
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_TMPFILES
|
||||
bool "enable tmpfiles support"
|
||||
default y
|
||||
help
|
||||
systemd-tmpfiles creates, deletes, and cleans up volatile
|
||||
and temporary files and directories, based on the
|
||||
configuration file format and location specified in
|
||||
tmpfiles.d(5).
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-tmpfiles.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_VCONSOLE
|
||||
bool "enable vconsole tool"
|
||||
help
|
||||
systemd-vconsole-setup is an early boot service that
|
||||
configures the virtual console font and console keymap.
|
||||
|
||||
http://www.freedesktop.org/software/systemd/man/systemd-vconsole-setup.service.html
|
||||
|
||||
endif
|
||||
4
bsp/buildroot-2017.02.11/package/systemd/dhcp.network
Normal file
4
bsp/buildroot-2017.02.11/package/systemd/dhcp.network
Normal file
@@ -0,0 +1,4 @@
|
||||
[Match]
|
||||
Name=SYSTEMD_NETWORKD_DHCP_IFACE
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
21
bsp/buildroot-2017.02.11/package/systemd/network.service
Normal file
21
bsp/buildroot-2017.02.11/package/systemd/network.service
Normal file
@@ -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
|
||||
2
bsp/buildroot-2017.02.11/package/systemd/systemd.hash
Normal file
2
bsp/buildroot-2017.02.11/package/systemd/systemd.hash
Normal file
@@ -0,0 +1,2 @@
|
||||
# sha256 locally computed
|
||||
sha256 1172c7c7d5d72fbded53186e7599d5272231f04cc8b72f9a0fb2c5c20dfc4880 systemd-232.tar.gz
|
||||
409
bsp/buildroot-2017.02.11/package/systemd/systemd.mk
Normal file
409
bsp/buildroot-2017.02.11/package/systemd/systemd.mk
Normal file
@@ -0,0 +1,409 @@
|
||||
################################################################################
|
||||
#
|
||||
# systemd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
SYSTEMD_VERSION = 232
|
||||
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-blkid \
|
||||
--enable-static=no \
|
||||
--disable-manpages \
|
||||
--disable-pam \
|
||||
--disable-ima \
|
||||
--disable-libcryptsetup \
|
||||
--disable-efi \
|
||||
--disable-gnuefi \
|
||||
--disable-ldconfig \
|
||||
--disable-tests \
|
||||
--disable-coverage \
|
||||
--with-default-dnssec=no \
|
||||
--without-python
|
||||
|
||||
SYSTEMD_CFLAGS = $(TARGET_CFLAGS) -fno-lto
|
||||
|
||||
# Override paths to a few utilities needed at runtime, to
|
||||
# avoid finding those we would install in $(HOST_DIR).
|
||||
SYSTEMD_CONF_ENV = \
|
||||
CFLAGS="$(SYSTEMD_CFLAGS)" \
|
||||
ac_cv_path_KILL=/usr/bin/kill \
|
||||
ac_cv_path_KMOD=/usr/bin/kmod \
|
||||
ac_cv_path_KEXEC=/usr/sbin/kexec \
|
||||
ac_cv_path_SULOGIN=/usr/sbin/sulogin \
|
||||
ac_cv_path_MOUNT_PATH=/usr/bin/mount \
|
||||
ac_cv_path_UMOUNT_PATH=/usr/bin/umount
|
||||
|
||||
define SYSTEMD_RUN_INTLTOOLIZE
|
||||
cd $(@D) && $(HOST_DIR)/usr/bin/intltoolize --force --automake
|
||||
endef
|
||||
SYSTEMD_PRE_CONFIGURE_HOOKS += SYSTEMD_RUN_INTLTOOLIZE
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-acl
|
||||
SYSTEMD_DEPENDENCIES += acl
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-acl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-audit
|
||||
SYSTEMD_DEPENDENCIES += audit
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-audit
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBIDN),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-libidn
|
||||
SYSTEMD_DEPENDENCIES += libidn
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-libidn
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-seccomp
|
||||
SYSTEMD_DEPENDENCIES += libseccomp
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-seccomp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-xkbcommon
|
||||
SYSTEMD_DEPENDENCIES += libxkbcommon
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-xkbcommon
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-kdbus
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-kdbus
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
||||
SYSTEMD_DEPENDENCIES += bzip2
|
||||
SYSTEMD_CONF_OPTS += --enable-bzip2
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-bzip2
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LZ4),y)
|
||||
SYSTEMD_DEPENDENCIES += lz4
|
||||
SYSTEMD_CONF_OPTS += --enable-lz4
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-lz4
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XZ),y)
|
||||
SYSTEMD_DEPENDENCIES += xz
|
||||
SYSTEMD_CONF_OPTS += --enable-xz
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-xz
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
SYSTEMD_DEPENDENCIES += zlib
|
||||
SYSTEMD_CONF_OPTS += --enable-zlib
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-zlib
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
SYSTEMD_DEPENDENCIES += libcurl
|
||||
SYSTEMD_CONF_OPTS += --enable-libcurl
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-libcurl
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
SYSTEMD_DEPENDENCIES += libgcrypt
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
--enable-gcrypt \
|
||||
--with-libgcrypt-prefix=$(STAGING_DIR)/usr \
|
||||
--with-libgpg-error-prefix=$(STAGING_DIR)/usr
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-gcrypt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY),y)
|
||||
SYSTEMD_DEPENDENCIES += libmicrohttpd
|
||||
SYSTEMD_CONF_OPTS += --enable-microhttpd
|
||||
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-qrencode
|
||||
SYSTEMD_DEPENDENCIES += libqrencode
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-qrencode
|
||||
endif
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-microhttpd --disable-qrencode
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
SYSTEMD_DEPENDENCIES += libselinux
|
||||
SYSTEMD_CONF_OPTS += --enable-selinux
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-selinux
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-hwdb
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-hwdb
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-binfmt
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-binfmt
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-vconsole
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-vconsole
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-quotacheck
|
||||
SYSTEMD_CONF_ENV += \
|
||||
ac_cv_path_QUOTAON=/usr/sbin/quotaon \
|
||||
ac_cv_path_QUOTACHECK=/usr/sbin/quotacheck
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-quotacheck
|
||||
SYSTEMD_CONF_ENV += \
|
||||
ac_cv_path_QUOTAON=/.missing \
|
||||
ac_cv_path_QUOTACHECK=/.missing
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-tmpfiles
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-tmpfiles
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-sysusers
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-sysusers
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-firstboot
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-firstboot
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-randomseed
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-randomseed
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-backlight
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-backlight
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-rfkill
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-rfkill
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-logind
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-logind
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-machined
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-machined
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-importd
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-importd
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-hostnamed
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-hostnamed
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-myhostname
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-myhostname
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-timedated
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-timedated
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-localed
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-localed
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-coredump
|
||||
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * /var/lib/systemd/coredump - - Core Dumper
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-coredump
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-polkit
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-polkit
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-networkd
|
||||
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - Network Manager
|
||||
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
ln -sf ../run/systemd/resolve/resolv.conf \
|
||||
$(TARGET_DIR)/etc/resolv.conf
|
||||
endef
|
||||
SYSTEMD_NETWORKD_DHCP_IFACE = $(call qstrip,$(BR2_SYSTEM_DHCP))
|
||||
ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE),)
|
||||
define SYSTEMD_INSTALL_NETWORK_CONFS
|
||||
sed s/SYSTEMD_NETWORKD_DHCP_IFACE/$(SYSTEMD_NETWORKD_DHCP_IFACE)/ \
|
||||
package/systemd/dhcp.network > \
|
||||
$(TARGET_DIR)/etc/systemd/network/dhcp.network
|
||||
endef
|
||||
endif
|
||||
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_RESOLVED),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-resolved
|
||||
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - Network Name Resolution Manager
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-resolved
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-timesyncd
|
||||
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - Network Time Synchronization
|
||||
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
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
|
||||
SYSTEMD_CONF_OPTS += --enable-hibernate
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += --disable-hibernate
|
||||
endif
|
||||
|
||||
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
|
||||
- - 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
|
||||
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_COREDUMP_USER)
|
||||
$(SYSTEMD_NETWORKD_USER)
|
||||
$(SYSTEMD_RESOLVED_USER)
|
||||
$(SYSTEMD_TIMESYNCD_USER)
|
||||
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
|
||||
# also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
|
||||
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; \
|
||||
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
|
||||
endef
|
||||
endif
|
||||
|
||||
define SYSTEMD_INSTALL_INIT_SYSTEMD
|
||||
$(SYSTEMD_DISABLE_SERVICE_TTY1)
|
||||
$(SYSTEMD_INSTALL_SERVICE_TTY)
|
||||
$(SYSTEMD_INSTALL_SERVICE_NETWORK)
|
||||
$(SYSTEMD_INSTALL_SERVICE_TIMESYNC)
|
||||
$(SYSTEMD_INSTALL_NETWORK_CONFS)
|
||||
endef
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user