diff --git a/include/target.mk b/include/target.mk index bd3ceb955b..6a136a1bee 100644 --- a/include/target.mk +++ b/include/target.mk @@ -5,6 +5,21 @@ # See /LICENSE for more information. # +define AddProfile + $(eval $(call Profile/Default)) + $(eval $(call Profile/$(1))) + ifneq ($(ID),) + PROFILE:=$(ID) + $(ID)_NAME:=$(NAME) + $(ID)_PACKAGES:=$(PACKAGES) + ifneq ($(KCONFIG),) + PROFILE_LIST += \ + echo '$(ID):'; [ -z '$(NAME)' ] || echo ' $(NAME)'; echo ' Packages: $(PACKAGES)'; + endif + endif +endef + + include $(TMP_DIR)/.target.mk ifeq ($(IB),1) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5cbef91e3c..f02f1c9aa3 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -101,8 +101,13 @@ endef define Package/base-files$(TARGET)/install $(CP) ./files/* $(1)/ - if [ -d $(PLATFORM_DIR)/base-files/. ]; then \ - $(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \ + if [ -d $(PLATFORM_DIR)/base-files/default/. ]; then \ + $(CP) $(PLATFORM_DIR)/base-files/default/* $(1)/; \ + fi + if [ "$(PROFILE)" != "Default" ]; then \ + if [ -d $(PLATFORM_DIR)/base-files/profile-$(PROFILE)/. ]; then \ + $(CP) $(PLATFORM_DIR)/base-files/profile-$(PROFILE)/* $(1)/; \ + fi; \ fi $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf diff --git a/target/linux/ar7-2.4/base-files/bin/firstboot b/target/linux/ar7-2.4/base-files/default/bin/firstboot similarity index 100% rename from target/linux/ar7-2.4/base-files/bin/firstboot rename to target/linux/ar7-2.4/base-files/default/bin/firstboot diff --git a/target/linux/ar7-2.4/base-files/etc/config/network b/target/linux/ar7-2.4/base-files/default/etc/config/network similarity index 100% rename from target/linux/ar7-2.4/base-files/etc/config/network rename to target/linux/ar7-2.4/base-files/default/etc/config/network diff --git a/target/linux/ar7-2.4/base-files/etc/init.d/adam2 b/target/linux/ar7-2.4/base-files/default/etc/init.d/adam2 similarity index 100% rename from target/linux/ar7-2.4/base-files/etc/init.d/adam2 rename to target/linux/ar7-2.4/base-files/default/etc/init.d/adam2 diff --git a/target/linux/ar7-2.4/base-files/etc/preinit b/target/linux/ar7-2.4/base-files/default/etc/preinit similarity index 100% rename from target/linux/ar7-2.4/base-files/etc/preinit rename to target/linux/ar7-2.4/base-files/default/etc/preinit diff --git a/target/linux/ar7-2.4/base-files/sbin/mount_root b/target/linux/ar7-2.4/base-files/default/sbin/mount_root similarity index 100% rename from target/linux/ar7-2.4/base-files/sbin/mount_root rename to target/linux/ar7-2.4/base-files/default/sbin/mount_root diff --git a/target/linux/aruba-2.6/base-files/etc/config/network b/target/linux/aruba-2.6/base-files/default/etc/config/network similarity index 100% rename from target/linux/aruba-2.6/base-files/etc/config/network rename to target/linux/aruba-2.6/base-files/default/etc/config/network diff --git a/target/linux/brcm-2.4/base-files/bin/firstboot b/target/linux/brcm-2.4/base-files/default/bin/firstboot similarity index 100% rename from target/linux/brcm-2.4/base-files/bin/firstboot rename to target/linux/brcm-2.4/base-files/default/bin/firstboot diff --git a/target/linux/brcm-2.4/base-files/etc/diag.sh b/target/linux/brcm-2.4/base-files/default/etc/diag.sh similarity index 100% rename from target/linux/brcm-2.4/base-files/etc/diag.sh rename to target/linux/brcm-2.4/base-files/default/etc/diag.sh diff --git a/target/linux/brcm-2.4/base-files/etc/init.d/done b/target/linux/brcm-2.4/base-files/default/etc/init.d/done similarity index 100% rename from target/linux/brcm-2.4/base-files/etc/init.d/done rename to target/linux/brcm-2.4/base-files/default/etc/init.d/done diff --git a/target/linux/brcm-2.4/base-files/etc/init.d/netconfig b/target/linux/brcm-2.4/base-files/default/etc/init.d/netconfig similarity index 100% rename from target/linux/brcm-2.4/base-files/etc/init.d/netconfig rename to target/linux/brcm-2.4/base-files/default/etc/init.d/netconfig diff --git a/target/linux/brcm-2.4/base-files/etc/preinit b/target/linux/brcm-2.4/base-files/default/etc/preinit similarity index 100% rename from target/linux/brcm-2.4/base-files/etc/preinit rename to target/linux/brcm-2.4/base-files/default/etc/preinit diff --git a/target/linux/brcm-2.4/base-files/sbin/hotplug.failsafe b/target/linux/brcm-2.4/base-files/default/sbin/hotplug.failsafe similarity index 100% rename from target/linux/brcm-2.4/base-files/sbin/hotplug.failsafe rename to target/linux/brcm-2.4/base-files/default/sbin/hotplug.failsafe diff --git a/target/linux/brcm-2.4/base-files/sbin/mount_root b/target/linux/brcm-2.4/base-files/default/sbin/mount_root similarity index 100% rename from target/linux/brcm-2.4/base-files/sbin/mount_root rename to target/linux/brcm-2.4/base-files/default/sbin/mount_root diff --git a/target/linux/ixp4xx-2.6/base-files/etc/config/network b/target/linux/ixp4xx-2.6/base-files/default/etc/config/network similarity index 100% rename from target/linux/ixp4xx-2.6/base-files/etc/config/network rename to target/linux/ixp4xx-2.6/base-files/default/etc/config/network diff --git a/target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig b/target/linux/ixp4xx-2.6/base-files/default/etc/init.d/netconfig similarity index 100% rename from target/linux/ixp4xx-2.6/base-files/etc/init.d/netconfig rename to target/linux/ixp4xx-2.6/base-files/default/etc/init.d/netconfig diff --git a/target/linux/rb532-2.6/base-files/etc/config/network b/target/linux/rb532-2.6/base-files/default/etc/config/network similarity index 100% rename from target/linux/rb532-2.6/base-files/etc/config/network rename to target/linux/rb532-2.6/base-files/default/etc/config/network diff --git a/target/linux/rb532-2.6/base-files/sbin/cf2nand b/target/linux/rb532-2.6/base-files/default/sbin/cf2nand similarity index 100% rename from target/linux/rb532-2.6/base-files/sbin/cf2nand rename to target/linux/rb532-2.6/base-files/default/sbin/cf2nand diff --git a/target/linux/sibyte-2.6/base-files/etc/config/network b/target/linux/sibyte-2.6/base-files/default/etc/config/network similarity index 100% rename from target/linux/sibyte-2.6/base-files/etc/config/network rename to target/linux/sibyte-2.6/base-files/default/etc/config/network diff --git a/target/linux/sibyte-2.6/base-files/etc/inittab b/target/linux/sibyte-2.6/base-files/default/etc/inittab similarity index 100% rename from target/linux/sibyte-2.6/base-files/etc/inittab rename to target/linux/sibyte-2.6/base-files/default/etc/inittab diff --git a/target/linux/x86-2.6/base-files/etc/config/network b/target/linux/x86-2.6/base-files/default/etc/config/network similarity index 100% rename from target/linux/x86-2.6/base-files/etc/config/network rename to target/linux/x86-2.6/base-files/default/etc/config/network