build
修订版 | d60b379e2e9e1fe97d2e733a9999a86f9818241b (tree) |
---|---|
时间 | 2011-12-29 15:22:52 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
kernel.mk: allow to specify KERNEL_DIR
@@ -10,6 +10,8 @@ | ||
10 | 10 | |
11 | 11 | ifeq ($(TARGET_PREBUILT_KERNEL),) |
12 | 12 | |
13 | +KERNEL_DIR ?= kernel | |
14 | + | |
13 | 15 | ifeq ($(TARGET_ARCH),x86) |
14 | 16 | KERNEL_TARGET := bzImage |
15 | 17 | TARGET_KERNEL_CONFIG ?= android-x86_defconfig |
@@ -20,7 +22,7 @@ TARGET_KERNEL_CONFIG ?= goldfish_defconfig | ||
20 | 22 | endif |
21 | 23 | |
22 | 24 | KBUILD_OUTPUT := $(CURDIR)/$(TARGET_OUT_INTERMEDIATES)/kernel |
23 | -mk_kernel := + $(hide) $(MAKE) -C kernel O=$(KBUILD_OUTPUT) ARCH=$(TARGET_ARCH) $(if $(SHOW_COMMANDS),V=1) | |
25 | +mk_kernel := + $(hide) $(MAKE) -C $(KERNEL_DIR) O=$(KBUILD_OUTPUT) ARCH=$(TARGET_ARCH) $(if $(SHOW_COMMANDS),V=1) | |
24 | 26 | ifneq ($(TARGET_ARCH),$(HOST_ARCH)) |
25 | 27 | mk_kernel += CROSS_COMPILE=$(CURDIR)/$(TARGET_TOOLS_PREFIX) |
26 | 28 | endif |
@@ -28,7 +30,7 @@ endif | ||
28 | 30 | ifneq ($(wildcard $(TARGET_KERNEL_CONFIG)),) |
29 | 31 | KERNEL_CONFIG_FILE := $(TARGET_KERNEL_CONFIG) |
30 | 32 | else |
31 | -KERNEL_CONFIG_FILE := kernel/arch/$(TARGET_ARCH)/configs/$(TARGET_KERNEL_CONFIG) | |
33 | +KERNEL_CONFIG_FILE := $(KERNEL_DIR)/arch/$(TARGET_ARCH)/configs/$(TARGET_KERNEL_CONFIG) | |
32 | 34 | endif |
33 | 35 | MOD_ENABLED := $(shell grep ^CONFIG_MODULES=y $(KERNEL_CONFIG_FILE)) |
34 | 36 | FIRMWARE_ENABLED := $(shell grep ^CONFIG_FIRMWARE_IN_KERNEL=y $(KERNEL_CONFIG_FILE)) |
@@ -54,8 +56,8 @@ $(INSTALLED_KERNEL_TARGET): $(KERNEL_DOTCONFIG_FILE) | ||
54 | 56 | # based on broadcomsetup.sh of Kyle Evans |
55 | 57 | WL_ENABLED := $(shell grep ^CONFIG_WL=[my] $(KERNEL_CONFIG_FILE)) |
56 | 58 | WL_PATH := drivers/net/wireless/wl |
57 | -WL_SRC := kernel/$(WL_PATH)/hybrid-portsrc_x86_32-v5_100_82_112.tar.gz | |
58 | -WL_MK := kernel/$(WL_PATH)/Makefile | |
59 | +WL_SRC := $(KERNEL_DIR)/$(WL_PATH)/hybrid-portsrc_x86_32-v5_100_82_112.tar.gz | |
60 | +WL_MK := $(KERNEL_DIR)/$(WL_PATH)/Makefile | |
59 | 61 | $(WL_SRC): |
60 | 62 | @echo Downloading $(@F)... |
61 | 63 | $(hide) curl http://www.broadcom.com/docs/linux_sta/$(@F) > $@ |