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
284 SYSTEMD_NETWORKD_DHCP_IFACE
= $(call qstrip
,$(BR2_SYSTEM_DHCP
))
285 ifneq ($(SYSTEMD_NETWORKD_DHCP_IFACE
),)
286 define SYSTEMD_INSTALL_NETWORK_CONFS
287 sed s
/SYSTEMD_NETWORKD_DHCP_IFACE
/$(SYSTEMD_NETWORKD_DHCP_IFACE
)/ \
288 package
/systemd
/dhcp.network
> \
289 $(TARGET_DIR
)/etc
/systemd
/network
/dhcp.network
293 SYSTEMD_CONF_OPTS
+= --disable-networkd
294 define SYSTEMD_INSTALL_SERVICE_NETWORK
295 $(INSTALL
) -D
-m
644 package
/systemd
/network.service \
296 $(TARGET_DIR
)/etc
/systemd
/system
/network.service
297 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
298 ln
-fs ..
/network.service \
299 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/network.service
303 ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED
),y
)
304 SYSTEMD_CONF_OPTS
+= --enable-resolved
305 SYSTEMD_RESOLVED_USER
= systemd-resolve
-1 systemd-resolve
-1 * - - - Network Name Resolution Manager
307 SYSTEMD_CONF_OPTS
+= --disable-resolved
310 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD
),y
)
311 SYSTEMD_CONF_OPTS
+= --enable-timesyncd
312 SYSTEMD_TIMESYNCD_USER
= systemd-timesync
-1 systemd-timesync
-1 * - - - Network Time Synchronization
313 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
314 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
315 ln
-sf ..
/..
/..
/..
/lib
/systemd
/system
/systemd-timesyncd.service \
316 $(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
/systemd-timesyncd.service
319 SYSTEMD_CONF_OPTS
+= --disable-timesyncd
322 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
),y
)
323 SYSTEMD_CONF_OPTS
+= --enable-smack
325 SYSTEMD_CONF_OPTS
+= --disable-smack
328 ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE
),y
)
329 SYSTEMD_CONF_OPTS
+= --enable-hibernate
331 SYSTEMD_CONF_OPTS
+= --disable-hibernate
334 define SYSTEMD_INSTALL_INIT_HOOK
335 ln
-fs ..
/lib
/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
336 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
337 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
338 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
340 ln
-fs ..
/..
/..
/lib
/systemd
/system
/multi-user.target \
341 $(TARGET_DIR
)/etc
/systemd
/system
/default.target
344 define SYSTEMD_INSTALL_MACHINEID_HOOK
345 touch
$(TARGET_DIR
)/etc
/machine-id
348 SYSTEMD_POST_INSTALL_TARGET_HOOKS
+= \
349 SYSTEMD_INSTALL_INIT_HOOK \
350 SYSTEMD_INSTALL_MACHINEID_HOOK \
351 SYSTEMD_INSTALL_RESOLVCONF_HOOK
354 - - input
-1 * - - - Input device group
355 - - systemd-journal
-1 * - - - Journal
356 systemd-bus-proxy
-1 systemd-bus-proxy
-1 * - - - Proxy D-Bus messages to
/from a bus
357 systemd-journal-gateway
-1 systemd-journal-gateway
-1 * /var
/log
/journal
- - Journal Gateway
358 systemd-journal-remote
-1 systemd-journal-remote
-1 * /var
/log
/journal
/remote
- - Journal Remote
359 systemd-journal-upload
-1 systemd-journal-upload
-1 * - - - Journal Upload
360 $(SYSTEMD_COREDUMP_USER
)
361 $(SYSTEMD_NETWORKD_USER
)
362 $(SYSTEMD_RESOLVED_USER
)
363 $(SYSTEMD_TIMESYNCD_USER
)
366 define SYSTEMD_DISABLE_SERVICE_TTY1
367 rm -f
$(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/getty@tty1.service
370 ifneq ($(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_PORT
)),)
371 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
372 # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
373 define SYSTEMD_INSTALL_SERVICE_TTY
374 if echo
$(BR2_TARGET_GENERIC_GETTY_PORT
) | egrep
-q
'tty[0-9]*$$'; \
378 SERVICE
="serial-getty"; \
380 ln
-fs ..
/..
/..
/..
/lib
/systemd
/system
/$${SERVICE}@.service \
381 $(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/$${SERVICE}@
$(BR2_TARGET_GENERIC_GETTY_PORT
).service
; \
382 if
[ $(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE
)) -gt
0 ] ; \
384 $(SED
) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR
)/lib
/systemd
/system
/$${SERVICE}@.service
; \
389 define SYSTEMD_INSTALL_INIT_SYSTEMD
390 $(SYSTEMD_DISABLE_SERVICE_TTY1
)
391 $(SYSTEMD_INSTALL_SERVICE_TTY
)
392 $(SYSTEMD_INSTALL_SERVICE_NETWORK
)
393 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC
)
394 $(SYSTEMD_INSTALL_NETWORK_CONFS
)
397 $(eval
$(autotools-package
))