dracut.mk 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. ################################################################################
  2. #
  3. # dracut
  4. #
  5. ################################################################################
  6. DRACUT_VERSION = 059
  7. DRACUT_SITE = $(call github,dracutdevs,dracut,$(DRACUT_VERSION))
  8. DRACUT_LICENSE = GPL-2.0
  9. DRACUT_LICENSE_FILES = COPYING
  10. DRACUT_CPE_ID_VALID = YES
  11. HOST_DRACUT_DEPENDENCIES = host-pkgconf host-kmod host-prelink-cross
  12. define HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT
  13. mv $(HOST_DIR)/bin/dracut $(HOST_DIR)/bin/dracut.real
  14. install -D -m 0755 $(HOST_DRACUT_PKGDIR)/dracut_wrapper \
  15. $(HOST_DIR)/bin/dracut
  16. endef
  17. HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_WRAPPER_SCRIPT
  18. # When using uClibc or musl, there must be "ld-uClibc.so.1" or
  19. # "ld-musl-x.so" symlinks, respectively - else the init process cannot
  20. # start
  21. define HOST_DRACUT_POST_INSTALL_LIBC_LINKS_MODULE
  22. $(INSTALL) -D -m 0755 package/dracut/merged-usr-module-setup.sh \
  23. $(HOST_DIR)/lib/dracut/modules.d/0000-merged-usr/module-setup.sh
  24. $(INSTALL) -D -m 0755 package/dracut/libc-links-module-setup.sh \
  25. $(HOST_DIR)/lib/dracut/modules.d/05libc-links/module-setup.sh
  26. endef
  27. HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_LIBC_LINKS_MODULE
  28. ifeq ($(BR2_INIT_BUSYBOX),y)
  29. # Dracut does not support busybox init (systemd init is assumed to work
  30. # out of the box, though). It provides a busybox module, that does not
  31. # use the same paths as buildroot, and is not meant to be used as an init
  32. # system.
  33. # So it is simpler for users to disable the standard 'busybox' module in
  34. # the configuration file, and enable the "busybox-init' module instead.
  35. # Note that setting the script as executable (0755) is not mandatory,
  36. # but this is what dracut does on all its modules, so lets just conform
  37. # to it.
  38. define HOST_DRACUT_POST_INSTALL_BUSYBOX_INIT_MODULE
  39. $(INSTALL) -D -m 0755 package/dracut/busybox-init-module-setup.sh \
  40. $(HOST_DIR)/lib/dracut/modules.d/05busybox-init/module-setup.sh
  41. endef
  42. HOST_DRACUT_POST_INSTALL_HOOKS += HOST_DRACUT_POST_INSTALL_BUSYBOX_INIT_MODULE
  43. endif
  44. $(eval $(host-autotools-package))