1 ################################################################################
5 ################################################################################
8 SYSTEMD_SITE
= $(call github
,systemd
,systemd
,v
$(SYSTEMD_VERSION
))
9 SYSTEMD_LICENSE
= LGPLv2.1
+, GPLv2
+ (udev
), Public Domain
(few source files
, see README
)
10 SYSTEMD_LICENSE_FILES
= LICENSE.GPL2 LICENSE.LGPL2.1 README
11 SYSTEMD_INSTALL_STAGING
= YES
12 SYSTEMD_DEPENDENCIES
= \
19 SYSTEMD_PROVIDES
= udev
20 SYSTEMD_AUTORECONF
= YES
22 # Make sure that systemd will always be built after busybox so that we have
23 # a consistent init setup between two builds
24 ifeq ($(BR2_PACKAGE_BUSYBOX
),y
)
25 SYSTEMD_DEPENDENCIES
+= busybox
28 SYSTEMD_CONF_OPTS
+= \
34 --disable-libcryptsetup \
40 --with-default-dnssec
=no \
43 SYSTEMD_CFLAGS
= $(TARGET_CFLAGS
) -fno-lto
45 # Override path to kmod, used in kmod-static-nodes.service
47 CFLAGS
="$(SYSTEMD_CFLAGS)" \
48 ac_cv_path_KMOD
=/usr
/bin
/kmod
50 define SYSTEMD_RUN_INTLTOOLIZE
51 cd
$(@D
) && $(HOST_DIR
)/usr
/bin
/intltoolize
--force --automake
53 SYSTEMD_PRE_CONFIGURE_HOOKS
+= SYSTEMD_RUN_INTLTOOLIZE
55 ifeq ($(BR2_PACKAGE_ACL
),y
)
56 SYSTEMD_CONF_OPTS
+= --enable-acl
57 SYSTEMD_DEPENDENCIES
+= acl
59 SYSTEMD_CONF_OPTS
+= --disable-acl
62 ifeq ($(BR2_PACKAGE_AUDIT
),y
)
63 SYSTEMD_CONF_OPTS
+= --enable-audit
64 SYSTEMD_DEPENDENCIES
+= audit
66 SYSTEMD_CONF_OPTS
+= --disable-audit
69 ifeq ($(BR2_PACKAGE_LIBIDN
),y
)
70 SYSTEMD_CONF_OPTS
+= --enable-libidn
71 SYSTEMD_DEPENDENCIES
+= libidn
73 SYSTEMD_CONF_OPTS
+= --disable-libidn
76 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
77 SYSTEMD_CONF_OPTS
+= --enable-seccomp
78 SYSTEMD_DEPENDENCIES
+= libseccomp
80 SYSTEMD_CONF_OPTS
+= --disable-seccomp
83 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON
),y
)
84 SYSTEMD_CONF_OPTS
+= --enable-xkbcommon
85 SYSTEMD_DEPENDENCIES
+= libxkbcommon
87 SYSTEMD_CONF_OPTS
+= --disable-xkbcommon
90 ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS
),y
)
91 SYSTEMD_CONF_OPTS
+= --enable-kdbus
93 SYSTEMD_CONF_OPTS
+= --disable-kdbus
96 ifeq ($(BR2_PACKAGE_BZIP2
),y
)
97 SYSTEMD_DEPENDENCIES
+= bzip2
98 SYSTEMD_CONF_OPTS
+= --enable-bzip2
100 SYSTEMD_CONF_OPTS
+= --disable-bzip2
103 ifeq ($(BR2_PACKAGE_LZ4
),y
)
104 SYSTEMD_DEPENDENCIES
+= lz4
105 SYSTEMD_CONF_OPTS
+= --enable-lz4
107 SYSTEMD_CONF_OPTS
+= --disable-lz4
110 ifeq ($(BR2_PACKAGE_LINUX_PAM
),y
)
111 SYSTEMD_DEPENDENCIES
+= linux-pam
112 SYSTEMD_CONF_OPTS
+= --enable-pam
114 SYSTEMD_CONF_OPTS
+= --disable-pam
117 ifeq ($(BR2_PACKAGE_XZ
),y
)
118 SYSTEMD_DEPENDENCIES
+= xz
119 SYSTEMD_CONF_OPTS
+= --enable-xz
121 SYSTEMD_CONF_OPTS
+= --disable-xz
124 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
125 SYSTEMD_DEPENDENCIES
+= zlib
126 SYSTEMD_CONF_OPTS
+= --enable-zlib
128 SYSTEMD_CONF_OPTS
+= --disable-zlib
131 ifeq ($(BR2_PACKAGE_LIBCURL
),y
)
132 SYSTEMD_DEPENDENCIES
+= libcurl
133 SYSTEMD_CONF_OPTS
+= --enable-libcurl
135 SYSTEMD_CONF_OPTS
+= --disable-libcurl
138 ifeq ($(BR2_PACKAGE_LIBGCRYPT
),y
)
139 SYSTEMD_DEPENDENCIES
+= libgcrypt
140 SYSTEMD_CONF_OPTS
+= \
142 --with-libgcrypt-prefix
=$(STAGING_DIR
)/usr \
143 --with-libgpg-error-prefix
=$(STAGING_DIR
)/usr
145 SYSTEMD_CONF_OPTS
+= --disable-gcrypt
148 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
),y
)
149 SYSTEMD_DEPENDENCIES
+= libmicrohttpd
150 SYSTEMD_CONF_OPTS
+= --enable-microhttpd
151 ifeq ($(BR2_PACKAGE_LIBQRENCODE
),y
)
152 SYSTEMD_CONF_OPTS
+= --enable-qrencode
153 SYSTEMD_DEPENDENCIES
+= libqrencode
155 SYSTEMD_CONF_OPTS
+= --disable-qrencode
158 SYSTEMD_CONF_OPTS
+= --disable-microhttpd
--disable-qrencode
161 ifeq ($(BR2_PACKAGE_LIBSELINUX
),y
)
162 SYSTEMD_DEPENDENCIES
+= libselinux
163 SYSTEMD_CONF_OPTS
+= --enable-selinux
165 SYSTEMD_CONF_OPTS
+= --disable-selinux
168 ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB
),y
)
169 SYSTEMD_CONF_OPTS
+= --enable-hwdb
171 SYSTEMD_CONF_OPTS
+= --disable-hwdb
174 ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT
),y
)
175 SYSTEMD_CONF_OPTS
+= --enable-binfmt
177 SYSTEMD_CONF_OPTS
+= --disable-binfmt
180 ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE
),y
)
181 SYSTEMD_CONF_OPTS
+= --enable-vconsole
183 SYSTEMD_CONF_OPTS
+= --disable-vconsole
186 ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK
),y
)
187 SYSTEMD_CONF_OPTS
+= --enable-quotacheck
189 SYSTEMD_CONF_OPTS
+= --disable-quotacheck
192 ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES
),y
)
193 SYSTEMD_CONF_OPTS
+= --enable-tmpfiles
195 SYSTEMD_CONF_OPTS
+= --disable-tmpfiles
198 ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS
),y
)
199 SYSTEMD_CONF_OPTS
+= --enable-sysusers
201 SYSTEMD_CONF_OPTS
+= --disable-sysusers
204 ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT
),y
)
205 SYSTEMD_CONF_OPTS
+= --enable-firstboot
207 SYSTEMD_CONF_OPTS
+= --disable-firstboot
210 ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED
),y
)
211 SYSTEMD_CONF_OPTS
+= --enable-randomseed
213 SYSTEMD_CONF_OPTS
+= --disable-randomseed
216 ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT
),y
)
217 SYSTEMD_CONF_OPTS
+= --enable-backlight
219 SYSTEMD_CONF_OPTS
+= --disable-backlight
222 ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL
),y
)
223 SYSTEMD_CONF_OPTS
+= --enable-rfkill
225 SYSTEMD_CONF_OPTS
+= --disable-rfkill
228 ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND
),y
)
229 SYSTEMD_CONF_OPTS
+= --enable-logind
231 SYSTEMD_CONF_OPTS
+= --disable-logind
234 ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED
),y
)
235 SYSTEMD_CONF_OPTS
+= --enable-machined
237 SYSTEMD_CONF_OPTS
+= --disable-machined
240 ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD
),y
)
241 SYSTEMD_CONF_OPTS
+= --enable-importd
243 SYSTEMD_CONF_OPTS
+= --disable-importd
246 ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED
),y
)
247 SYSTEMD_CONF_OPTS
+= --enable-hostnamed
249 SYSTEMD_CONF_OPTS
+= --disable-hostnamed
252 ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME
),y
)
253 SYSTEMD_CONF_OPTS
+= --enable-myhostname
255 SYSTEMD_CONF_OPTS
+= --disable-myhostname
258 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED
),y
)
259 SYSTEMD_CONF_OPTS
+= --enable-timedated
261 SYSTEMD_CONF_OPTS
+= --disable-timedated
264 ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED
),y
)
265 SYSTEMD_CONF_OPTS
+= --enable-localed
267 SYSTEMD_CONF_OPTS
+= --disable-localed
270 ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP
),y
)
271 SYSTEMD_CONF_OPTS
+= --enable-coredump
272 SYSTEMD_COREDUMP_USER
= systemd-coredump
-1 systemd-coredump
-1 * /var
/lib
/systemd
/coredump
- - Core Dumper
274 SYSTEMD_CONF_OPTS
+= --disable-coredump
277 ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT
),y
)
278 SYSTEMD_CONF_OPTS
+= --enable-polkit
280 SYSTEMD_CONF_OPTS
+= --disable-polkit
283 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD
),y
)
284 SYSTEMD_CONF_OPTS
+= --enable-networkd
285 SYSTEMD_NETWORKD_USER
= systemd-network
-1 systemd-network
-1 * - - - Network Manager
286 define SYSTEMD_INSTALL_RESOLVCONF_HOOK
287 ln
-sf ..
/run
/systemd
/resolve
/resolv.conf \
288 $(TARGET_DIR
)/etc
/resolv.conf
290 SYSTEMD_NETWORKD_DHCP_IFACE
= $(call qstrip
,$(BR2_SYSTEM_DHCP
))
291 ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE
),)
292 define SYSTEMD_INSTALL_NETWORK_CONFS
293 sed s
/SYSTEMD_NETWORKD_DHCP_IFACE
/$(SYSTEMD_NETWORKD_DHCP_IFACE
)/ \
294 package
/systemd
/dhcp.network
> \
295 $(TARGET_DIR
)/etc
/systemd
/network
/dhcp.network
299 SYSTEMD_CONF_OPTS
+= --disable-networkd
300 define SYSTEMD_INSTALL_SERVICE_NETWORK
301 $(INSTALL
) -D
-m
644 package
/systemd
/network.service \
302 $(TARGET_DIR
)/etc
/systemd
/system
/network.service
303 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
304 ln
-fs ..
/network.service \
305 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/network.service
309 ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED
),y
)
310 SYSTEMD_CONF_OPTS
+= --enable-resolved
311 SYSTEMD_RESOLVED_USER
= systemd-resolve
-1 systemd-resolve
-1 * - - - Network Name Resolution Manager
313 SYSTEMD_CONF_OPTS
+= --disable-resolved
316 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD
),y
)
317 SYSTEMD_CONF_OPTS
+= --enable-timesyncd
318 SYSTEMD_TIMESYNCD_USER
= systemd-timesync
-1 systemd-timesync
-1 * - - - Network Time Synchronization
319 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
320 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
321 ln
-sf ..
/..
/..
/..
/lib
/systemd
/system
/systemd-timesyncd.service \
322 $(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
/systemd-timesyncd.service
325 SYSTEMD_CONF_OPTS
+= --disable-timesyncd
328 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
),y
)
329 SYSTEMD_CONF_OPTS
+= --enable-smack
331 SYSTEMD_CONF_OPTS
+= --disable-smack
334 ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE
),y
)
335 SYSTEMD_CONF_OPTS
+= --enable-hibernate
337 SYSTEMD_CONF_OPTS
+= --disable-hibernate
340 define SYSTEMD_INSTALL_INIT_HOOK
341 ln
-fs ..
/lib
/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
342 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
343 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
344 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
346 ln
-fs ..
/..
/..
/lib
/systemd
/system
/multi-user.target \
347 $(TARGET_DIR
)/etc
/systemd
/system
/default.target
350 define SYSTEMD_INSTALL_MACHINEID_HOOK
351 touch
$(TARGET_DIR
)/etc
/machine-id
354 SYSTEMD_POST_INSTALL_TARGET_HOOKS
+= \
355 SYSTEMD_INSTALL_INIT_HOOK \
356 SYSTEMD_INSTALL_MACHINEID_HOOK \
357 SYSTEMD_INSTALL_RESOLVCONF_HOOK
360 - - input
-1 * - - - Input device group
361 - - systemd-journal
-1 * - - - Journal
362 systemd-bus-proxy
-1 systemd-bus-proxy
-1 * - - - Proxy D-Bus messages to
/from a bus
363 systemd-journal-gateway
-1 systemd-journal-gateway
-1 * /var
/log
/journal
- - Journal Gateway
364 systemd-journal-remote
-1 systemd-journal-remote
-1 * /var
/log
/journal
/remote
- - Journal Remote
365 systemd-journal-upload
-1 systemd-journal-upload
-1 * - - - Journal Upload
366 $(SYSTEMD_COREDUMP_USER
)
367 $(SYSTEMD_NETWORKD_USER
)
368 $(SYSTEMD_RESOLVED_USER
)
369 $(SYSTEMD_TIMESYNCD_USER
)
372 define SYSTEMD_DISABLE_SERVICE_TTY1
373 rm -f
$(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/getty@tty1.service
376 ifneq ($(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_PORT
)),)
377 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
378 # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
379 define SYSTEMD_INSTALL_SERVICE_TTY
380 if echo
$(BR2_TARGET_GENERIC_GETTY_PORT
) | egrep
-q
'tty[0-9]*$$'; \
384 SERVICE
="serial-getty"; \
386 ln
-fs ..
/..
/..
/..
/lib
/systemd
/system
/$${SERVICE}@.service \
387 $(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/$${SERVICE}@
$(BR2_TARGET_GENERIC_GETTY_PORT
).service
; \
388 if
[ $(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE
)) -gt
0 ] ; \
390 $(SED
) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR
)/lib
/systemd
/system
/$${SERVICE}@.service
; \
395 define SYSTEMD_INSTALL_INIT_SYSTEMD
396 $(SYSTEMD_DISABLE_SERVICE_TTY1
)
397 $(SYSTEMD_INSTALL_SERVICE_TTY
)
398 $(SYSTEMD_INSTALL_SERVICE_NETWORK
)
399 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC
)
400 $(SYSTEMD_INSTALL_NETWORK_CONFS
)
403 $(eval
$(autotools-package
))