diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-24 21:42:33 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-24 21:42:33 +0000 |
commit | c556e48ee51e0e9a939f82efbe049b02b4e5a522 (patch) | |
tree | e4aac5fec529355c22fd98abb24d2a44cdfc8c23 /include/kernel.mk | |
parent | 3fb6c82409643f7783a701d9acadb926ba902433 (diff) |
kernel.mk: Fix kernel module path for 3.0
Linux 3.0 calls itself 3.0.0, so insmod expects the modules in
/lib/modules/3.0.0.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27761 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'include/kernel.mk')
-rw-r--r-- | include/kernel.mk | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/kernel.mk b/include/kernel.mk index e120cef1f..a2dce091e 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -33,7 +33,12 @@ else KERNEL_BUILD_DIR ?= $(BUILD_DIR_BASE)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))$(if $(BUILD_SUFFIX),_$(BUILD_SUFFIX)) LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) - MODULES_SUBDIR:=lib/modules/$(LINUX_VERSION) + LINUX_UNAME_VERSION:=$(if $(word 3,$(subst ., ,$(KERNEL_BASE))),$(KERNEL_BASE),$(KERNEL_BASE).0) + ifneq ($(findstring -rc,$(LINUX_VERSION)),) + LINUX_UNAME_VERSION:=$(LINUX_UNAME_VERSION)-$(strip $(lastword $(subst -, ,$(LINUX_VERSION)))) + endif + + MODULES_SUBDIR:=lib/modules/$(LINUX_UNAME_VERSION) TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR) LINUX_KERNEL:=$(KERNEL_BUILD_DIR)/vmlinux @@ -139,8 +144,8 @@ $(call KernelPackage/$(1)/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) - $(CP) -L $$(FILES) $$(1)/lib/modules/$(LINUX_VERSION)/ + mkdir -p $$(1)/$(MODULES_SUBDIR) + $(CP) -L $$(FILES) $$(1)/$(MODULES_SUBDIR)/ $(call ModuleAutoLoad,$(1),$$(1),$(AUTOLOAD)) $(call KernelPackage/$(1)/install,$$(1)) endef |