update to 2.6.28.5
[openwrt/openwrt.git] / include / kernel.mk
index 7d986e4597ebbe0fd09c443fa58abebd0d50e5f4..28567776adec2182daef034aa927c221f7d1ba52 100644 (file)
@@ -31,7 +31,7 @@ else
   endif
 
   PATCH_DIR ?= ./patches$(shell [ -d "./patches-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
-  FILES_DIR ?= ./files$(shell [ -d "./files-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
+  FILES_DIR ?= $(foreach dir,$(wildcard ./files ./files-$(KERNEL_PATCHVER)),"$(dir)")
   KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX))
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
 
@@ -53,7 +53,7 @@ ifneq (,$(findstring uml,$(BOARD)))
   LINUX_KARCH:=um
 else
   ifeq (,$(LINUX_KARCH))
-    LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
+    LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/x86/' \
          -e 's/mipsel/mips/' \
          -e 's/mipseb/mips/' \
          -e 's/sh[234]/sh/' \
@@ -126,7 +126,9 @@ $(call KernelPackage/$(1)/config)
     endef
   endif
 
-  ifneq ($(if $(KCONFIG),$(filter m,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),)
+  $(STAMP_BUILT): $(LINUX_DIR)/.config
+
+  ifneq ($(if $(filter-out %=y %=n %=m,$(KCONFIG)),$(filter m,$(foreach c,$(filter-out %=y %=n %=m,$(KCONFIG)),$($(c)))),.),)
     ifneq ($(strip $(FILES)),)
       define Package/kmod-$(1)/install
                  mkdir -p $$(1)/lib/modules/$(LINUX_VERSION)