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
+= \
36 --disable-libcryptsetup \
42 --with-default-dnssec
=no \
45 SYSTEMD_CFLAGS
= $(TARGET_CFLAGS
) -fno-lto
47 # Override path to kmod, used in kmod-static-nodes.service
49 CFLAGS
="$(SYSTEMD_CFLAGS)" \
50 ac_cv_path_KMOD
=/usr
/bin
/kmod
52 define SYSTEMD_RUN_INTLTOOLIZE
53 cd
$(@D
) && $(HOST_DIR
)/usr
/bin
/intltoolize
--force --automake
55 SYSTEMD_PRE_CONFIGURE_HOOKS
+= SYSTEMD_RUN_INTLTOOLIZE
57 ifeq ($(BR2_PACKAGE_ACL
),y
)
58 SYSTEMD_CONF_OPTS
+= --enable-acl
59 SYSTEMD_DEPENDENCIES
+= acl
61 SYSTEMD_CONF_OPTS
+= --disable-acl
64 ifeq ($(BR2_PACKAGE_AUDIT
),y
)
65 SYSTEMD_CONF_OPTS
+= --enable-audit
66 SYSTEMD_DEPENDENCIES
+= audit
68 SYSTEMD_CONF_OPTS
+= --disable-audit
71 ifeq ($(BR2_PACKAGE_LIBIDN
),y
)
72 SYSTEMD_CONF_OPTS
+= --enable-libidn
73 SYSTEMD_DEPENDENCIES
+= libidn
75 SYSTEMD_CONF_OPTS
+= --disable-libidn
78 ifeq ($(BR2_PACKAGE_LIBSECCOMP
),y
)
79 SYSTEMD_CONF_OPTS
+= --enable-seccomp
80 SYSTEMD_DEPENDENCIES
+= libseccomp
82 SYSTEMD_CONF_OPTS
+= --disable-seccomp
85 ifeq ($(BR2_PACKAGE_LIBXKBCOMMON
),y
)
86 SYSTEMD_CONF_OPTS
+= --enable-xkbcommon
87 SYSTEMD_DEPENDENCIES
+= libxkbcommon
89 SYSTEMD_CONF_OPTS
+= --disable-xkbcommon
92 ifeq ($(BR2_PACKAGE_SYSTEMD_KDBUS
),y
)
93 SYSTEMD_CONF_OPTS
+= --enable-kdbus
95 SYSTEMD_CONF_OPTS
+= --disable-kdbus
98 ifeq ($(BR2_PACKAGE_BZIP2
),y
)
99 SYSTEMD_DEPENDENCIES
+= bzip2
100 SYSTEMD_CONF_OPTS
+= --enable-bzip2
102 SYSTEMD_CONF_OPTS
+= --disable-bzip2
105 ifeq ($(BR2_PACKAGE_LZ4
),y
)
106 SYSTEMD_DEPENDENCIES
+= lz4
107 SYSTEMD_CONF_OPTS
+= --enable-lz4
109 SYSTEMD_CONF_OPTS
+= --disable-lz4
112 ifeq ($(BR2_PACKAGE_XZ
),y
)
113 SYSTEMD_DEPENDENCIES
+= xz
114 SYSTEMD_CONF_OPTS
+= --enable-xz
116 SYSTEMD_CONF_OPTS
+= --disable-xz
119 ifeq ($(BR2_PACKAGE_ZLIB
),y
)
120 SYSTEMD_DEPENDENCIES
+= zlib
121 SYSTEMD_CONF_OPTS
+= --enable-zlib
123 SYSTEMD_CONF_OPTS
+= --disable-zlib
126 ifeq ($(BR2_PACKAGE_LIBCURL
),y
)
127 SYSTEMD_DEPENDENCIES
+= libcurl
128 SYSTEMD_CONF_OPTS
+= --enable-libcurl
130 SYSTEMD_CONF_OPTS
+= --disable-libcurl
133 ifeq ($(BR2_PACKAGE_LIBGCRYPT
),y
)
134 SYSTEMD_DEPENDENCIES
+= libgcrypt
135 SYSTEMD_CONF_OPTS
+= \
137 --with-libgcrypt-prefix
=$(STAGING_DIR
)/usr \
138 --with-libgpg-error-prefix
=$(STAGING_DIR
)/usr
140 SYSTEMD_CONF_OPTS
+= --disable-gcrypt
143 ifeq ($(BR2_PACKAGE_SYSTEMD_JOURNAL_GATEWAY
),y
)
144 SYSTEMD_DEPENDENCIES
+= libmicrohttpd
145 SYSTEMD_CONF_OPTS
+= --enable-microhttpd
146 ifeq ($(BR2_PACKAGE_LIBQRENCODE
),y
)
147 SYSTEMD_CONF_OPTS
+= --enable-qrencode
148 SYSTEMD_DEPENDENCIES
+= libqrencode
150 SYSTEMD_CONF_OPTS
+= --disable-qrencode
153 SYSTEMD_CONF_OPTS
+= --disable-microhttpd
--disable-qrencode
156 ifeq ($(BR2_PACKAGE_SYSTEMD_HWDB
),y
)
157 SYSTEMD_CONF_OPTS
+= --enable-hwdb
159 SYSTEMD_CONF_OPTS
+= --disable-hwdb
162 ifeq ($(BR2_PACKAGE_SYSTEMD_BINFMT
),y
)
163 SYSTEMD_CONF_OPTS
+= --enable-binfmt
165 SYSTEMD_CONF_OPTS
+= --disable-binfmt
168 ifeq ($(BR2_PACKAGE_SYSTEMD_VCONSOLE
),y
)
169 SYSTEMD_CONF_OPTS
+= --enable-vconsole
171 SYSTEMD_CONF_OPTS
+= --disable-vconsole
174 ifeq ($(BR2_PACKAGE_SYSTEMD_QUOTACHECK
),y
)
175 SYSTEMD_CONF_OPTS
+= --enable-quotacheck
177 SYSTEMD_CONF_OPTS
+= --disable-quotacheck
180 ifeq ($(BR2_PACKAGE_SYSTEMD_TMPFILES
),y
)
181 SYSTEMD_CONF_OPTS
+= --enable-tmpfiles
183 SYSTEMD_CONF_OPTS
+= --disable-tmpfiles
186 ifeq ($(BR2_PACKAGE_SYSTEMD_SYSUSERS
),y
)
187 SYSTEMD_CONF_OPTS
+= --enable-sysusers
189 SYSTEMD_CONF_OPTS
+= --disable-sysusers
192 ifeq ($(BR2_PACKAGE_SYSTEMD_FIRSTBOOT
),y
)
193 SYSTEMD_CONF_OPTS
+= --enable-firstboot
195 SYSTEMD_CONF_OPTS
+= --disable-firstboot
198 ifeq ($(BR2_PACKAGE_SYSTEMD_RANDOMSEED
),y
)
199 SYSTEMD_CONF_OPTS
+= --enable-randomseed
201 SYSTEMD_CONF_OPTS
+= --disable-randomseed
204 ifeq ($(BR2_PACKAGE_SYSTEMD_BACKLIGHT
),y
)
205 SYSTEMD_CONF_OPTS
+= --enable-backlight
207 SYSTEMD_CONF_OPTS
+= --disable-backlight
210 ifeq ($(BR2_PACKAGE_SYSTEMD_RFKILL
),y
)
211 SYSTEMD_CONF_OPTS
+= --enable-rfkill
213 SYSTEMD_CONF_OPTS
+= --disable-rfkill
216 ifeq ($(BR2_PACKAGE_SYSTEMD_LOGIND
),y
)
217 SYSTEMD_CONF_OPTS
+= --enable-logind
219 SYSTEMD_CONF_OPTS
+= --disable-logind
222 ifeq ($(BR2_PACKAGE_SYSTEMD_MACHINED
),y
)
223 SYSTEMD_CONF_OPTS
+= --enable-machined
225 SYSTEMD_CONF_OPTS
+= --disable-machined
228 ifeq ($(BR2_PACKAGE_SYSTEMD_IMPORTD
),y
)
229 SYSTEMD_CONF_OPTS
+= --enable-importd
231 SYSTEMD_CONF_OPTS
+= --disable-importd
234 ifeq ($(BR2_PACKAGE_SYSTEMD_HOSTNAMED
),y
)
235 SYSTEMD_CONF_OPTS
+= --enable-hostnamed
237 SYSTEMD_CONF_OPTS
+= --disable-hostnamed
240 ifeq ($(BR2_PACKAGE_SYSTEMD_MYHOSTNAME
),y
)
241 SYSTEMD_CONF_OPTS
+= --enable-myhostname
243 SYSTEMD_CONF_OPTS
+= --disable-myhostname
246 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMEDATED
),y
)
247 SYSTEMD_CONF_OPTS
+= --enable-timedated
249 SYSTEMD_CONF_OPTS
+= --disable-timedated
252 ifeq ($(BR2_PACKAGE_SYSTEMD_LOCALED
),y
)
253 SYSTEMD_CONF_OPTS
+= --enable-localed
255 SYSTEMD_CONF_OPTS
+= --disable-localed
258 ifeq ($(BR2_PACKAGE_SYSTEMD_COREDUMP
),y
)
259 SYSTEMD_CONF_OPTS
+= --enable-coredump
260 SYSTEMD_COREDUMP_USER
= systemd-coredump
-1 systemd-coredump
-1 * /var
/lib
/systemd
/coredump
- - Core Dumper
262 SYSTEMD_CONF_OPTS
+= --disable-coredump
265 ifeq ($(BR2_PACKAGE_SYSTEMD_POLKIT
),y
)
266 SYSTEMD_CONF_OPTS
+= --enable-polkit
268 SYSTEMD_CONF_OPTS
+= --disable-polkit
271 ifeq ($(BR2_PACKAGE_SYSTEMD_NETWORKD
),y
)
272 SYSTEMD_CONF_OPTS
+= --enable-networkd
273 SYSTEMD_NETWORKD_USER
= systemd-network
-1 systemd-network
-1 * - - - Network Manager
274 define SYSTEMD_INSTALL_RESOLVCONF_HOOK
275 ln
-sf ..
/run
/systemd
/resolve
/resolv.conf \
276 $(TARGET_DIR
)/etc
/resolv.conf
279 SYSTEMD_CONF_OPTS
+= --disable-networkd
280 define SYSTEMD_INSTALL_SERVICE_NETWORK
281 $(INSTALL
) -D
-m
644 package
/systemd
/network.service \
282 $(TARGET_DIR
)/etc
/systemd
/system
/network.service
283 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
284 ln
-fs ..
/network.service \
285 $(TARGET_DIR
)/etc
/systemd
/system
/multi-user.target.wants
/network.service
289 ifeq ($(BR2_PACKAGE_SYSTEMD_RESOLVED
),y
)
290 SYSTEMD_CONF_OPTS
+= --enable-resolved
291 SYSTEMD_RESOLVED_USER
= systemd-resolve
-1 systemd-resolve
-1 * - - - Network Name Resolution Manager
293 SYSTEMD_CONF_OPTS
+= --disable-resolved
296 ifeq ($(BR2_PACKAGE_SYSTEMD_TIMESYNCD
),y
)
297 SYSTEMD_CONF_OPTS
+= --enable-timesyncd
298 SYSTEMD_TIMESYNCD_USER
= systemd-timesync
-1 systemd-timesync
-1 * - - - Network Time Synchronization
299 define SYSTEMD_INSTALL_SERVICE_TIMESYNC
300 mkdir
-p
$(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
301 ln
-sf ..
/..
/..
/..
/lib
/systemd
/system
/systemd-timesyncd.service \
302 $(TARGET_DIR
)/etc
/systemd
/system
/sysinit.target.wants
/systemd-timesyncd.service
305 SYSTEMD_CONF_OPTS
+= --disable-timesyncd
308 ifeq ($(BR2_PACKAGE_SYSTEMD_SMACK_SUPPORT
),y
)
309 SYSTEMD_CONF_OPTS
+= --enable-smack
311 SYSTEMD_CONF_OPTS
+= --disable-smack
314 ifeq ($(BR2_PACKAGE_SYSTEMD_HIBERNATE
),y
)
315 SYSTEMD_CONF_OPTS
+= --enable-hibernate
317 SYSTEMD_CONF_OPTS
+= --disable-hibernate
320 define SYSTEMD_INSTALL_INIT_HOOK
321 ln
-fs ..
/lib
/systemd
/systemd
$(TARGET_DIR
)/sbin
/init
322 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/halt
323 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/poweroff
324 ln
-fs ..
/bin
/systemctl
$(TARGET_DIR
)/sbin
/reboot
326 ln
-fs ..
/..
/..
/lib
/systemd
/system
/multi-user.target \
327 $(TARGET_DIR
)/etc
/systemd
/system
/default.target
330 define SYSTEMD_INSTALL_MACHINEID_HOOK
331 touch
$(TARGET_DIR
)/etc
/machine-id
334 SYSTEMD_POST_INSTALL_TARGET_HOOKS
+= \
335 SYSTEMD_INSTALL_INIT_HOOK \
336 SYSTEMD_INSTALL_MACHINEID_HOOK \
337 SYSTEMD_INSTALL_RESOLVCONF_HOOK
340 - - input
-1 * - - - Input device group
341 - - systemd-journal
-1 * - - - Journal
342 systemd-bus-proxy
-1 systemd-bus-proxy
-1 * - - - Proxy D-Bus messages to
/from a bus
343 systemd-journal-gateway
-1 systemd-journal-gateway
-1 * /var
/log
/journal
- - Journal Gateway
344 systemd-journal-remote
-1 systemd-journal-remote
-1 * /var
/log
/journal
/remote
- - Journal Remote
345 systemd-journal-upload
-1 systemd-journal-upload
-1 * - - - Journal Upload
346 $(SYSTEMD_COREDUMP_USER
)
347 $(SYSTEMD_NETWORKD_USER
)
348 $(SYSTEMD_RESOLVED_USER
)
349 $(SYSTEMD_TIMESYNCD_USER
)
352 define SYSTEMD_DISABLE_SERVICE_TTY1
353 rm -f
$(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/getty@tty1.service
356 ifneq ($(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_PORT
)),)
357 # systemd needs getty.service for VTs and serial-getty.service for serial ttys
358 # also patch the file to use the correct baud-rate, the default baudrate is 115200 so look for that
359 define SYSTEMD_INSTALL_SERVICE_TTY
360 if echo
$(BR2_TARGET_GENERIC_GETTY_PORT
) | egrep
-q
'tty[0-9]*$$'; \
364 SERVICE
="serial-getty"; \
366 ln
-fs ..
/..
/..
/..
/lib
/systemd
/system
/$${SERVICE}@.service \
367 $(TARGET_DIR
)/etc
/systemd
/system
/getty.target.wants
/$${SERVICE}@
$(BR2_TARGET_GENERIC_GETTY_PORT
).service
; \
368 if
[ $(call qstrip
,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE
)) -gt
0 ] ; \
370 $(SED
) 's,115200,$(BR2_TARGET_GENERIC_GETTY_BAUDRATE),' $(TARGET_DIR
)/lib
/systemd
/system
/$${SERVICE}@.service
; \
375 define SYSTEMD_INSTALL_INIT_SYSTEMD
376 $(SYSTEMD_DISABLE_SERVICE_TTY1
)
377 $(SYSTEMD_INSTALL_SERVICE_TTY
)
378 $(SYSTEMD_INSTALL_SERVICE_NETWORK
)
379 $(SYSTEMD_INSTALL_SERVICE_TIMESYNC
)
382 $(eval
$(autotools-package
))