From 37362df7ea5978750f4584d2ce48623c59ef0695 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 22 Nov 2006 23:27:29 +0000 Subject: [PATCH] move platform specific base-files into target/linux/ SVN-Revision: 5621 --- include/kernel.mk | 1 + package/base-files/Makefile | 68 ++++--------------- target/linux/ar7-2.4/base-files.mk | 11 +++ .../linux/ar7-2.4/base-files}/bin/firstboot | 0 .../ar7-2.4/base-files}/etc/config/network | 0 .../ar7-2.4/base-files}/etc/init.d/adam2 | 0 .../linux/ar7-2.4/base-files}/etc/preinit | 0 .../linux/ar7-2.4/base-files}/sbin/mount_root | 0 .../linux/ar7-2.4}/src/adam2patcher.c | 0 .../aruba-2.6/base-files}/etc/config/network | 0 .../au1000-2.6/base-files}/etc/config/network | 0 .../au1000-2.6/base-files}/sbin/mount_root | 0 target/linux/brcm-2.4/base-files.mk | 12 ++++ .../linux/brcm-2.4/base-files}/bin/firstboot | 0 .../linux/brcm-2.4/base-files}/etc/diag.sh | 0 .../brcm-2.4/base-files}/etc/init.d/done | 0 .../brcm-2.4/base-files}/etc/init.d/netconfig | 0 .../linux/brcm-2.4/base-files}/etc/preinit | 0 .../base-files}/sbin/hotplug.failsafe | 0 .../brcm-2.4/base-files}/sbin/mount_root | 0 .../linux/brcm-2.4}/src/jffs2root.c | 0 .../linux/brcm-2.4}/src/mtd.h | 0 target/linux/brcm-2.6/base-files | 1 + target/linux/brcm-2.6/base-files.mk | 1 + .../ixp4xx-2.6/base-files}/etc/config/network | 0 .../rb532-2.6/base-files}/etc/config/network | 0 .../linux/rb532-2.6/base-files}/sbin/cf2nand | 0 .../sibyte-2.6/base-files}/etc/config/network | 0 .../linux/sibyte-2.6/base-files}/etc/inittab | 0 .../x86-2.6/base-files}/etc/config/network | 0 30 files changed, 41 insertions(+), 53 deletions(-) create mode 100644 target/linux/ar7-2.4/base-files.mk rename {package/base-files/ar7 => target/linux/ar7-2.4/base-files}/bin/firstboot (100%) rename {package/base-files/ar7 => target/linux/ar7-2.4/base-files}/etc/config/network (100%) rename {package/base-files/ar7 => target/linux/ar7-2.4/base-files}/etc/init.d/adam2 (100%) rename {package/base-files/ar7 => target/linux/ar7-2.4/base-files}/etc/preinit (100%) rename {package/base-files/ar7 => target/linux/ar7-2.4/base-files}/sbin/mount_root (100%) rename {package/base-files => target/linux/ar7-2.4}/src/adam2patcher.c (100%) rename {package/base-files/aruba => target/linux/aruba-2.6/base-files}/etc/config/network (100%) rename {package/base-files/au1000 => target/linux/au1000-2.6/base-files}/etc/config/network (100%) rename {package/base-files/au1000 => target/linux/au1000-2.6/base-files}/sbin/mount_root (100%) create mode 100644 target/linux/brcm-2.4/base-files.mk rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/bin/firstboot (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/etc/diag.sh (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/etc/init.d/done (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/etc/init.d/netconfig (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/etc/preinit (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/sbin/hotplug.failsafe (100%) rename {package/base-files/brcm => target/linux/brcm-2.4/base-files}/sbin/mount_root (100%) rename {package/base-files => target/linux/brcm-2.4}/src/jffs2root.c (100%) rename {package/base-files => target/linux/brcm-2.4}/src/mtd.h (100%) create mode 120000 target/linux/brcm-2.6/base-files create mode 120000 target/linux/brcm-2.6/base-files.mk rename {package/base-files/xscale => target/linux/ixp4xx-2.6/base-files}/etc/config/network (100%) rename {package/base-files/rb532 => target/linux/rb532-2.6/base-files}/etc/config/network (100%) rename {package/base-files/rb532 => target/linux/rb532-2.6/base-files}/sbin/cf2nand (100%) rename {package/base-files/sibyte-2.6 => target/linux/sibyte-2.6/base-files}/etc/config/network (100%) rename {package/base-files/sibyte-2.6 => target/linux/sibyte-2.6/base-files}/etc/inittab (100%) rename {package/base-files/x86 => target/linux/x86-2.6/base-files}/etc/config/network (100%) diff --git a/include/kernel.mk b/include/kernel.mk index bc07411b69f9..b8af46c2b88b 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -26,6 +26,7 @@ else KERNEL_CROSS:=$(TARGET_CROSS) endif + PLATFORM_DIR := $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD) LINUX_DIR := $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 5af1414d4e37..04a63b749471 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -42,34 +42,6 @@ define Package/base-files$(TARGET) VERSION:=$(PKG_RELEASE)-$(REV) endef -define -ar7-2.4/conffiles -/etc/config/network -endef - -define -aruba-2.6/conffiles -/etc/config/network -endef - -define -au1000-2.6/conffiles -/etc/config/network -endef - -define -rb532-2.6/conffiles -/etc/config/network -endef - -define -sibyte-2.6/conffiles -/etc/config/network -endef - -define -x86-2.6/conffiles -/etc/config/network -endef - -define -xscale-2.6/conffiles -/etc/config/network -endef - define Package/base-files$(TARGET)/conffiles /etc/banner /etc/hosts @@ -114,37 +86,17 @@ define Build/Prepare mkdir -p $(PKG_BUILD_DIR) endef -define Build/Compile/ar7 - $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher src/adam2patcher.c -endef - -define Build/Compile/brcm - $(TARGET_CC) -I src -o $(PKG_BUILD_DIR)/jffs2root src/jffs2root.c +define Build/Compile/Default endef define Build/Compile - $(call Build/Compile/$(BOARD)) -endef - - -define Package/base-files$(TARGET)/install-ar7 - mkdir -p $(1)/sbin - $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin -endef - -define Package/base-files$(TARGET)/install-brcm - rm -f $(1)/etc/config/network - mkdir -p $(1)/sbin - $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin + $(call Build/Compile/Default) endef define Package/base-files$(TARGET)/install $(CP) ./default/* $(1)/ - if [ -d $(BOARD) ]; then \ - $(CP) $(BOARD)/* $(1)/; \ - fi - if [ -d $(BOARD)-$(KERNEL) ]; then \ - $(CP) $(BOARD)-$(KERNEL)/* $(1)/; \ + if [ -d $(PLATFORM_DIR)/base-files/. ]; then \ + $(CP) $(PLATFORM_DIR)/base-files/* $(1)/; \ fi $(SED) 's,$$$$R,r$(REV),g' $(1)/etc/banner $(SED) 's,$$$$S,$(BOARD)-$(KERNEL),g' $(1)/etc/ipkg.conf @@ -163,7 +115,13 @@ define Package/base-files$(TARGET)/install rm -f $(1)/var ln -sf /tmp $(1)/var mkdir -p $(1)/etc -$(call Package/base-files$(TARGET)/install-$(BOARD),$(1)) + $(call Package/base-files/install-target,$(1)) + for conffile in $(1)/etc/config/*; do \ + if [ -f "$$$$conffile" ]; then \ + grep "$$$$conffile" $(1)/CONTROL/conffiles || \ + echo "$$$${conffile##$(1)}" >> $(1)/CONTROL/conffiles; \ + fi \ + done endef define Package/libgcc/install @@ -185,6 +143,10 @@ define Package/uclibc/install done endef +ifneq ($(DUMP),1) + -include $(PLATFORM_DIR)/base-files.mk +endif + $(eval $(call BuildPackage,base-files$(TARGET))) $(eval $(call BuildPackage,libgcc)) $(eval $(call BuildPackage,libpthread)) diff --git a/target/linux/ar7-2.4/base-files.mk b/target/linux/ar7-2.4/base-files.mk new file mode 100644 index 000000000000..f21a604b8300 --- /dev/null +++ b/target/linux/ar7-2.4/base-files.mk @@ -0,0 +1,11 @@ +define Build/Compile + $(call Build/Compile/Default) + $(TARGET_CC) -o $(PKG_BUILD_DIR)/adam2patcher $(PLATFORM_DIR)/src/adam2patcher.c +endef + +define Package/base-files/install-target + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/adam2patcher $(1)/sbin +endef + + diff --git a/package/base-files/ar7/bin/firstboot b/target/linux/ar7-2.4/base-files/bin/firstboot similarity index 100% rename from package/base-files/ar7/bin/firstboot rename to target/linux/ar7-2.4/base-files/bin/firstboot diff --git a/package/base-files/ar7/etc/config/network b/target/linux/ar7-2.4/base-files/etc/config/network similarity index 100% rename from package/base-files/ar7/etc/config/network rename to target/linux/ar7-2.4/base-files/etc/config/network diff --git a/package/base-files/ar7/etc/init.d/adam2 b/target/linux/ar7-2.4/base-files/etc/init.d/adam2 similarity index 100% rename from package/base-files/ar7/etc/init.d/adam2 rename to target/linux/ar7-2.4/base-files/etc/init.d/adam2 diff --git a/package/base-files/ar7/etc/preinit b/target/linux/ar7-2.4/base-files/etc/preinit similarity index 100% rename from package/base-files/ar7/etc/preinit rename to target/linux/ar7-2.4/base-files/etc/preinit diff --git a/package/base-files/ar7/sbin/mount_root b/target/linux/ar7-2.4/base-files/sbin/mount_root similarity index 100% rename from package/base-files/ar7/sbin/mount_root rename to target/linux/ar7-2.4/base-files/sbin/mount_root diff --git a/package/base-files/src/adam2patcher.c b/target/linux/ar7-2.4/src/adam2patcher.c similarity index 100% rename from package/base-files/src/adam2patcher.c rename to target/linux/ar7-2.4/src/adam2patcher.c diff --git a/package/base-files/aruba/etc/config/network b/target/linux/aruba-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/aruba/etc/config/network rename to target/linux/aruba-2.6/base-files/etc/config/network diff --git a/package/base-files/au1000/etc/config/network b/target/linux/au1000-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/au1000/etc/config/network rename to target/linux/au1000-2.6/base-files/etc/config/network diff --git a/package/base-files/au1000/sbin/mount_root b/target/linux/au1000-2.6/base-files/sbin/mount_root similarity index 100% rename from package/base-files/au1000/sbin/mount_root rename to target/linux/au1000-2.6/base-files/sbin/mount_root diff --git a/target/linux/brcm-2.4/base-files.mk b/target/linux/brcm-2.4/base-files.mk new file mode 100644 index 000000000000..9a2e365b677c --- /dev/null +++ b/target/linux/brcm-2.4/base-files.mk @@ -0,0 +1,12 @@ +define Build/Compile + $(call Build/Compile/Default) + $(TARGET_CC) -I $(PLATFORM_DIR)/src -o $(PKG_BUILD_DIR)/jffs2root $(PLATFORM_DIR)/src/jffs2root.c +endef + +define Package/base-files/install-target + rm -f $(1)/etc/config/network + mkdir -p $(1)/sbin + $(CP) $(PKG_BUILD_DIR)/jffs2root $(1)/sbin +endef + + diff --git a/package/base-files/brcm/bin/firstboot b/target/linux/brcm-2.4/base-files/bin/firstboot similarity index 100% rename from package/base-files/brcm/bin/firstboot rename to target/linux/brcm-2.4/base-files/bin/firstboot diff --git a/package/base-files/brcm/etc/diag.sh b/target/linux/brcm-2.4/base-files/etc/diag.sh similarity index 100% rename from package/base-files/brcm/etc/diag.sh rename to target/linux/brcm-2.4/base-files/etc/diag.sh diff --git a/package/base-files/brcm/etc/init.d/done b/target/linux/brcm-2.4/base-files/etc/init.d/done similarity index 100% rename from package/base-files/brcm/etc/init.d/done rename to target/linux/brcm-2.4/base-files/etc/init.d/done diff --git a/package/base-files/brcm/etc/init.d/netconfig b/target/linux/brcm-2.4/base-files/etc/init.d/netconfig similarity index 100% rename from package/base-files/brcm/etc/init.d/netconfig rename to target/linux/brcm-2.4/base-files/etc/init.d/netconfig diff --git a/package/base-files/brcm/etc/preinit b/target/linux/brcm-2.4/base-files/etc/preinit similarity index 100% rename from package/base-files/brcm/etc/preinit rename to target/linux/brcm-2.4/base-files/etc/preinit diff --git a/package/base-files/brcm/sbin/hotplug.failsafe b/target/linux/brcm-2.4/base-files/sbin/hotplug.failsafe similarity index 100% rename from package/base-files/brcm/sbin/hotplug.failsafe rename to target/linux/brcm-2.4/base-files/sbin/hotplug.failsafe diff --git a/package/base-files/brcm/sbin/mount_root b/target/linux/brcm-2.4/base-files/sbin/mount_root similarity index 100% rename from package/base-files/brcm/sbin/mount_root rename to target/linux/brcm-2.4/base-files/sbin/mount_root diff --git a/package/base-files/src/jffs2root.c b/target/linux/brcm-2.4/src/jffs2root.c similarity index 100% rename from package/base-files/src/jffs2root.c rename to target/linux/brcm-2.4/src/jffs2root.c diff --git a/package/base-files/src/mtd.h b/target/linux/brcm-2.4/src/mtd.h similarity index 100% rename from package/base-files/src/mtd.h rename to target/linux/brcm-2.4/src/mtd.h diff --git a/target/linux/brcm-2.6/base-files b/target/linux/brcm-2.6/base-files new file mode 120000 index 000000000000..aa485f25b27d --- /dev/null +++ b/target/linux/brcm-2.6/base-files @@ -0,0 +1 @@ +../brcm-2.4/base-files \ No newline at end of file diff --git a/target/linux/brcm-2.6/base-files.mk b/target/linux/brcm-2.6/base-files.mk new file mode 120000 index 000000000000..13c8c34bfd14 --- /dev/null +++ b/target/linux/brcm-2.6/base-files.mk @@ -0,0 +1 @@ +../brcm-2.4/base-files.mk \ No newline at end of file diff --git a/package/base-files/xscale/etc/config/network b/target/linux/ixp4xx-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/xscale/etc/config/network rename to target/linux/ixp4xx-2.6/base-files/etc/config/network diff --git a/package/base-files/rb532/etc/config/network b/target/linux/rb532-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/rb532/etc/config/network rename to target/linux/rb532-2.6/base-files/etc/config/network diff --git a/package/base-files/rb532/sbin/cf2nand b/target/linux/rb532-2.6/base-files/sbin/cf2nand similarity index 100% rename from package/base-files/rb532/sbin/cf2nand rename to target/linux/rb532-2.6/base-files/sbin/cf2nand diff --git a/package/base-files/sibyte-2.6/etc/config/network b/target/linux/sibyte-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/sibyte-2.6/etc/config/network rename to target/linux/sibyte-2.6/base-files/etc/config/network diff --git a/package/base-files/sibyte-2.6/etc/inittab b/target/linux/sibyte-2.6/base-files/etc/inittab similarity index 100% rename from package/base-files/sibyte-2.6/etc/inittab rename to target/linux/sibyte-2.6/base-files/etc/inittab diff --git a/package/base-files/x86/etc/config/network b/target/linux/x86-2.6/base-files/etc/config/network similarity index 100% rename from package/base-files/x86/etc/config/network rename to target/linux/x86-2.6/base-files/etc/config/network -- 2.30.2