Files
buildroot/package/skeleton-init-openrc/skeleton-init-openrc.mk
Fiona Klute (Othermo GmbH) 927c575964 package/skeleton{, -init-*}: add license information
All these packages are part of Buildroot and thus under
GPL-2.0-or-later unless stated otherwise, as described in COPYING.

package/skeleton-custom is excluded because it provides a way to copy
skeleton data from any location chosen by the user, the license of
which is unknown to Buildroot.

Signed-off-by: Fiona Klute (Othermo GmbH) <fiona.klute@gmx.de>
Signed-off-by: Julien Olivain <ju.o@free.fr>
2026-07-22 22:20:58 +02:00

40 lines
1.4 KiB
Makefile

################################################################################
#
# skeleton-init-openrc
#
################################################################################
SKELETON_INIT_OPENRC_LICENSE = GPL-2.0-or-later
# 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
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
$(SED) '\:^/dev/root[[:blank:]]:s/^/# /' $(TARGET_DIR)/etc/fstab
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
$(SED) '\:^#[[:blank:]]*/dev/root[[:blank:]]:s/^# //' $(TARGET_DIR)/etc/fstab
endef
endif # BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW
define SKELETON_INIT_OPENRC_INSTALL_TARGET_CMDS
$(call SYSTEM_RSYNC,$(SKELETON_INIT_OPENRC_PKGDIR)/skeleton,$(TARGET_DIR))
$(SKELETON_INIT_OPENRC_ROOT_RO_OR_RW)
endef
$(eval $(generic-package))