skeleton-init-openrc.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. ################################################################################
  2. #
  3. # skeleton-init-openrc
  4. #
  5. ################################################################################
  6. # The skeleton can't depend on the toolchain, since all packages depends on the
  7. # skeleton and the toolchain is a target package, as is skeleton.
  8. # Hence, skeleton would depends on the toolchain and the toolchain would depend
  9. # on skeleton.
  10. SKELETON_INIT_OPENRC_ADD_TOOLCHAIN_DEPENDENCY = NO
  11. SKELETON_INIT_OPENRC_ADD_SKELETON_DEPENDENCY = NO
  12. SKELETON_INIT_OPENRC_DEPENDENCIES = skeleton-init-common
  13. SKELETON_INIT_OPENRC_PROVIDES = skeleton
  14. ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
  15. # Comment /dev/root entry in fstab. When openrc does not find fstab entry for
  16. # "/", it will try to remount "/" as "rw".
  17. define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
  18. $(SED) '\:^/dev/root[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/fstab
  19. endef
  20. else
  21. # Uncomment /dev/root entry in fstab which has "ro" option so openrc notices
  22. # it and doesn't remount root to rw.
  23. define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
  24. $(SED) '\:^#[[:blank:]]*/dev/root[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/fstab
  25. endef
  26. endif # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
  27. define SKELETON_INIT_OPENRC_INSTALL_TARGET_CMDS
  28. $(call SYSTEM_RSYNC,$(SKELETON_INIT_OPENRC_PKGDIR)/skeleton,$(TARGET_DIR))
  29. $(SKELETON_INIT_OPENRC_ROOT_RO_OR_RW)
  30. endef
  31. $(eval $(generic-package))