systemd.mk 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #############################################################
  2. #
  3. # systemd
  4. #
  5. #############################################################
  6. SYSTEMD_VERSION = 44
  7. SYSTEMD_SITE = http://www.freedesktop.org/software/systemd/
  8. SYSTEMD_SOURCE = systemd-$(SYSTEMD_VERSION).tar.xz
  9. SYSTEMD_DEPENDENCIES = \
  10. host-intltool \
  11. libcap \
  12. udev \
  13. dbus
  14. # Make sure that systemd will always be built after busybox so that we have
  15. # a consistent init setup between two builds
  16. ifeq ($(BR2_PACKAGE_BUSYBOX),y)
  17. SYSTEMD_DEPENDENCIES += busybox
  18. endif
  19. SYSTEMD_CONF_OPT += \
  20. --with-distro=other \
  21. --disable-selinux \
  22. --disable-pam \
  23. --disable-libcryptsetup \
  24. --disable-gtk \
  25. --disable-plymouth \
  26. --with-rootdir=/ \
  27. --with-dbuspolicydir=/etc/dbus-1/system.d \
  28. --with-dbussessionservicedir=/usr/share/dbus-1/services \
  29. --with-dbussystemservicedir=/usr/share/dbus-1/system-services \
  30. --with-dbusinterfacedir=/usr/share/dbus-1/interfaces \
  31. --with-udevrulesdir=/etc/udev/rules.d \
  32. --with-sysvinit-path=/etc/init.d/ \
  33. --without-sysvrcd-path \
  34. --enable-split-usr
  35. ifeq ($(BR2_PACKAGE_ACL),y)
  36. SYSTEMD_CONF_OPT += --enable-acl
  37. SYSTEMD_DEPENDENCIES += acl
  38. else
  39. SYSTEMD_CONF_OPT += --disable-acl
  40. endif
  41. ifneq ($(BR2_LARGEFILE),y)
  42. SYSTEMD_CONF_OPT += --disable-largefile
  43. endif
  44. # mq_getattr needs -lrt
  45. SYSTEMD_MAKE_OPT += LIBS=-lrt
  46. SYSTEMD_MAKE_OPT += LDFLAGS+=-ldl
  47. define SYSTEMD_INSTALL_INIT_HOOK
  48. ln -fs ../usr/lib/systemd/systemd $(TARGET_DIR)/sbin/init
  49. ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/halt
  50. ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/poweroff
  51. ln -fs ../usr/bin/systemctl $(TARGET_DIR)/sbin/reboot
  52. ln -fs ../../../usr/lib/systemd/system/multi-user.target $(TARGET_DIR)/etc/systemd/system/default.target
  53. endef
  54. define SYSTEMD_INSTALL_TTY_HOOK
  55. rm -f $(TARGET_DIR)/etc/systemd/system/getty.target.wants/getty@tty1.service
  56. ln -fs ../../../../usr/lib/systemd/system/serial-getty@.service $(TARGET_DIR)/etc/systemd/system/getty.target.wants/serial-getty@$(BR2_TARGET_GENERIC_GETTY_PORT).service
  57. endef
  58. SYSTEMD_POST_INSTALL_TARGET_HOOKS += \
  59. SYSTEMD_INSTALL_INIT_HOOK \
  60. SYSTEMD_INSTALL_TTY_HOOK \
  61. $(eval $(call AUTOTARGETS))