From 043ac6c8ed76ff5a1f3b84a6f2f5f12edfedc93c Mon Sep 17 00:00:00 2001 From: nbd Date: Thu, 19 Oct 2006 06:20:55 +0000 Subject: cleanup/rewrite of the kernel build process git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5226 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- target/linux/Makefile | 1 - target/linux/ar531x-2.4/Makefile | 9 +-------- target/linux/ar7-2.4/Makefile | 9 +-------- target/linux/aruba-2.6/Makefile | 9 +-------- target/linux/au1000-2.6/Makefile | 14 +++++--------- target/linux/brcm-2.4/Makefile | 9 +-------- target/linux/brcm-2.6/Makefile | 9 +-------- target/linux/brcm63xx-2.6/Makefile | 10 +--------- target/linux/magicbox-2.6/Makefile | 9 +-------- target/linux/rb532-2.6/Makefile | 9 +-------- target/linux/rdc-2.6/Makefile | 8 +------- target/linux/sibyte-2.6/Makefile | 9 +-------- target/linux/uml-2.6/Makefile | 8 +------- target/linux/x86-2.6/Makefile | 8 +------- target/linux/xscale-2.6/Makefile | 8 +------- 15 files changed, 18 insertions(+), 111 deletions(-) (limited to 'target') diff --git a/target/linux/Makefile b/target/linux/Makefile index 8682fc2b9..2a9cf7db2 100644 --- a/target/linux/Makefile +++ b/target/linux/Makefile @@ -11,7 +11,6 @@ download: $(MAKE) -C $(BOARD)-$(KERNEL) download prepare: - rm -f $(TOPDIR)/.kernel.mk $(MAKE) -C $(BOARD)-$(KERNEL) prepare compile: diff --git a/target/linux/ar531x-2.4/Makefile b/target/linux/ar531x-2.4/Makefile index 14b73f8f5..e15eb09b5 100644 --- a/target/linux/ar531x-2.4/Makefile +++ b/target/linux/ar531x-2.4/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/ar7-2.4/Makefile b/target/linux/ar7-2.4/Makefile index b220b4c97..e15eb09b5 100644 --- a/target/linux/ar7-2.4/Makefile +++ b/target/linux/ar7-2.4/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/aruba-2.6/Makefile b/target/linux/aruba-2.6/Makefile index b10715ae7..323eb2c3f 100644 --- a/target/linux/aruba-2.6/Makefile +++ b/target/linux/aruba-2.6/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/au1000-2.6/Makefile b/target/linux/au1000-2.6/Makefile index ca85b73bc..62d9acbdd 100644 --- a/target/linux/au1000-2.6/Makefile +++ b/target/linux/au1000-2.6/Makefile @@ -10,17 +10,13 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - -$(LINUX_BUILD_DIR)/zImage.flash.srec: $(LINUX_DIR)/vmlinux +define Kernel/BuildImage + $(call Kernel/BuildImage/Default) $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.flash.srec $(LINUX_DIR)/zImage.flash.srec $(CP) $(LINUX_DIR)/arch/mips/boot/compressed/images/zImage.srec $(LINUX_DIR)/zImage.srec +endef + +$(eval $(call BuildKernel)) -compile: $(LINUX_BUILD_DIR)/zImage.flash.srec diff --git a/target/linux/brcm-2.4/Makefile b/target/linux/brcm-2.4/Makefile index 14b73f8f5..e15eb09b5 100644 --- a/target/linux/brcm-2.4/Makefile +++ b/target/linux/brcm-2.4/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.4.32 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/brcm-2.6/Makefile b/target/linux/brcm-2.6/Makefile index 178a2a79c..b2e53bb21 100644 --- a/target/linux/brcm-2.6/Makefile +++ b/target/linux/brcm-2.6/Makefile @@ -10,13 +10,6 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/brcm63xx-2.6/Makefile b/target/linux/brcm63xx-2.6/Makefile index 178a2a79c..323eb2c3f 100644 --- a/target/linux/brcm63xx-2.6/Makefile +++ b/target/linux/brcm63xx-2.6/Makefile @@ -10,13 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/magicbox-2.6/Makefile b/target/linux/magicbox-2.6/Makefile index b10715ae7..323eb2c3f 100644 --- a/target/linux/magicbox-2.6/Makefile +++ b/target/linux/magicbox-2.6/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches $(MAKE_TRACE) - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches $(MAKE_TRACE) - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/rb532-2.6/Makefile b/target/linux/rb532-2.6/Makefile index 4daa728a5..323eb2c3f 100644 --- a/target/linux/rb532-2.6/Makefile +++ b/target/linux/rb532-2.6/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/rdc-2.6/Makefile b/target/linux/rdc-2.6/Makefile index 5dc19cf67..323eb2c3f 100644 --- a/target/linux/rdc-2.6/Makefile +++ b/target/linux/rdc-2.6/Makefile @@ -10,11 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ +$(eval $(call BuildKernel)) diff --git a/target/linux/sibyte-2.6/Makefile b/target/linux/sibyte-2.6/Makefile index 4daa728a5..323eb2c3f 100644 --- a/target/linux/sibyte-2.6/Makefile +++ b/target/linux/sibyte-2.6/Makefile @@ -10,12 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ - +$(eval $(call BuildKernel)) diff --git a/target/linux/uml-2.6/Makefile b/target/linux/uml-2.6/Makefile index 5dc19cf67..323eb2c3f 100644 --- a/target/linux/uml-2.6/Makefile +++ b/target/linux/uml-2.6/Makefile @@ -10,11 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ +$(eval $(call BuildKernel)) diff --git a/target/linux/x86-2.6/Makefile b/target/linux/x86-2.6/Makefile index 5dc19cf67..323eb2c3f 100644 --- a/target/linux/x86-2.6/Makefile +++ b/target/linux/x86-2.6/Makefile @@ -10,11 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ +$(eval $(call BuildKernel)) diff --git a/target/linux/xscale-2.6/Makefile b/target/linux/xscale-2.6/Makefile index 5dc19cf67..323eb2c3f 100644 --- a/target/linux/xscale-2.6/Makefile +++ b/target/linux/xscale-2.6/Makefile @@ -10,11 +10,5 @@ LINUX_VERSION:=2.6.17 LINUX_RELEASE:=1 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e -include ./config include $(INCLUDE_DIR)/kernel-build.mk - -$(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked - [ -d ../generic-$(KERNEL)/patches ] && $(PATCH) $(LINUX_DIR) ../generic-$(KERNEL)/patches - [ -d ./patches ] && $(PATCH) $(LINUX_DIR) ./patches - @$(CP) config $(LINUX_DIR)/.config - touch $@ +$(eval $(call BuildKernel)) -- cgit v1.2.3