generated from gaoyang3513/SDK_RK3288
[Mod] First commit
This commit is contained in:
@ -0,0 +1,33 @@
|
||||
From 16c132a6a0389e0eaea70c4ad95dbfd1637ec5ba Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@smile.fr>
|
||||
Date: Fri, 7 Jan 2022 22:25:23 +0100
|
||||
Subject: [PATCH] missing-syscall: define MOVE_MOUNT_T_EMPTY_PATH if missing
|
||||
|
||||
MOVE_MOUNT_T_EMPTY_PATH has been added to systemd 250 by [1]
|
||||
but it's defined in kernel headers since version 5.2.
|
||||
|
||||
[1] c7bf079bbc19e3b409acc0c7acc3e14749211fe2
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@smile.fr>
|
||||
---
|
||||
src/basic/missing_syscall.h | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h
|
||||
index 8267b1a90c..793d111c55 100644
|
||||
--- a/src/basic/missing_syscall.h
|
||||
+++ b/src/basic/missing_syscall.h
|
||||
@@ -569,6 +569,10 @@ static inline int missing_open_tree(
|
||||
#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */
|
||||
#endif
|
||||
|
||||
+#ifndef MOVE_MOUNT_T_EMPTY_PATH
|
||||
+#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
|
||||
+#endif
|
||||
+
|
||||
static inline int missing_move_mount(
|
||||
int from_dfd,
|
||||
const char *from_pathname,
|
||||
--
|
||||
2.31.1
|
||||
|
||||
2
package/systemd/80-buildroot.preset
Normal file
2
package/systemd/80-buildroot.preset
Normal file
@ -0,0 +1,2 @@
|
||||
# Higher priority than systemd presets
|
||||
# This file is currently empty, but is available for demonstration and future use
|
||||
530
package/systemd/Config.in
Normal file
530
package/systemd/Config.in
Normal file
@ -0,0 +1,530 @@
|
||||
config BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
|
||||
bool
|
||||
# see src/basic/architecture.h
|
||||
default y if BR2_arc
|
||||
default y if BR2_aarch64 || BR2_aarch64_be
|
||||
default y if BR2_arm || BR2_armeb
|
||||
default y if BR2_i386 || BR2_x86_64
|
||||
default y if BR2_m68k
|
||||
default y if BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
|
||||
default y if BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le
|
||||
default y if BR2_nios2
|
||||
default y if BR2_riscv
|
||||
default y if BR2_sh4 || BR2_sh4eb || BR2_sh4a || BR2_sh4aeb
|
||||
default y if BR2_sparc || BR2_sparc64
|
||||
default y if BR2_s390x
|
||||
|
||||
menuconfig BR2_PACKAGE_SYSTEMD
|
||||
bool "systemd"
|
||||
depends on BR2_INIT_SYSTEMD
|
||||
depends on BR2_PACKAGE_SYSTEMD_ARCH_SUPPORTS
|
||||
depends on BR2_USE_MMU
|
||||
depends on !BR2_STATIC_LIBS # kmod
|
||||
depends on BR2_TOOLCHAIN_USES_GLIBC
|
||||
depends on BR2_TOOLCHAIN_HAS_SSP
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_13
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
|
||||
depends on BR2_HOST_GCC_AT_LEAST_5 # host-systemd
|
||||
select BR2_PACKAGE_HAS_UDEV
|
||||
select BR2_PACKAGE_DBUS if !BR2_PACKAGE_DBUS_BROKER # runtime
|
||||
select BR2_PACKAGE_LIBCAP
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBS
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBMOUNT
|
||||
select BR2_PACKAGE_UTIL_LINUX_AGETTY
|
||||
select BR2_PACKAGE_UTIL_LINUX_MOUNT
|
||||
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
|
||||
select BR2_NEEDS_HOST_UTF8_LOCALE
|
||||
select BR2_PACKAGE_HOST_SYSTEMD # for systemctl preset-all, during target-finalize
|
||||
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.13 with the following
|
||||
options enabled:
|
||||
|
||||
- CONFIG_DEVTMPFS
|
||||
- CONFIG_CGROUPS (it is OK to disable all controllers)
|
||||
- CONFIG_INOTIFY_USER
|
||||
- CONFIG_SIGNALFD
|
||||
- CONFIG_TIMERFD
|
||||
- CONFIG_EPOLL
|
||||
- CONFIG_UNIX (it requires CONFIG_NET, but every other flag in
|
||||
it is not necessary)
|
||||
- CONFIG_SYSFS
|
||||
- CONFIG_PROC_FS
|
||||
- CONFIG_FHANDLE (libudev, mount and bind mount handling)
|
||||
|
||||
- CONFIG_NET_NS (needed by PrivateNetwork=, used in some
|
||||
systemd units)
|
||||
|
||||
- CONFIG_AUTOFS_FS / 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_BOOT
|
||||
bool "systemd-boot"
|
||||
depends on BR2_i386 || BR2_x86_64
|
||||
select BR2_PACKAGE_GNU_EFI
|
||||
help
|
||||
systemd-boot is a simple UEFI boot manager which executes
|
||||
configured EFI images. The default entry is selected by a
|
||||
configured pattern (glob) or an on-screen menu.
|
||||
|
||||
systemd-boot operates on the EFI System Partition (ESP)
|
||||
only. Configuration file fragments, kernels, initrds, other
|
||||
EFI images need to reside on the ESP. Linux kernels need to
|
||||
be built with CONFIG_EFI_STUB to be able to be directly
|
||||
executed as an EFI image.
|
||||
|
||||
See the Grub2 help text for details on preparing an EFI
|
||||
capable disk image using systemd-boot: the instructions are
|
||||
exactly the same, except that the systemd-boot configuration
|
||||
files will be located in /loader/ inside the EFI partition.
|
||||
|
||||
https://www.freedesktop.org/wiki/Software/systemd/systemd-boot/
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_INITRD
|
||||
bool "Services for booting from initrd"
|
||||
help
|
||||
Install various services that are only useful if systemd is
|
||||
run from an initrd.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_KERNELINSTALL
|
||||
bool "install kernel-install and related files"
|
||||
help
|
||||
kernel-install is used to install and remove kernel and
|
||||
initramfs images to and from the boot loader partition.
|
||||
The boot loader partition will usually be one of
|
||||
/boot, /efi, or /boot/efi.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_ANALYZE
|
||||
bool "systemd-analyze"
|
||||
help
|
||||
systemd-analyze may be used to determine system boot-up
|
||||
performance statistics and retrieve other state and tracing
|
||||
information from the system and service manager, and to
|
||||
verify the correctness of unit files.
|
||||
It is also used to access special functions useful for
|
||||
advanced system manager debugging.
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH
|
||||
string
|
||||
default "ia32" if BR2_i386
|
||||
default "x64" if BR2_x86_64
|
||||
depends on BR2_PACKAGE_SYSTEMD_BOOT
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE
|
||||
bool "enable journal remote tools"
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_LIBMICROHTTPD
|
||||
help
|
||||
journal remote functionality adds three tools:
|
||||
|
||||
systemd-journal-gatewayd serves journal events over the
|
||||
network.
|
||||
|
||||
systemd-journal-remote is a command to receive serialized
|
||||
journal events and store them to journal files.
|
||||
|
||||
systemd-journal-upload will upload journal entries to the
|
||||
URL specified with --url=.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-journal-gatewayd.service.html
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-journal-remote.service.html
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-journal-upload.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_PSTORE
|
||||
bool "enable pstore support"
|
||||
default y
|
||||
help
|
||||
When this features is enabled, additional tools and services
|
||||
are built to support archiving contents of the persistent
|
||||
storage filesytem.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-pstore.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"
|
||||
select BR2_PACKAGE_SYSTEMD_INITRD
|
||||
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_HOMED
|
||||
bool "enable home daemon"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # cryptsetup -> lvm2
|
||||
depends on BR2_USE_MMU # cryptsetup -> lvm2
|
||||
depends on !BR2_STATIC_LIBS # cryptsetup -> lvm2
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # cryptsetup -> json-c
|
||||
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12 # fscrypt_key
|
||||
select BR2_PACKAGE_CRYPTSETUP
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
|
||||
help
|
||||
systemd-homed is a system service that may be used to create,
|
||||
remove, change or inspect home directories.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html
|
||||
|
||||
comment "homed support needs a toolchain w/ threads, dynamic library, kernel headers >= 4.12"
|
||||
depends on BR2_USE_MMU
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
BR2_STATIC_LIBS || !BR2_TOOLCHAIN_HEADERS_AT_LEAST_4_12
|
||||
|
||||
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_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_CATALOGDB
|
||||
bool "enable journal catalog database installation"
|
||||
depends on BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW # conflicting tmpfiles magic
|
||||
help
|
||||
Build and install the journal catalog database.
|
||||
|
||||
catalog files are used to provide extended and potentially
|
||||
localized messages for the journal.
|
||||
|
||||
The original catalog files will be built into a DB at
|
||||
/usr/share/factory/var/lib/systemd/catalog/database.
|
||||
|
||||
https://www.freedesktop.org/wiki/Software/systemd/catalog/
|
||||
|
||||
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_OOMD
|
||||
bool "enable out-of-memory killer"
|
||||
help
|
||||
systemd-oomd is a system service that uses cgroups-v2 and
|
||||
pressure stall information (PSI) to monitor and take action
|
||||
on processes before an OOM occurs in kernel space.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-oomd.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_POLKIT
|
||||
bool "enable polkit support"
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_7 # polkit -> c++17
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # polkit
|
||||
depends on BR2_USE_WCHAR # libglib2
|
||||
depends on !BR2_OPTIMIZE_FAST # polkit -> duktape
|
||||
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/
|
||||
|
||||
comment "polkit support needs a toolchain with threads, wchar, gcc >= 7"
|
||||
depends on !BR2_USE_WCHAR || !BR2_TOOLCHAIN_GCC_AT_LEAST_7 || \
|
||||
!BR2_TOOLCHAIN_HAS_THREADS
|
||||
|
||||
comment "polkit support can't be built with Optimize for fast"
|
||||
depends on BR2_OPTIMIZE_FAST
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_PORTABLED
|
||||
bool "enable portable services"
|
||||
help
|
||||
Portable services are systemd services that can be dynamically
|
||||
attached and detached from the system.
|
||||
|
||||
These services must come with their own root directory which
|
||||
they are bound to through an automatically generated drop-in.
|
||||
|
||||
They also have restrictions applied by the host system in the
|
||||
form of profiles.
|
||||
|
||||
This functionality is provided by the system service
|
||||
systemd-portabled along with the corresponding CLI
|
||||
portablectl.
|
||||
|
||||
https://systemd.io/PORTABLE_SERVICES/
|
||||
|
||||
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_REPART
|
||||
bool "enable repart support"
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
|
||||
select BR2_PACKAGE_UTIL_LINUX_LIBFDISK
|
||||
help
|
||||
systemd-repart grows and adds partitions to a partition table,
|
||||
based on the configuration files described in repart.d.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-repart.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_SYSEXT
|
||||
bool "enable sysext support"
|
||||
help
|
||||
systemd-sysext activates/deactivates system extension
|
||||
images.
|
||||
|
||||
System extension images may – dynamically at runtime —
|
||||
extend the /usr/ and /opt/ directory hierarchies with
|
||||
additional files.
|
||||
|
||||
This is particularly useful on immutable system images where
|
||||
a /usr/ and/or /opt/ hierarchy residing on a read-only file
|
||||
system shall be extended temporarily at runtime without
|
||||
making any persistent modifications.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-sysext.html
|
||||
|
||||
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_USERDB
|
||||
bool "enable userdb daemon"
|
||||
help
|
||||
systemd-userdbd is a system service that multiplexes
|
||||
user/group lookups to all local services that provide JSON
|
||||
user/group record definitions to the system. In addition it
|
||||
synthesizes JSON user/group records from classic UNIX/glibc
|
||||
NSS user/group records in order to provide full backwards
|
||||
compatibility.
|
||||
|
||||
https://www.freedesktop.org/software/systemd/man/systemd-userdbd.service.html
|
||||
|
||||
config BR2_PACKAGE_SYSTEMD_VCONSOLE
|
||||
bool "enable vconsole tool"
|
||||
default y
|
||||
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
package/systemd/Config.in.host
Normal file
4
package/systemd/Config.in.host
Normal file
@ -0,0 +1,4 @@
|
||||
# Select this if you need host systemd tools (e.g. systemctl)
|
||||
config BR2_PACKAGE_HOST_SYSTEMD
|
||||
bool
|
||||
depends on BR2_HOST_GCC_AT_LEAST_5
|
||||
3
package/systemd/boot-files/buildroot.conf
Normal file
3
package/systemd/boot-files/buildroot.conf
Normal file
@ -0,0 +1,3 @@
|
||||
title Buildroot
|
||||
linux /bzImage
|
||||
options root=/dev/sda2 rootwait console=tty1
|
||||
2
package/systemd/boot-files/loader.conf
Normal file
2
package/systemd/boot-files/loader.conf
Normal file
@ -0,0 +1,2 @@
|
||||
timeout 3
|
||||
default buildroot
|
||||
4
package/systemd/dhcp.network
Normal file
4
package/systemd/dhcp.network
Normal file
@ -0,0 +1,4 @@
|
||||
[Match]
|
||||
Name=SYSTEMD_NETWORKD_DHCP_IFACE
|
||||
[Network]
|
||||
DHCP=ipv4
|
||||
59
package/systemd/fakeroot_tmpfiles.sh
Executable file
59
package/systemd/fakeroot_tmpfiles.sh
Executable file
@ -0,0 +1,59 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# The systemd-tmpfiles has the ability to grab information
|
||||
# from the filesystem (instead from the running system).
|
||||
#
|
||||
# tmpfs directories (/tmp, /proc, ...) are skipped since they're not
|
||||
# relevant for the rootfs image.
|
||||
#
|
||||
# However there are a few specifiers that *always* will grab
|
||||
# information from the running system examples are %a, %b, %m, %H
|
||||
# (Architecture, Boot UUID, Machine UUID, Hostname).
|
||||
#
|
||||
# See [1] for historic information.
|
||||
#
|
||||
# This script will (conservatively) skip tmpfiles lines that have
|
||||
# such an specifier to prevent leaking host information.
|
||||
#
|
||||
# shell expansion is critical to be POSIX compliant,
|
||||
# this script wont work with zsh in its default mode for example.
|
||||
#
|
||||
# The script takes several measures to handle more complex stuff
|
||||
# like passing this correctly:
|
||||
# f+ "/var/example" - - - - %B\n%o\n%w\n%W%%\n
|
||||
#
|
||||
# [1] - https://github.com/systemd/systemd/pull/16187
|
||||
|
||||
[ -n "${HOST_SYSTEMD_TMPFILES-}" ] ||
|
||||
HOST_SYSTEMD_TMPFILES=systemd-tmpfiles
|
||||
|
||||
[ -n "${1-}" -a -d "${1-}"/usr/lib/tmpfiles.d ] ||
|
||||
{ echo 1>&2 "$0: need ROOTFS argument"; exit 1; }
|
||||
|
||||
${HOST_SYSTEMD_TMPFILES} --no-pager --cat-config --root="$1" |
|
||||
sed -e '/^[[:space:]]*#/d' -e 's,^[[:space:]]*,,' -e '/^$/d' |
|
||||
while read -r line; do
|
||||
# it is allowed to use quotes around arguments,
|
||||
# so let the shell pack the arguments
|
||||
eval "set -- $line"
|
||||
|
||||
# dont output warnings for directories we dont process
|
||||
[ "${2#/dev}" = "${2}" ] && [ "${2#/proc}" = "${2}" ] &&
|
||||
[ "${2#/run}" = "${2}" ] && [ "${2#/sys}" = "${2}" ] &&
|
||||
[ "${2#/tmp}" = "${2}" ] && [ "${2#/mnt}" = "${2}" ] ||
|
||||
continue
|
||||
|
||||
# blank out all specs that are ok to use,
|
||||
# test if some remain. (Specs up to date with v250)
|
||||
if echo "$2 ${7-}" | sed -e 's,%[%BCEgGhLMosStTuUVwW],,g' | grep -v -q '%'; then
|
||||
# no "bad" specifiers, pass the line unmodified
|
||||
eval "printf '%s\n' '$line'"
|
||||
else
|
||||
# warn
|
||||
eval "printf 'ignored spec: %s\n' '$line' 1>&2"
|
||||
fi
|
||||
done |
|
||||
TMPDIR= TEMP= TMP= ${HOST_SYSTEMD_TMPFILES} --create --boot --root="$1" \
|
||||
--exclude-prefix=/dev --exclude-prefix=/proc --exclude-prefix=/run \
|
||||
--exclude-prefix=/sys --exclude-prefix=/tmp --exclude-prefix=/mnt \
|
||||
-
|
||||
14
package/systemd/systemd.hash
Normal file
14
package/systemd/systemd.hash
Normal file
@ -0,0 +1,14 @@
|
||||
# sha256 locally computed
|
||||
sha256 d2bda9d225da11dc9ff48b48e59fc36798d3e66902ed400a9f78fa370c596864 systemd-250.4.tar.gz
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 LICENSE.GPL2
|
||||
sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 LICENSE.LGPL2.1
|
||||
sha256 e5a8645ad94aab24e312dd0c6be2aa54236eb9374480b1b14ea5c61598874fd5 LICENSES/BSD-2-Clause.txt
|
||||
sha256 83bb6bd9ccd2cf5230cb1807ed16258289768dc4d9cb80069a814e04415a1275 LICENSES/BSD-3-Clause.txt
|
||||
sha256 a2010f343487d3f7618affe54f789f5487602331c0a8d03f49e9a7c547cf0499 LICENSES/CC0-1.0.txt
|
||||
sha256 61778e80a2fd85955b626b29aa2bcf06144c714277bded65633e4a81479d9fb3 LICENSES/LGPL-2.0-or-later.txt
|
||||
sha256 5bcef4fedbfc08776630e65d5d0d074dd31208037eddb167ca46a9ec4f737764 LICENSES/Linux-syscall-note.txt
|
||||
sha256 790ac93fb2859097bdda4cf08b5a4feb5e479d0cb2c74f403248241bc3e7c216 LICENSES/lookup3-public-domain.txt
|
||||
sha256 b85dcd3e453d05982552c52b5fc9e0bdd6d23c6f8e844b984a88af32570b0cc0 LICENSES/MIT.txt
|
||||
sha256 2a98749f6bec00dfaed86fa9c1edea871aaae4f11ee4d100b671aaf4ce353a73 LICENSES/murmurhash2-public-domain.txt
|
||||
sha256 1a7adaa2c86cedfd6c7f5c0c7c72fd6d3e02cd0c9593f21fdb53c89bb2b130ec LICENSES/OFL-1.1.txt
|
||||
sha256 11801e931f252252a16eac8299465510d0a82c36bfd9ac8aea9b202b76d2f82b LICENSES/README.md
|
||||
879
package/systemd/systemd.mk
Normal file
879
package/systemd/systemd.mk
Normal file
@ -0,0 +1,879 @@
|
||||
################################################################################
|
||||
#
|
||||
# systemd
|
||||
#
|
||||
################################################################################
|
||||
|
||||
# When updating systemd, take care of the following:
|
||||
# - Check if the requirements have changed (see README), in particular
|
||||
# arch and headers
|
||||
# - If yes, propagate the dependencies to BR2_INIT_SYSTEMD
|
||||
# - If the required kernel options have changed, update the Config.in
|
||||
# help text and the list of KCONFIG_ENABLE_OPT.
|
||||
# - Check if there are new meson_options. Make sure all options are set
|
||||
# explicitly (usually to default value).
|
||||
# - If there are new services:
|
||||
# - create new options for them (if they really are optional);
|
||||
# - create a new _USER if necessary;
|
||||
# - create new directory (with _PERMISSIONS) if necessary.
|
||||
# - Diff sysusers.d with the previous version
|
||||
# - Diff factory/etc/nsswitch.conf with the previous version
|
||||
# (details are often sprinkled around in README and manpages)
|
||||
SYSTEMD_VERSION = 250.4
|
||||
SYSTEMD_SITE = $(call github,systemd,systemd-stable,v$(SYSTEMD_VERSION))
|
||||
SYSTEMD_LICENSE = \
|
||||
LGPL-2.1+, \
|
||||
GPL-2.0+ (udev), \
|
||||
Public Domain (few source files, see LICENSES/README.md), \
|
||||
BSD-2-Clause (eBPF instruction mini library), \
|
||||
BSD-3-Clause (tools/chromiumos), \
|
||||
CC0-1.0 (few source files, see LICENSES/README.md), \
|
||||
GPL-2.0 with Linux-syscall-note (linux kernel headers), \
|
||||
MIT (few source files, see LICENSES/README.md), \
|
||||
OFL-1.1 (Heebo fonts)
|
||||
SYSTEMD_LICENSE_FILES = \
|
||||
LICENSE.GPL2 \
|
||||
LICENSE.LGPL2.1 \
|
||||
LICENSES/BSD-2-Clause.txt \
|
||||
LICENSES/BSD-3-Clause.txt \
|
||||
LICENSES/CC0-1.0.txt \
|
||||
LICENSES/LGPL-2.0-or-later.txt \
|
||||
LICENSES/Linux-syscall-note.txt \
|
||||
LICENSES/lookup3-public-domain.txt \
|
||||
LICENSES/MIT.txt \
|
||||
LICENSES/murmurhash2-public-domain.txt \
|
||||
LICENSES/OFL-1.1.txt \
|
||||
LICENSES/README.md
|
||||
SYSTEMD_CPE_ID_VENDOR = systemd_project
|
||||
SYSTEMD_INSTALL_STAGING = YES
|
||||
SYSTEMD_DEPENDENCIES = \
|
||||
$(BR2_COREUTILS_HOST_DEPENDENCY) \
|
||||
$(if $(BR2_PACKAGE_BASH_COMPLETION),bash-completion) \
|
||||
host-gperf \
|
||||
host-python-jinja2 \
|
||||
kmod \
|
||||
libcap \
|
||||
util-linux-libs \
|
||||
$(TARGET_NLS_DEPENDENCIES)
|
||||
|
||||
SYSTEMD_SELINUX_MODULES = systemd udev xdg
|
||||
|
||||
SYSTEMD_PROVIDES = udev
|
||||
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
-Ddefault-hierarchy=unified \
|
||||
-Didn=true \
|
||||
-Dima=false \
|
||||
-Dkexec-path=/usr/sbin/kexec \
|
||||
-Dkmod-path=/usr/bin/kmod \
|
||||
-Dldconfig=false \
|
||||
-Dlink-boot-shared=true \
|
||||
-Dloadkeys-path=/usr/bin/loadkeys \
|
||||
-Dman=false \
|
||||
-Dmount-path=/usr/bin/mount \
|
||||
-Dmode=release \
|
||||
-Dnss-systemd=true \
|
||||
-Dquotacheck-path=/usr/sbin/quotacheck \
|
||||
-Dquotaon-path=/usr/sbin/quotaon \
|
||||
-Drootlibdir='/usr/lib' \
|
||||
-Dsetfont-path=/usr/bin/setfont \
|
||||
-Dsplit-bin=true \
|
||||
-Dsplit-usr=false \
|
||||
-Dsulogin-path=/usr/sbin/sulogin \
|
||||
-Dsystem-gid-max=999 \
|
||||
-Dsystem-uid-max=999 \
|
||||
-Dsysvinit-path= \
|
||||
-Dsysvrcnd-path= \
|
||||
-Dtelinit-path= \
|
||||
-Dtests=false \
|
||||
-Dtmpfiles=true \
|
||||
-Dumount-path=/usr/bin/umount \
|
||||
-Dutmp=false
|
||||
|
||||
ifeq ($(BR2_nios2),y)
|
||||
# Nios2 ld emits warnings, make warnings not to be treated as errors
|
||||
SYSTEMD_LDFLAGS = $(TARGET_LDFLAGS) -Wl,--no-fatal-warnings
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ACL),y)
|
||||
SYSTEMD_DEPENDENCIES += acl
|
||||
SYSTEMD_CONF_OPTS += -Dacl=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dacl=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LESS),y)
|
||||
SYSTEMD_CONF_OPTS += -Durlify=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Durlify=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBAPPARMOR),y)
|
||||
SYSTEMD_DEPENDENCIES += libapparmor
|
||||
SYSTEMD_CONF_OPTS += -Dapparmor=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dapparmor=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_AUDIT),y)
|
||||
SYSTEMD_DEPENDENCIES += audit
|
||||
SYSTEMD_CONF_OPTS += -Daudit=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Daudit=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_CRYPTSETUP),y)
|
||||
SYSTEMD_DEPENDENCIES += cryptsetup
|
||||
SYSTEMD_CONF_OPTS += -Dlibcryptsetup=true -Dlibcryptsetup-plugins=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlibcryptsetup=false -Dlibcryptsetup-plugins=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ELFUTILS),y)
|
||||
SYSTEMD_DEPENDENCIES += elfutils
|
||||
SYSTEMD_CONF_OPTS += -Delfutils=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Delfutils=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_IPTABLES),y)
|
||||
SYSTEMD_DEPENDENCIES += iptables
|
||||
SYSTEMD_CONF_OPTS += -Dlibiptc=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlibiptc=false
|
||||
endif
|
||||
|
||||
# Both options can't be selected at the same time so prefer libidn2
|
||||
ifeq ($(BR2_PACKAGE_LIBIDN2),y)
|
||||
SYSTEMD_DEPENDENCIES += libidn2
|
||||
SYSTEMD_CONF_OPTS += -Dlibidn2=true -Dlibidn=false
|
||||
else ifeq ($(BR2_PACKAGE_LIBIDN),y)
|
||||
SYSTEMD_DEPENDENCIES += libidn
|
||||
SYSTEMD_CONF_OPTS += -Dlibidn=true -Dlibidn2=false
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlibidn=false -Dlibidn2=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSECCOMP),y)
|
||||
SYSTEMD_DEPENDENCIES += libseccomp
|
||||
SYSTEMD_CONF_OPTS += -Dseccomp=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dseccomp=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBXKBCOMMON),y)
|
||||
SYSTEMD_DEPENDENCIES += libxkbcommon
|
||||
SYSTEMD_CONF_OPTS += -Dxkbcommon=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dxkbcommon=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_BZIP2),y)
|
||||
SYSTEMD_DEPENDENCIES += bzip2
|
||||
SYSTEMD_CONF_OPTS += -Dbzip2=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dbzip2=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZSTD),y)
|
||||
SYSTEMD_DEPENDENCIES += zstd
|
||||
SYSTEMD_CONF_OPTS += -Dzstd=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dzstd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LZ4),y)
|
||||
SYSTEMD_DEPENDENCIES += lz4
|
||||
SYSTEMD_CONF_OPTS += -Dlz4=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlz4=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
|
||||
SYSTEMD_DEPENDENCIES += linux-pam
|
||||
SYSTEMD_CONF_OPTS += -Dpam=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dpam=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBFDISK),y)
|
||||
SYSTEMD_CONF_OPTS += -Dfdisk=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dfdisk=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_VALGRIND),y)
|
||||
SYSTEMD_DEPENDENCIES += valgrind
|
||||
SYSTEMD_CONF_OPTS += -Dvalgrind=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dvalgrind=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XZ),y)
|
||||
SYSTEMD_DEPENDENCIES += xz
|
||||
SYSTEMD_CONF_OPTS += -Dxz=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dxz=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ZLIB),y)
|
||||
SYSTEMD_DEPENDENCIES += zlib
|
||||
SYSTEMD_CONF_OPTS += -Dzlib=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dzlib=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBCURL),y)
|
||||
SYSTEMD_DEPENDENCIES += libcurl
|
||||
SYSTEMD_CONF_OPTS += -Dlibcurl=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlibcurl=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBGCRYPT),y)
|
||||
SYSTEMD_DEPENDENCIES += libgcrypt
|
||||
SYSTEMD_CONF_OPTS += -Ddefault-dnssec=allow-downgrade -Dgcrypt=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Ddefault-dnssec=no -Dgcrypt=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_P11_KIT),y)
|
||||
SYSTEMD_DEPENDENCIES += p11-kit
|
||||
SYSTEMD_CONF_OPTS += -Dp11kit=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dp11kit=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PCRE2),y)
|
||||
SYSTEMD_DEPENDENCIES += pcre2
|
||||
SYSTEMD_CONF_OPTS += -Dpcre2=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dpcre2=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_LIBBLKID),y)
|
||||
SYSTEMD_CONF_OPTS += -Dblkid=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dblkid=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_UTIL_LINUX_NOLOGIN),y)
|
||||
SYSTEMD_CONF_OPTS += -Dnologin-path=/sbin/nologin
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dnologin-path=/bin/false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_INITRD),y)
|
||||
SYSTEMD_CONF_OPTS += -Dinitrd=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dinitrd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_KERNELINSTALL),y)
|
||||
SYSTEMD_CONF_OPTS += -Dkernel-install=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dkernel-install=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_ANALYZE),y)
|
||||
SYSTEMD_CONF_OPTS += -Danalyze=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Danalyze=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_REMOTE),y)
|
||||
# remote also depends on libcurl, this is already added above.
|
||||
SYSTEMD_DEPENDENCIES += libmicrohttpd
|
||||
SYSTEMD_CONF_OPTS += -Dremote=true -Dmicrohttpd=true
|
||||
SYSTEMD_REMOTE_USER = systemd-journal-remote -1 systemd-journal-remote -1 * - - - systemd Journal Remote
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dremote=false -Dmicrohttpd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBQRENCODE),y)
|
||||
SYSTEMD_DEPENDENCIES += libqrencode
|
||||
SYSTEMD_CONF_OPTS += -Dqrencode=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dqrencode=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBSELINUX),y)
|
||||
SYSTEMD_DEPENDENCIES += libselinux
|
||||
SYSTEMD_CONF_OPTS += -Dselinux=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dselinux=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB),y)
|
||||
SYSTEMD_CONF_OPTS += -Dhwdb=true
|
||||
define SYSTEMD_BUILD_HWDB
|
||||
$(HOST_DIR)/bin/systemd-hwdb update --root $(TARGET_DIR) --strict --usr
|
||||
endef
|
||||
SYSTEMD_TARGET_FINALIZE_HOOKS += SYSTEMD_BUILD_HWDB
|
||||
define SYSTEMD_RM_HWBD_UPDATE_SERVICE
|
||||
rm -rf $(TARGET_DIR)/usr/lib/systemd/system/systemd-hwdb-update.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/*/systemd-hwdb-update.service \
|
||||
$(TARGET_DIR)/usr/bin/systemd-hwdb
|
||||
endef
|
||||
SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_RM_HWBD_UPDATE_SERVICE
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dhwdb=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dbinfmt=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dbinfmt=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE),y)
|
||||
SYSTEMD_CONF_OPTS += -Dvconsole=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dvconsole=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK),y)
|
||||
SYSTEMD_CONF_OPTS += -Dquotacheck=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dquotacheck=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS),y)
|
||||
SYSTEMD_CONF_OPTS += -Dsysusers=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dsysusers=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dfirstboot=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dfirstboot=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED),y)
|
||||
SYSTEMD_CONF_OPTS += -Drandomseed=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Drandomseed=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dbacklight=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dbacklight=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL),y)
|
||||
SYSTEMD_CONF_OPTS += -Drfkill=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Drfkill=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND),y)
|
||||
SYSTEMD_CONF_OPTS += -Dlogind=true
|
||||
SYSTEMD_LOGIND_PERMISSIONS = /var/lib/systemd/linger d 755 0 0 - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlogind=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dmachined=true -Dnss-mymachines=true
|
||||
SYSTEMD_MACHINED_PERMISSIONS = /var/lib/machines d 700 0 0 - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dmachined=false -Dnss-mymachines=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD),y)
|
||||
SYSTEMD_CONF_OPTS += -Dimportd=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dimportd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HOMED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dhomed=true
|
||||
SYSTEMD_DEPENDENCIES += cryptsetup openssl
|
||||
SYSTEMD_HOMED_PERMISSIONS = /var/lib/systemd/home d 755 0 0 - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dhomed=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dhostnamed=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dhostnamed=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME),y)
|
||||
SYSTEMD_CONF_OPTS += -Dnss-myhostname=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dnss-myhostname=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dtimedated=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dtimedated=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dlocaled=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dlocaled=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_REPART),y)
|
||||
SYSTEMD_CONF_OPTS += -Drepart=true
|
||||
SYSTEMD_DEPENDENCIES += openssl
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Drepart=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_USERDB),y)
|
||||
SYSTEMD_CONF_OPTS += -Duserdb=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Duserdb=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP),y)
|
||||
SYSTEMD_CONF_OPTS += -Dcoredump=true
|
||||
SYSTEMD_COREDUMP_USER = systemd-coredump -1 systemd-coredump -1 * - - - systemd core dump processing
|
||||
SYSTEMD_COREDUMP_PERMISSIONS = /var/lib/systemd/coredump d 755 0 0 - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dcoredump=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_PSTORE),y)
|
||||
SYSTEMD_CONF_OPTS += -Dpstore=true
|
||||
SYSTEMD_PSTORE_PERMISSIONS = /var/lib/systemd/pstore d 755 0 0 - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dpstore=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_OOMD),y)
|
||||
SYSTEMD_CONF_OPTS += -Doomd=true
|
||||
SYSTEMD_OOMD_USER = systemd-oom -1 systemd-oom -1 * - - - systemd Userspace OOM Killer
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Doomd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dpolkit=true
|
||||
SYSTEMD_DEPENDENCIES += polkit
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dpolkit=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_PORTABLED),y)
|
||||
SYSTEMD_CONF_OPTS += -Dportabled=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dportabled=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_SYSEXT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dsysext=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dsysext=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD),y)
|
||||
SYSTEMD_CONF_OPTS += -Dnetworkd=true
|
||||
SYSTEMD_NETWORKD_USER = systemd-network -1 systemd-network -1 * - - - systemd Network Management
|
||||
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)/ \
|
||||
$(SYSTEMD_PKGDIR)/dhcp.network > \
|
||||
$(TARGET_DIR)/etc/systemd/network/$(SYSTEMD_NETWORKD_DHCP_IFACE).network
|
||||
endef
|
||||
endif
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dnetworkd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED),y)
|
||||
define SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
ln -sf ../run/systemd/resolve/resolv.conf \
|
||||
$(TARGET_DIR)/etc/resolv.conf
|
||||
endef
|
||||
SYSTEMD_CONF_OPTS += -Dnss-resolve=true -Dresolve=true
|
||||
SYSTEMD_RESOLVED_USER = systemd-resolve -1 systemd-resolve -1 * - - - systemd Resolver
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dnss-resolve=false -Dresolve=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBOPENSSL),y)
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
-Dgnutls=false \
|
||||
-Dopenssl=true \
|
||||
-Ddns-over-tls=openssl \
|
||||
-Ddefault-dns-over-tls=opportunistic
|
||||
SYSTEMD_DEPENDENCIES += openssl
|
||||
else ifeq ($(BR2_PACKAGE_GNUTLS),y)
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
-Dgnutls=true \
|
||||
-Dopenssl=false \
|
||||
-Ddns-over-tls=gnutls \
|
||||
-Ddefault-dns-over-tls=opportunistic
|
||||
SYSTEMD_DEPENDENCIES += gnutls
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
-Dgnutls=false \
|
||||
-Dopenssl=false \
|
||||
-Ddns-over-tls=false \
|
||||
-Ddefault-dns-over-tls=no
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD),y)
|
||||
SYSTEMD_CONF_OPTS += -Dtimesyncd=true
|
||||
SYSTEMD_TIMESYNCD_USER = systemd-timesync -1 systemd-timesync -1 * - - - systemd Time Synchronization
|
||||
SYSTEMD_TIMESYNCD_PERMISSIONS = /var/lib/systemd/timesync d 755 systemd-timesync systemd-timesync - - - - -
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dtimesyncd=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT),y)
|
||||
SYSTEMD_CONF_OPTS += -Dsmack=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dsmack=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE),y)
|
||||
SYSTEMD_CONF_OPTS += -Dhibernate=true
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Dhibernate=false
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_BOOT),y)
|
||||
SYSTEMD_INSTALL_IMAGES = YES
|
||||
SYSTEMD_DEPENDENCIES += gnu-efi
|
||||
SYSTEMD_CONF_OPTS += \
|
||||
-Defi=true \
|
||||
-Dgnu-efi=true \
|
||||
-Defi-cc=$(TARGET_CC) \
|
||||
-Defi-ld=bfd \
|
||||
-Defi-libdir=$(STAGING_DIR)/usr/lib \
|
||||
-Defi-includedir=$(STAGING_DIR)/usr/include/efi
|
||||
|
||||
SYSTEMD_BOOT_EFI_ARCH = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_BOOT_EFI_ARCH))
|
||||
define SYSTEMD_INSTALL_BOOT_FILES
|
||||
$(INSTALL) -D -m 0644 $(@D)/build/src/boot/efi/systemd-boot$(SYSTEMD_BOOT_EFI_ARCH).efi \
|
||||
$(BINARIES_DIR)/efi-part/EFI/BOOT/boot$(SYSTEMD_BOOT_EFI_ARCH).efi
|
||||
$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/loader.conf \
|
||||
$(BINARIES_DIR)/efi-part/loader/loader.conf
|
||||
$(INSTALL) -D -m 0644 $(SYSTEMD_PKGDIR)/boot-files/buildroot.conf \
|
||||
$(BINARIES_DIR)/efi-part/loader/entries/buildroot.conf
|
||||
endef
|
||||
|
||||
else
|
||||
SYSTEMD_CONF_OPTS += -Defi=false -Dgnu-efi=false
|
||||
endif # BR2_PACKAGE_SYSTEMD_BOOT == y
|
||||
|
||||
SYSTEMD_FALLBACK_HOSTNAME = $(call qstrip,$(BR2_TARGET_GENERIC_HOSTNAME))
|
||||
ifneq ($(SYSTEMD_FALLBACK_HOSTNAME),)
|
||||
SYSTEMD_CONF_OPTS += -Dfallback-hostname=$(SYSTEMD_FALLBACK_HOSTNAME)
|
||||
endif
|
||||
|
||||
SYSTEMD_DEFAULT_TARGET = $(call qstrip,$(BR2_PACKAGE_SYSTEMD_DEFAULT_TARGET))
|
||||
ifneq ($(SYSTEMD_DEFAULT_TARGET),)
|
||||
define SYSTEMD_INSTALL_INIT_HOOK
|
||||
ln -fs "$(SYSTEMD_DEFAULT_TARGET)" \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/default.target
|
||||
endef
|
||||
SYSTEMD_POST_INSTALL_TARGET_HOOKS += SYSTEMD_INSTALL_INIT_HOOK
|
||||
endif
|
||||
|
||||
define SYSTEMD_INSTALL_MACHINEID_HOOK
|
||||
touch $(TARGET_DIR)/etc/machine-id
|
||||
endef
|
||||
|
||||
SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
|
||||
SYSTEMD_INSTALL_MACHINEID_HOOK
|
||||
|
||||
define SYSTEMD_INSTALL_IMAGES_CMDS
|
||||
$(SYSTEMD_INSTALL_BOOT_FILES)
|
||||
endef
|
||||
|
||||
define SYSTEMD_PERMISSIONS
|
||||
/var/spool d 755 0 0 - - - - -
|
||||
/var/lib d 755 0 0 - - - - -
|
||||
/var/lib/private d 700 0 0 - - - - -
|
||||
/var/log/private d 700 0 0 - - - - -
|
||||
/var/cache/private d 700 0 0 - - - - -
|
||||
$(SYSTEMD_LOGIND_PERMISSIONS)
|
||||
$(SYSTEMD_MACHINED_PERMISSIONS)
|
||||
$(SYSTEMD_HOMED_PERMISSIONS)
|
||||
$(SYSTEMD_COREDUMP_PERMISSIONS)
|
||||
$(SYSTEMD_PSTORE_PERMISSIONS)
|
||||
$(SYSTEMD_TIMESYNCD_PERMISSIONS)
|
||||
endef
|
||||
|
||||
define SYSTEMD_USERS
|
||||
# udev user groups
|
||||
- - render -1 * - - - DRI rendering nodes
|
||||
- - sgx -1 * - - - SGX device nodes
|
||||
# systemd user groups
|
||||
- - systemd-journal -1 * - - - Journal
|
||||
$(SYSTEMD_REMOTE_USER)
|
||||
$(SYSTEMD_COREDUMP_USER)
|
||||
$(SYSTEMD_OOMD_USER)
|
||||
$(SYSTEMD_NETWORKD_USER)
|
||||
$(SYSTEMD_RESOLVED_USER)
|
||||
$(SYSTEMD_TIMESYNCD_USER)
|
||||
endef
|
||||
|
||||
define SYSTEMD_INSTALL_NSSCONFIG_HOOK
|
||||
$(SED) '/^passwd:/ {/systemd/! s/$$/ systemd/}' \
|
||||
-e '/^group:/ {/systemd/! s/$$/ [SUCCESS=merge] systemd/}' \
|
||||
-e '/^shadow:/ {/systemd/! s/$$/ systemd/}' \
|
||||
-e '/^gshadow:/ {/systemd/! s/$$/ systemd/}' \
|
||||
$(if $(BR2_PACKAGE_SYSTEMD_RESOLVED), \
|
||||
-e '/^hosts:/ s/[[:space:]]*mymachines//' \
|
||||
-e '/^hosts:/ {/resolve/! s/files/resolve [!UNAVAIL=return] files/}' ) \
|
||||
$(if $(BR2_PACKAGE_SYSTEMD_MYHOSTNAME), \
|
||||
-e '/^hosts:/ {/myhostname/! s/files/files myhostname/}' ) \
|
||||
$(if $(BR2_PACKAGE_SYSTEMD_MACHINED), \
|
||||
-e '/^hosts:/ {/mymachines/! s/^\(hosts:[[:space:]]*\)/\1mymachines /}' ) \
|
||||
$(TARGET_DIR)/etc/nsswitch.conf
|
||||
endef
|
||||
|
||||
SYSTEMD_TARGET_FINALIZE_HOOKS += \
|
||||
SYSTEMD_INSTALL_NSSCONFIG_HOOK \
|
||||
SYSTEMD_INSTALL_RESOLVCONF_HOOK
|
||||
|
||||
ifneq ($(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)),)
|
||||
# systemd provides multiple units to autospawn getty as neede
|
||||
# * getty@.service to start a getty on normal TTY
|
||||
# * sertial-getty@.service to start a getty on serial lines
|
||||
# * console-getty.service for generic /dev/console
|
||||
# * container-getty@.service for a getty on /dev/pts/*
|
||||
#
|
||||
# the generator systemd-getty-generator will
|
||||
# * read the console= kernel command line parameter
|
||||
# * enable one of the above units depending on what it finds
|
||||
#
|
||||
# Systemd defaults to enablinb getty@tty1.service
|
||||
#
|
||||
# What we want to do
|
||||
# * Enable a getty on $BR2_TARGET_GENERIC_TTY_PATH
|
||||
# * Set the baudrate for all units according to BR2_TARGET_GENERIC_GETTY_BAUDRATE
|
||||
# * Always enable a getty on the console using systemd-getty-generator
|
||||
# (backward compatibility with previous releases of buildroot)
|
||||
#
|
||||
# What we do
|
||||
# * disable getty@tty1 (enabled by upstream systemd)
|
||||
# * enable getty@xxx if $BR2_TARGET_GENERIC_TTY_PATH is a tty
|
||||
# * enable serial-getty@xxx for other $BR2_TARGET_GENERIC_TTY_PATH
|
||||
# * rewrite baudrates if a baudrate is provided
|
||||
define SYSTEMD_INSTALL_SERVICE_TTY
|
||||
mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d; \
|
||||
printf '[Install]\nDefaultInstance=\n' \
|
||||
>$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \
|
||||
if [ $(BR2_TARGET_GENERIC_GETTY_PORT) = "console" ]; \
|
||||
then \
|
||||
: ; \
|
||||
elif echo $(BR2_TARGET_GENERIC_GETTY_PORT) | egrep -q 'tty[0-9]*$$'; \
|
||||
then \
|
||||
printf '[Install]\nDefaultInstance=%s\n' \
|
||||
$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \
|
||||
>$(TARGET_DIR)/usr/lib/systemd/system/getty@.service.d/buildroot-console.conf; \
|
||||
else \
|
||||
mkdir -p $(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d;\
|
||||
printf '[Install]\nDefaultInstance=%s\n' \
|
||||
$(call qstrip,$(BR2_TARGET_GENERIC_GETTY_PORT)) \
|
||||
>$(TARGET_DIR)/usr/lib/systemd/system/serial-getty@.service.d/buildroot-console.conf;\
|
||||
fi; \
|
||||
if [ $(call qstrip,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE)) -gt 0 ] ; \
|
||||
then \
|
||||
$(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/getty@.service; \
|
||||
$(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/serial-getty@.service; \
|
||||
$(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/console-getty@.service; \
|
||||
$(SED) 's/115200/$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),115200/' $(TARGET_DIR)/lib/systemd/system/container-getty@.service; \
|
||||
fi
|
||||
endef
|
||||
endif
|
||||
|
||||
define SYSTEMD_INSTALL_PRESET
|
||||
$(INSTALL) -D -m 644 $(SYSTEMD_PKGDIR)/80-buildroot.preset $(TARGET_DIR)/usr/lib/systemd/system-preset/80-buildroot.preset
|
||||
endef
|
||||
|
||||
define SYSTEMD_INSTALL_INIT_SYSTEMD
|
||||
$(SYSTEMD_INSTALL_PRESET)
|
||||
$(SYSTEMD_INSTALL_SERVICE_TTY)
|
||||
$(SYSTEMD_INSTALL_NETWORK_CONFS)
|
||||
endef
|
||||
|
||||
ifeq ($(BR2_ENABLE_LOCALE_PURGE),y)
|
||||
# Go through all files with scheme <basename>.<langext>.catalog
|
||||
# and remove those where <langext> is not in LOCALE_NOPURGE
|
||||
define SYSTEMD_LOCALE_PURGE_CATALOGS
|
||||
for cfile in `find $(TARGET_DIR)/usr/lib/systemd/catalog -name '*.*.catalog'`; \
|
||||
do \
|
||||
basename=$${cfile##*/}; \
|
||||
basename=$${basename%.catalog}; \
|
||||
langext=$${basename#*.}; \
|
||||
[ "$$langext" = "$${basename}" ] && continue; \
|
||||
expr '$(LOCALE_NOPURGE)' : ".*\b$${langext}\b" >/dev/null && continue; \
|
||||
rm -f "$$cfile"; \
|
||||
done
|
||||
endef
|
||||
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_LOCALE_PURGE_CATALOGS
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SYSTEMD_CATALOGDB),y)
|
||||
define SYSTEMD_UPDATE_CATALOGS
|
||||
$(HOST_DIR)/bin/journalctl --root=$(TARGET_DIR) --update-catalog
|
||||
install -D $(TARGET_DIR)/var/lib/systemd/catalog/database \
|
||||
$(TARGET_DIR)/usr/share/factory/var/lib/systemd/catalog/database
|
||||
rm $(TARGET_DIR)/var/lib/systemd/catalog/database
|
||||
ln -sf /usr/share/factory/var/lib/systemd/catalog/database \
|
||||
$(TARGET_DIR)/var/lib/systemd/catalog/database
|
||||
grep -q '^L /var/lib/systemd/catalog/database' $(TARGET_DIR)/usr/lib/tmpfiles.d/var.conf || \
|
||||
printf "\nL /var/lib/systemd/catalog/database\n" >> $(TARGET_DIR)/usr/lib/tmpfiles.d/var.conf
|
||||
endef
|
||||
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_UPDATE_CATALOGS
|
||||
endif
|
||||
|
||||
define SYSTEMD_RM_CATALOG_UPDATE_SERVICE
|
||||
rm -rf $(TARGET_DIR)/usr/lib/systemd/catalog \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/systemd-journal-catalog-update.service \
|
||||
$(TARGET_DIR)/usr/lib/systemd/system/*/systemd-journal-catalog-update.service
|
||||
endef
|
||||
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_RM_CATALOG_UPDATE_SERVICE
|
||||
|
||||
define SYSTEMD_CREATE_TMPFILES_HOOK
|
||||
HOST_SYSTEMD_TMPFILES=$(HOST_DIR)/bin/systemd-tmpfiles \
|
||||
$(SYSTEMD_PKGDIR)/fakeroot_tmpfiles.sh $(TARGET_DIR)
|
||||
endef
|
||||
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_CREATE_TMPFILES_HOOK
|
||||
|
||||
define SYSTEMD_PRESET_ALL
|
||||
$(HOST_DIR)/bin/systemctl --root=$(TARGET_DIR) preset-all
|
||||
endef
|
||||
SYSTEMD_ROOTFS_PRE_CMD_HOOKS += SYSTEMD_PRESET_ALL
|
||||
|
||||
SYSTEMD_CONF_ENV = $(HOST_UTF8_LOCALE_ENV)
|
||||
SYSTEMD_NINJA_ENV = $(HOST_UTF8_LOCALE_ENV)
|
||||
|
||||
define SYSTEMD_LINUX_CONFIG_FIXUPS
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_DEVTMPFS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_CGROUPS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_INOTIFY_USER)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SIGNALFD)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_TIMERFD)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_EPOLL)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_UNIX)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_SYSFS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_PROC_FS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_FHANDLE)
|
||||
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_NET_NS)
|
||||
|
||||
$(call KCONFIG_DISABLE_OPT,CONFIG_SYSFS_DEPRECATED)
|
||||
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS_FS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_AUTOFS4_FS)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_POSIX_ACL)
|
||||
$(call KCONFIG_ENABLE_OPT,CONFIG_TMPFS_XATTR)
|
||||
endef
|
||||
|
||||
# We need a very minimal host variant, so we disable as much as possible.
|
||||
HOST_SYSTEMD_CONF_OPTS = \
|
||||
-Dsplit-bin=true \
|
||||
-Dsplit-usr=false \
|
||||
--prefix=/usr \
|
||||
--libdir=lib \
|
||||
--sysconfdir=/etc \
|
||||
--localstatedir=/var \
|
||||
-Dmode=release \
|
||||
-Dutmp=false \
|
||||
-Dhibernate=false \
|
||||
-Dldconfig=false \
|
||||
-Dresolve=false \
|
||||
-Defi=false \
|
||||
-Dtpm=false \
|
||||
-Denvironment-d=false \
|
||||
-Dbinfmt=false \
|
||||
-Drepart=false \
|
||||
-Dcoredump=false \
|
||||
-Dpstore=false \
|
||||
-Doomd=false \
|
||||
-Dlogind=false \
|
||||
-Dhostnamed=false \
|
||||
-Dlocaled=false \
|
||||
-Dmachined=false \
|
||||
-Dportabled=false \
|
||||
-Dsysext=false \
|
||||
-Duserdb=false \
|
||||
-Dhomed=false \
|
||||
-Dnetworkd=false \
|
||||
-Dtimedated=false \
|
||||
-Dtimesyncd=false \
|
||||
-Dremote=false \
|
||||
-Dcreate-log-dirs=false \
|
||||
-Dnss-myhostname=false \
|
||||
-Dnss-mymachines=false \
|
||||
-Dnss-resolve=false \
|
||||
-Dnss-systemd=false \
|
||||
-Dfirstboot=false \
|
||||
-Drandomseed=false \
|
||||
-Dbacklight=false \
|
||||
-Dvconsole=false \
|
||||
-Dquotacheck=false \
|
||||
-Dsysusers=false \
|
||||
-Dtmpfiles=true \
|
||||
-Dimportd=false \
|
||||
-Dhwdb=true \
|
||||
-Drfkill=false \
|
||||
-Dman=false \
|
||||
-Dhtml=false \
|
||||
-Dsmack=false \
|
||||
-Dpolkit=false \
|
||||
-Dblkid=false \
|
||||
-Didn=false \
|
||||
-Dadm-group=false \
|
||||
-Dwheel-group=false \
|
||||
-Dzlib=false \
|
||||
-Dgshadow=false \
|
||||
-Dima=false \
|
||||
-Dtests=false \
|
||||
-Dglib=false \
|
||||
-Dacl=false \
|
||||
-Dsysvinit-path='' \
|
||||
-Dinitrd=false \
|
||||
-Dxdg-autostart=false \
|
||||
-Dkernel-install=false \
|
||||
-Danalyze=false \
|
||||
-Dlibcryptsetup=false \
|
||||
-Daudit=false \
|
||||
-Dzstd=false
|
||||
|
||||
HOST_SYSTEMD_DEPENDENCIES = \
|
||||
$(BR2_COREUTILS_HOST_DEPENDENCY) \
|
||||
host-util-linux \
|
||||
host-patchelf \
|
||||
host-libcap \
|
||||
host-gperf \
|
||||
host-python-jinja2
|
||||
|
||||
HOST_SYSTEMD_NINJA_ENV = DESTDIR=$(HOST_DIR)
|
||||
|
||||
# Fix RPATH After installation
|
||||
# * systemd provides a install_rpath instruction to meson because the binaries
|
||||
# need to link with libsystemd which is not in a standard path
|
||||
# * meson can only replace the RPATH, not append to it
|
||||
# * the original rpath is thus lost.
|
||||
# * the original path had been tweaked by buildroot via LDFLAGS to add
|
||||
# $(HOST_DIR)/lib
|
||||
# * thus re-tweak rpath after the installation for all binaries that need it
|
||||
HOST_SYSTEMD_HOST_TOOLS = busctl journalctl systemctl systemd-* udevadm
|
||||
|
||||
define HOST_SYSTEMD_FIX_RPATH
|
||||
for f in $(addprefix $(HOST_DIR)/bin/,$(HOST_SYSTEMD_HOST_TOOLS)); do \
|
||||
[ -e $$f ] || continue; \
|
||||
$(HOST_DIR)/bin/patchelf --set-rpath $(HOST_DIR)/lib:$(HOST_DIR)/lib/systemd $${f} \
|
||||
|| exit 1; \
|
||||
done
|
||||
endef
|
||||
HOST_SYSTEMD_POST_INSTALL_HOOKS += HOST_SYSTEMD_FIX_RPATH
|
||||
|
||||
$(eval $(meson-package))
|
||||
$(eval $(host-meson-package))
|
||||
Reference in New Issue
Block a user