aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel.mk
blob: 39f9cc0c9c6e322dc220002811e5bd4f10c54749 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ifneq ($(DUMP),1)
include $(BUILD_DIR)/kernel.mk

KERNEL:=unknown
ifneq (,$(findstring 2.4.,$(LINUX_VERSION)))
KERNEL:=2.4
LINUX_KMOD_SUFFIX=o
endif
ifneq (,$(findstring 2.6.,$(LINUX_VERSION)))
KERNEL:=2.6
LINUX_KMOD_SUFFIX=ko
endif

LINUX_KARCH:=$(shell echo $(ARCH) | sed -e 's/i[3-9]86/i386/' \
	-e 's/mipsel/mips/' \
	-e 's/mipseb/mips/' \
	-e 's/powerpc/ppc/' \
	-e 's/sh[234]/sh/' \
	-e 's/armeb/arm/' \
)

KERNEL_BUILD_DIR:=$(BUILD_DIR)/linux-$(KERNEL)-$(BOARD)
ifeq ($(LINUX_NAME),)
LINUX_NAME:=linux-$(LINUX_VERSION)
endif
LINUX_DIR := $(KERNEL_BUILD_DIR)/$(LINUX_NAME)

KMOD_BUILD_DIR := $(KERNEL_BUILD_DIR)/linux-modules
MODULES_DIR := $(KERNEL_BUILD_DIR)/modules/$(MODULES_SUBDIR)
TARGET_MODULES_DIR := $(LINUX_TARGET_DIR)/$(MODULES_SUBDIR)
endif