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
+= \
35 --disable-libcryptsetup \
41 --with-default-dnssec
=no \
44 SYSTEMD_CFLAGS
= $(TARGET_CFLAGS
) -fno-lto
46 # Override path to kmod, used in kmod-static-nodes.service
48 CFLAGS
="$(SYSTEMD_CFLAGS)" \
49 ac_cv_path_KMOD
=/usr
/bin
/kmod
51 define SYSTEMD_RUN_INTLTOOLIZE
52 cd
$(@D
) && $(HOST_DIR
)/usr
/bin
/intltoolize
--force --automake
54 SYSTEMD_PRE_CONFIGURE_HOOKS
+= SYSTEMD_RUN_INTLTOOLIZE
56 ifeq ($(BR2_PACKAGE_ACL
),y
)
57 SYSTEMD_CONF_OPTS
+= --enable-acl
58 SYSTEMD_DEPENDENCIES
+= acl
60 SYSTEMD_CONF_OPTS
+= --disable-acl
63 ifeq ($(BR2_PACKAGE_AUDIT
),y
)
64 SYSTEMD_CONF_OPTS
+= --enable-audit
65 SYSTEMD_DEPENDENCIES
+= audit
67 SYSTEMD_CONF_OPTS
+= --disable-audit
70 ifeq ($(BR2_PACKAGE_LIBIDN
),y
)
71 SYSTEMD_CONF_OPTS
+= --enable-libidn
72 SYSTEMD_DEPENDENCIES
+= libidn
74 SYSTEMD_CONF_OPTS
+= --disable-libidn
77 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
78 SYSTEMD_CONF_OPTS
+= --enable-seccomp
79 SYSTEMD_DEPENDENCIES
+= libseccomp
81 SYSTEMD_CONF_OPTS
+= --disable-seccomp
84 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON
),y
)
85 SYSTEMD_CONF_OPTS
+= --enable-xkbcommon
86 SYSTEMD_DEPENDENCIES
+= libxkbcommon
88 SYSTEMD_CONF_OPTS
+= --disable-xkbcommon
91 ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS
),y
)
92 SYSTEMD_CONF_OPTS
+= --enable-kdbus
94 SYSTEMD_CONF_OPTS
+= --disable-kdbus
97 ifeq ($(BR2_PACKAGE_BZIP2
),y
)
98 SYSTEMD_DEPENDENCIES
+= bzip2
99 SYSTEMD_CONF_OPTS
+= --enable-bzip2
101 SYSTEMD_CONF_OPTS
+= --disable-bzip2
104 ifeq ($(BR2_PACKAGE_LZ4
),y
)
105 SYSTEMD_DEPENDENCIES
+= lz4
106 SYSTEMD_CONF_OPTS
+= --enable-lz4
108 SYSTEMD_CONF_OPTS
+= --disable-lz4
111 ifeq ($(BR2_PACKAGE_XZ
),y
)
112 SYSTEMD_DEPENDENCIES
+= xz
113 SYSTEMD_CONF_OPTS
+= --enable-xz
115 SYSTEMD_CONF_OPTS
+= --disable-xz
118 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
119 SYSTEMD_DEPENDENCIES
+= zlib
120 SYSTEMD_CONF_OPTS
+= --enable-zlib
122 SYSTEMD_CONF_OPTS
+= --disable-zlib
125 ifeq ($(BR2_PACKAGE_LIBCURL
),y
)
126 SYSTEMD_DEPENDENCIES
+= libcurl
127 SYSTEMD_CONF_OPTS
+= --enable-libcurl
129 SYSTEMD_CONF_OPTS
+= --disable-libcurl
132 ifeq ($(BR2_PACKAGE_LIBGCRYPT
),y
)
133 SYSTEMD_DEPENDENCIES
+= libgcrypt
134 SYSTEMD_CONF_OPTS
+= \
136 --with-libgcrypt-prefix
=$(STAGING_DIR
)/usr \
137 --with-libgpg-error-prefix
=$(STAGING_DIR
)/usr
139 SYSTEMD_CONF_OPTS
+= --disable-gcrypt
142 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
),y
)
143 SYSTEMD_DEPENDENCIES
+= libmicrohttpd
144 SYSTEMD_CONF_OPTS
+= --enable-microhttpd
145 ifeq ($(BR2_PACKAGE_LIBQRENCODE
),y
)
146 SYSTEMD_CONF_OPTS
+= --enable-qrencode
147 SYSTEMD_DEPENDENCIES
+= libqrencode
149 SYSTEMD_CONF_OPTS
+= --disable-qrencode
152 SYSTEMD_CONF_OPTS
+= --disable-microhttpd
--disable-qrencode
155 ifeq ($(BR2_PACKAGE_LIBSELINUX
),y
)
156 SYSTEMD_DEPENDENCIES
+= libselinux
157 SYSTEMD_CONF_OPTS
+= --enable-selinux
159 SYSTEMD_CONF_OPTS
+= --disable-selinux
162 ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB
),y
)
163 SYSTEMD_CONF_OPTS
+= --enable-hwdb
165 SYSTEMD_CONF_OPTS
+= --disable-hwdb
168 ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT
),y
)
169 SYSTEMD_CONF_OPTS
+= --enable-binfmt
171 SYSTEMD_CONF_OPTS
+= --disable-binfmt
174 ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE
),y
)
175 SYSTEMD_CONF_OPTS
+= --enable-vconsole
177 SYSTEMD_CONF_OPTS
+= --disable-vconsole
180 ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK
),y
)
181 SYSTEMD_CONF_OPTS
+= --enable-quotacheck
183 SYSTEMD_CONF_OPTS
+= --disable-quotacheck
186 ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES
),y
)
187 SYSTEMD_CONF_OPTS
+= --enable-tmpfiles
189 SYSTEMD_CONF_OPTS
+= --disable-tmpfiles
192 ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS
),y
)
193 SYSTEMD_CONF_OPTS
+= --enable-sysusers
195 SYSTEMD_CONF_OPTS
+= --disable-sysusers
198 ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT
),y
)
199 SYSTEMD_CONF_OPTS
+= --enable-firstboot
201 SYSTEMD_CONF_OPTS
+= --disable-firstboot
204 ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED
),y
)
205 SYSTEMD_CONF_OPTS
+= --enable-randomseed
207 SYSTEMD_CONF_OPTS
+= --disable-randomseed
210 ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT
),y
)
211 SYSTEMD_CONF_OPTS
+= --enable-backlight
213 SYSTEMD_CONF_OPTS
+= --disable-backlight
216 ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL
),y
)
217 SYSTEMD_CONF_OPTS
+= --enable-rfkill
219 SYSTEMD_CONF_OPTS
+= --disable-rfkill
222 ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND
),y
)
223 SYSTEMD_CONF_OPTS
+= --enable-logind
225 SYSTEMD_CONF_OPTS
+= --disable-logind
228 ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED
),y
)
229 SYSTEMD_CONF_OPTS
+= --enable-machined
231 SYSTEMD_CONF_OPTS
+= --disable-machined
234 ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD
),y
)
235 SYSTEMD_CONF_OPTS
+= --enable-importd
237 SYSTEMD_CONF_OPTS
+= --disable-importd
240 ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED
),y
)
241 SYSTEMD_CONF_OPTS
+= --enable-hostnamed
243 SYSTEMD_CONF_OPTS
+= --disable-hostnamed
246 ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME
),y
)
247 SYSTEMD_CONF_OPTS
+= --enable-myhostname
249 SYSTEMD_CONF_OPTS
+= --disable-myhostname
252 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED
),y
)
253 SYSTEMD_CONF_OPTS
+= --enable-timedated
255 SYSTEMD_CONF_OPTS
+= --disable-timedated
258 ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED
),y
)
259 SYSTEMD_CONF_OPTS
+= --enable-localed
261 SYSTEMD_CONF_OPTS
+= --disable-localed
264 ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP
),y
)
265 SYSTEMD_CONF_OPTS
+= --enable-coredump
266 SYSTEMD_COREDUMP_USER
= systemd-coredump
-1 systemd-coredump
-1 * /var
/lib
/systemd
/coredump
- - Core Dumper
268 SYSTEMD_CONF_OPTS
+= --disable-coredump
271 ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT
),y
)
272 SYSTEMD_CONF_OPTS
+= --enable-polkit
274 SYSTEMD_CONF_OPTS
+= --disable-polkit
277 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD
),y
)
278 SYSTEMD_CONF_OPTS
+= --enable-networkd
279 SYSTEMD_NETWORKD_USER
= systemd-network
-1 systemd-network
-1 * - - - Network Manager
280 define SYSTEMD_INSTALL_RESOLVCONF_HOOK
281 ln
-sf ..
/run
/systemd
/resolve
/resolv.conf \
282 $(TARGET_DIR
)/etc
/resolv.conf
285 SYSTEMD_CONF_OPTS
+= --disable-networkd
286 define SYSTEMD_INSTALL_SERVICE_NETWORK
287 $(INSTALL
) -D
-m
644 package
/systemd
/network.service \
288 $(TARGET_DIR
)/etc
/systemd
/system
/network.service
289 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
290 ln
-fs ..
/network.service \
291 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/network.service
295 ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED
),y
)
296 SYSTEMD_CONF_OPTS
+= --enable-resolved
297 SYSTEMD_RESOLVED_USER
= systemd-resolve
-1 systemd-resolve
-1 * - - - Network Name Resolution Manager
299 SYSTEMD_CONF_OPTS
+= --disable-resolved
302 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD
),y
)
303 SYSTEMD_CONF_OPTS
+= --enable-timesyncd
304 SYSTEMD_TIMESYNCD_USER
= systemd-timesync
-1 systemd-timesync
-1 * - - - Network Time Synchronization
305 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
306 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
307 ln
-sf ..
/..
/..
/..
/lib
/systemd
/system
/systemd-timesyncd.service \
308 $(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
/systemd-timesyncd.service
311 SYSTEMD_CONF_OPTS
+= --disable-timesyncd
314 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
),y
)
315 SYSTEMD_CONF_OPTS
+= --enable-smack
317 SYSTEMD_CONF_OPTS
+= --disable-smack
320 ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE
),y
)
321 SYSTEMD_CONF_OPTS
+= --enable-hibernate
323 SYSTEMD_CONF_OPTS
+= --disable-hibernate
326 define SYSTEMD_INSTALL_INIT_HOOK
327 ln
-fs ..
/lib
/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
328 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
329 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
330 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
332 ln
-fs ..
/..
/..
/lib
/systemd
/system
/multi-user.target \
333 $(TARGET_DIR
)/etc
/systemd
/system
/default.target
336 define SYSTEMD_INSTALL_MACHINEID_HOOK
337 touch
$(TARGET_DIR
)/etc
/machine-id
340 SYSTEMD_POST_INSTALL_TARGET_HOOKS
+= \
341 SYSTEMD_INSTALL_INIT_HOOK \
342 SYSTEMD_INSTALL_MACHINEID_HOOK \
343 SYSTEMD_INSTALL_RESOLVCONF_HOOK
346 - - input
-1 * - - - Input device group
347 - - systemd-journal
-1 * - - - Journal
348 systemd-bus-proxy
-1 systemd-bus-proxy
-1 * - - - Proxy D-Bus messages to
/from a bus
349 systemd-journal-gateway
-1 systemd-journal-gateway
-1 * /var
/log
/journal
- - Journal Gateway
350 systemd-journal-remote
-1 systemd-journal-remote
-1 * /var
/log
/journal
/remote
- - Journal Remote
351 systemd-journal-upload
-1 systemd-journal-upload
-1 * - - - Journal Upload
352 $(SYSTEMD_COREDUMP_USER
)
353 $(SYSTEMD_NETWORKD_USER
)
354 $(SYSTEMD_RESOLVED_USER
)
355 $(SYSTEMD_TIMESYNCD_USER
)
358 define SYSTEMD_DISABLE_SERVICE_TTY1
359 rm -f
$(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/getty@tty1.service
362 ifneq ($(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_PORT
)),)
363 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
364 # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
365 define SYSTEMD_INSTALL_SERVICE_TTY
366 if echo
$(BR2_TARGET_GENERIC_GETTY_PORT
) | egrep
-q
'tty[0-9]*$$'; \
370 SERVICE
="serial-getty"; \
372 ln
-fs ..
/..
/..
/..
/lib
/systemd
/system
/$${SERVICE}@.service \
373 $(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/$${SERVICE}@
$(BR2_TARGET_GENERIC_GETTY_PORT
).service
; \
374 if
[ $(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE
)) -gt
0 ] ; \
376 $(SED
) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR
)/lib
/systemd
/system
/$${SERVICE}@.service
; \
381 define SYSTEMD_INSTALL_INIT_SYSTEMD
382 $(SYSTEMD_DISABLE_SERVICE_TTY1
)
383 $(SYSTEMD_INSTALL_SERVICE_TTY
)
384 $(SYSTEMD_INSTALL_SERVICE_NETWORK
)
385 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC
)
388 $(eval
$(autotools-package
))