2019-05-12 21:55:39 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# skeleton-init-openrc
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# The skeleton can't depend on the toolchain, since all packages depends on the
|
|
|
|
# skeleton and the toolchain is a target package, as is skeleton.
|
|
|
|
# Hence, skeleton would depends on the toolchain and the toolchain would depend
|
|
|
|
# on skeleton.
|
|
|
|
SKELETON_INIT_OPENRC_ADD_TOOLCHAIN_DEPENDENCY = NO
|
|
|
|
SKELETON_INIT_OPENRC_ADD_SKELETON_DEPENDENCY = NO
|
|
|
|
|
|
|
|
SKELETON_INIT_OPENRC_DEPENDENCIES = skeleton-init-common
|
|
|
|
|
|
|
|
SKELETON_INIT_OPENRC_PROVIDES = skeleton
|
|
|
|
|
2019-08-04 14:14:16 +02:00
|
|
|
ifeq ($(BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW),y)
|
|
|
|
# Comment /dev/root entry in fstab. When openrc does not find fstab entry for
|
|
|
|
# "/", it will try to remount "/" as "rw".
|
|
|
|
define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
|
2020-02-24 12:41:34 +01:00
|
|
|
$(SED) '\:^/dev/root[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/fstab
|
2019-08-04 14:14:16 +02:00
|
|
|
endef
|
|
|
|
else
|
|
|
|
# Uncomment /dev/root entry in fstab which has "ro" option so openrc notices
|
|
|
|
# it and doesn't remount root to rw.
|
|
|
|
define SKELETON_INIT_OPENRC_ROOT_RO_OR_RW
|
2020-02-24 12:41:34 +01:00
|
|
|
$(SED) '\:^#[[:blank:]]*/dev/root[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/fstab
|
2019-08-04 14:14:16 +02:00
|
|
|
endef
|
|
|
|
endif # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
|
|
|
|
|
2019-05-12 21:55:39 +02:00
|
|
|
define SKELETON_INIT_OPENRC_INSTALL_TARGET_CMDS
|
|
|
|
$(call SYSTEM_RSYNC,$(SKELETON_INIT_OPENRC_PKGDIR)/skeleton,$(TARGET_DIR))
|
2019-08-04 14:14:16 +02:00
|
|
|
$(SKELETON_INIT_OPENRC_ROOT_RO_OR_RW)
|
2019-05-12 21:55:39 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|