1################################################################################ 2# 3# skeleton-custom 4# 5################################################################################ 6 7# The skeleton can't depend on the toolchain, since all packages depends on the 8# skeleton and the toolchain is a target package, as is skeleton. 9# Hence, skeleton would depends on the toolchain and the toolchain would depend 10# on skeleton. 11SKELETON_CUSTOM_ADD_TOOLCHAIN_DEPENDENCY = NO 12SKELETON_CUSTOM_ADD_SKELETON_DEPENDENCY = NO 13 14SKELETON_CUSTOM_PROVIDES = skeleton 15 16SKELETON_CUSTOM_INSTALL_STAGING = YES 17 18SKELETON_CUSTOM_PATH = $(call qstrip,$(BR2_ROOTFS_SKELETON_CUSTOM_PATH)) 19 20ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM)$(BR_BUILDING),yy) 21ifeq ($(SKELETON_CUSTOM_PATH),) 22$(error No path specified for the custom skeleton) 23endif 24endif 25 26# For a merged /usr, ensure that /lib, /bin and /sbin and their /usr 27# counterparts are appropriately setup as symlinks ones to the others. 28ifeq ($(BR2_ROOTFS_MERGED_USR),y) 29SKELETON_CUSTOM_NOT_MERGED_USR_DIRS = \ 30 $(shell support/scripts/check-merged-usr.sh $(SKELETON_CUSTOM_PATH)) 31endif # merged /usr 32 33ifeq ($(BR2_PACKAGE_SKELETON_CUSTOM)$(BR_BUILDING),yy) 34ifneq ($(SKELETON_CUSTOM_NOT_MERGED_USR_DIRS),) 35$(error The custom skeleton in $(SKELETON_CUSTOM_PATH) is not \ 36 using a merged /usr for the following directories: \ 37 $(SKELETON_CUSTOM_NOT_MERGED_USR_DIRS)) 38endif 39endif 40 41# The target-dir-warning file and the lib{32,64} symlinks are the only 42# things we customise in the custom skeleton. 43define SKELETON_CUSTOM_INSTALL_TARGET_CMDS 44 $(call SYSTEM_RSYNC,$(SKELETON_CUSTOM_PATH),$(TARGET_DIR)) 45 $(call SYSTEM_USR_SYMLINKS_OR_DIRS,$(TARGET_DIR)) 46 $(call SYSTEM_LIB_SYMLINK,$(TARGET_DIR)) 47 $(INSTALL) -m 0644 support/misc/target-dir-warning.txt \ 48 $(TARGET_DIR_WARNING_FILE) 49endef 50 51# For the staging dir, we don't really care what we install, but we 52# need the /lib and /usr/lib appropriately setup. Since we ensure, 53# above, that they are correct in the skeleton, we can simply copy the 54# skeleton to staging. 55define SKELETON_CUSTOM_INSTALL_STAGING_CMDS 56 $(call SYSTEM_RSYNC,$(SKELETON_CUSTOM_PATH),$(STAGING_DIR)) 57 $(call SYSTEM_USR_SYMLINKS_OR_DIRS,$(STAGING_DIR)) 58 $(call SYSTEM_LIB_SYMLINK,$(STAGING_DIR)) 59endef 60 61$(eval $(generic-package)) 62