cleanup
authorFelix Fietkau <nbd@openwrt.org>
Thu, 19 Oct 2006 05:01:04 +0000 (05:01 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 19 Oct 2006 05:01:04 +0000 (05:01 +0000)
SVN-Revision: 5224

17 files changed:
include/kernel-build.mk
include/kernel.mk
package/kernel/modules/network.mk
target/linux/ar531x-2.4/Makefile
target/linux/ar7-2.4/Makefile
target/linux/aruba-2.6/Makefile
target/linux/au1000-2.6/Makefile
target/linux/brcm-2.4/Makefile
target/linux/brcm-2.6/Makefile
target/linux/brcm63xx-2.6/Makefile
target/linux/magicbox-2.6/Makefile
target/linux/rb532-2.6/Makefile
target/linux/rdc-2.6/Makefile
target/linux/sibyte-2.6/Makefile
target/linux/uml-2.6/Makefile
target/linux/x86-2.6/Makefile
target/linux/xscale-2.6/Makefile

index 0697b79a53e95c025870984780989bb89b69f536..04c3c7f8e6bd0429af91a3faed9c18e249d55a14 100644 (file)
@@ -4,7 +4,10 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+KERNEL_BUILD:=1
+
 include $(INCLUDE_DIR)/host.mk
+include $(INCLUDE_DIR)/kernel.mk
 
 LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.bz2
 LINUX_SITE=http://www.us.kernel.org/pub/linux/kernel/v$(KERNEL) \
@@ -43,7 +46,7 @@ $(LINUX_DIR)/.unpacked: $(DL_DIR)/$(LINUX_SOURCE)
        touch $@
 
 ifeq ($(KERNEL),2.4)
-$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched
+$(LINUX_DIR)/.configured: $(LINUX_DIR)/.patched $(LINUX_DIR)/.config
        $(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
        $(MAKE) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) oldconfig include/linux/compile.h include/linux/version.h
        touch $@
@@ -73,25 +76,22 @@ else
        echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config
 endif
 
-$(LINUX_DIR)/vmlinux: $(LINUX_DIR)/.linux-compile ramdisk-config
+$(LINUX_DIR)/vmlinux: ramdisk-config
        $(MAKE) -j$(CONFIG_JLEVEL) -C $(LINUX_DIR) CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) $(KERNELNAME)
 
 $(LINUX_KERNEL): $(LINUX_DIR)/vmlinux
        $(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $< $@
        touch -c $(LINUX_KERNEL)
 
-$(LINUX_DIR)/.modules_done:
+$(LINUX_DIR)/.modules_done: $(LINUX_DIR)/.config
        rm -rf $(KERNEL_BUILD_DIR)/modules
        $(MAKE) -j$(CONFIG_JLEVEL) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) modules
        $(MAKE) -C "$(LINUX_DIR)" CROSS_COMPILE="$(KERNEL_CROSS)" CC="$(KERNEL_CC)" ARCH=$(LINUX_KARCH) DEPMOD=true INSTALL_MOD_PATH=$(KERNEL_BUILD_DIR)/modules modules_install
        touch $(LINUX_DIR)/.modules_done
 
-modules: $(LINUX_DIR)/.modules_done
-
-$(LINUX_DIR)/.linux-compile:
+$(LINUX_DIR)/.linux-compile: $(LINUX_DIR)/.modules_done
        @rm -f $(BUILD_DIR)/linux
        ln -sf $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) $(BUILD_DIR)/linux
-       @$(MAKE) modules
        touch $@
 
 $(TOPDIR)/.kernel.mk: $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL)/Makefile
@@ -106,7 +106,6 @@ prepare: $(LINUX_DIR)/.configured
        @mkdir -p $(LINUX_DIR)
 
 compile: prepare $(LINUX_DIR)/.linux-compile
-
 install: compile $(LINUX_KERNEL)
 
 mostlyclean: FORCE
index af5d9455fa316be99cd80a92e7ae1a6f2ec76cb9..42c9cdf3a14c9e52fd9fcb8e6e07ea2b657711e2 100644 (file)
@@ -18,11 +18,14 @@ else
      LINUX_VERSION:=$(CONFIG_LINUX_VERSION)
      LINUX_RELEASE:=$(CONFIG_LINUX_RELEASE)
      LINUX_KARCH:=$(CONFIG_LINUX_KARCH)
-  else
+  else 
   # oops, old .kernel.config; rebuild it (hiding the misleading errors this produces)
     $(warning rebuilding .kernel.mk)
     $(TOPDIR)/.kernel.mk: FORCE
-       @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null
+    ifneq ($(KERNEL_BUILD),1)
+      $(TOPDIR)/.kernel.mk:
+               @$(MAKE) -C $(TOPDIR)/target/linux/$(BOARD)-$(KERNEL) $@ &>/dev/null
+    endif
   endif
 
   ifeq ($(KERNEL),2.6)
index 4c82c4cc04a7ac0dbe9b73d9c5386c3e14ffdce4..f3ab2ff700fbe8ae8b142da052d9e06667193275 100644 (file)
@@ -66,7 +66,8 @@ define KernelPackage/ipsec
        - xfrm_user
   SUBMENU:=$(NSMENU)
   DEPENDS:=@LINUX_2_6
-  FILES:=\
+  KCONFIG:=$(CONFIG_NET_KEY)
+  FILES:= \
        $(MODULES_DIR)/kernel/net/key/af_key.$(LINUX_KMOD_SUFFIX) \
        $(MODULES_DIR)/kernel/net/xfrm/xfrm_user.$(LINUX_KMOD_SUFFIX)
 endef
@@ -82,9 +83,11 @@ define KernelPackage/ipsec4
        - ipcomp\\\
        - xfrm4_tunnel
   SUBMENU:=$(NSMENU)
+  KCONFIG:=$(CONFIG_INET_AH)
   DEPENDS:=kmod-ipsec
-  FILES:=\
-       $(MODULES_DIR)/kernel/net/ipv4/{ah4,esp4,ipcomp,xfrm4_tunnel}.$(LINUX_KMOD_SUFFIX)
+  FILES:= $(foreach mod,ah4 esp4 ipcomp xfrm4_tunnel, \
+       $(MODULES_DIR)/kernel/net/ipv4/$(mod).$(LINUX_KMOD_SUFFIX) \
+  )
 endef
 $(eval $(call KernelPackage,ipsec4))
 
@@ -98,9 +101,11 @@ define KernelPackage/ipsec6
        - ipcomp6\\\
        - xfrm6_tunnel
   SUBMENU:=$(NSMENU)
+  KCONFIG:=$(CONFIG_INET6_AH)
   DEPENDS:=kmod-ipsec
-  FILES:=\
-       $(MODULES_DIR)/kernel/net/ipv6/{ah6,esp6,ipcomp6,xfrm6_tunnel}.$(LINUX_KMOD_SUFFIX)
+  FILES:= $(foreach mod,ah6 esp6 ipcomp6 xfrm6_tunnel, \
+       $(MODULES_DIR)/kernel/net/ipv6/{ah6,esp6,ipcomp6,xfrm6_tunnel}.$(LINUX_KMOD_SUFFIX) \
+  )
 endef
 $(eval $(call KernelPackage,ipsec6))
 
index 33cb47cf5076d6cdbbc6d1ccd300587ff373688b..14b73f8f5cdbcd1a2ab0efea35bba648375f9b56 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 92e49d2020f6c257eb8dc5e8405815e1afca7d2b..b220b4c977d998ffb45a568157c861afb1ca97c9 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 7ffd11c668c90be53d7a83f858ea830433ee061e..b10715ae77352a9132cce9cb3cf0d69186a93f6f 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 5d2711cb30b1f447aff6ccc18f94db9b9ab70e24..ca85b73bcaf4e7bd1bcdfcd1714b05894b0ba4c9 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 33cb47cf5076d6cdbbc6d1ccd300587ff373688b..14b73f8f5cdbcd1a2ab0efea35bba648375f9b56 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=38f4d0830e95a20f4bfed17622d5557c
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 0437338e8e221eb888e17251994816c3cb203554..178a2a79c215fb1ee7e0166c2797a0e4528daa90 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 
index 0437338e8e221eb888e17251994816c3cb203554..178a2a79c215fb1ee7e0166c2797a0e4528daa90 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 
index 7ffd11c668c90be53d7a83f858ea830433ee061e..b10715ae77352a9132cce9cb3cf0d69186a93f6f 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 30fa1a85a12def00ea93d38a120d730dd8b7b3e7..4daa728a5ad359aac455ce9986ae8613320b0fb6 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 59f02b33404279264126f534b6c85d937a91e012..5dc19cf679161e43c9f3f86f2112a6146a6a891b 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 30fa1a85a12def00ea93d38a120d730dd8b7b3e7..4daa728a5ad359aac455ce9986ae8613320b0fb6 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 59f02b33404279264126f534b6c85d937a91e012..5dc19cf679161e43c9f3f86f2112a6146a6a891b 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 59f02b33404279264126f534b6c85d937a91e012..5dc19cf679161e43c9f3f86f2112a6146a6a891b 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked
index 59f02b33404279264126f534b6c85d937a91e012..5dc19cf679161e43c9f3f86f2112a6146a6a891b 100644 (file)
@@ -11,7 +11,6 @@ LINUX_RELEASE:=1
 LINUX_KERNEL_MD5SUM:=37ddefe96625502161f075b9d907f21e
 
 include ./config
-include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/kernel-build.mk
 
 $(LINUX_DIR)/.patched: $(LINUX_DIR)/.unpacked