From 484609eeb06618dd2581f93ba57d0023a1f3adee Mon Sep 17 00:00:00 2001 From: Tim Yardley Date: Fri, 2 Mar 2007 18:17:40 +0000 Subject: [PATCH] commit profile support for base-files... patches still need to be done SVN-Revision: 6465 --- include/target.mk | 15 +++++++++++++++ package/base-files/Makefile | 9 +++++++-- .../base-files/{ => default}/bin/firstboot | 0 .../base-files/{ => default}/etc/config/network | 0 .../base-files/{ => default}/etc/init.d/adam2 | 0 .../ar7-2.4/base-files/{ => default}/etc/preinit | 0 .../base-files/{ => default}/sbin/mount_root | 0 .../base-files/{ => default}/etc/config/network | 0 .../base-files/{ => default}/bin/firstboot | 0 .../brcm-2.4/base-files/{ => default}/etc/diag.sh | 0 .../base-files/{ => default}/etc/init.d/done | 0 .../base-files/{ => default}/etc/init.d/netconfig | 0 .../brcm-2.4/base-files/{ => default}/etc/preinit | 0 .../{ => default}/sbin/hotplug.failsafe | 0 .../base-files/{ => default}/sbin/mount_root | 0 .../base-files/{ => default}/etc/config/network | 0 .../base-files/{ => default}/etc/init.d/netconfig | 0 .../base-files/{ => default}/etc/config/network | 0 .../base-files/{ => default}/sbin/cf2nand | 0 .../base-files/{ => default}/etc/config/network | 0 .../base-files/{ => default}/etc/inittab | 0 .../base-files/{ => default}/etc/config/network | 0 22 files changed, 22 insertions(+), 2 deletions(-) rename target/linux/ar7-2.4/base-files/{ => default}/bin/firstboot (100%) rename target/linux/ar7-2.4/base-files/{ => default}/etc/config/network (100%) rename target/linux/ar7-2.4/base-files/{ => default}/etc/init.d/adam2 (100%) rename target/linux/ar7-2.4/base-files/{ => default}/etc/preinit (100%) rename target/linux/ar7-2.4/base-files/{ => default}/sbin/mount_root (100%) rename target/linux/aruba-2.6/base-files/{ => default}/etc/config/network (100%) rename target/linux/brcm-2.4/base-files/{ => default}/bin/firstboot (100%) rename target/linux/brcm-2.4/base-files/{ => default}/etc/diag.sh (100%) rename target/linux/brcm-2.4/base-files/{ => default}/etc/init.d/done (100%) rename target/linux/brcm-2.4/base-files/{ => default}/etc/init.d/netconfig (100%) rename target/linux/brcm-2.4/base-files/{ => default}/etc/preinit (100%) rename target/linux/brcm-2.4/base-files/{ => default}/sbin/hotplug.failsafe (100%) rename target/linux/brcm-2.4/base-files/{ => default}/sbin/mount_root (100%) rename target/linux/ixp4xx-2.6/base-files/{ => default}/etc/config/network (100%) rename target/linux/ixp4xx-2.6/base-files/{ => default}/etc/init.d/netconfig (100%) rename target/linux/rb532-2.6/base-files/{ => default}/etc/config/network (100%) rename target/linux/rb532-2.6/base-files/{ => default}/sbin/cf2nand (100%) rename target/linux/sibyte-2.6/base-files/{ => default}/etc/config/network (100%) rename target/linux/sibyte-2.6/base-files/{ => default}/etc/inittab (100%) rename target/linux/x86-2.6/base-files/{ => default}/etc/config/network (100%) 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 -- 2.25.1