-
Notifications
You must be signed in to change notification settings - Fork 4
/
Android.mk.off
57 lines (49 loc) · 2.47 KB
/
Android.mk.off
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#Turn on kernel engineering build as default when TARGET_BUILD_VARIANT is eng, to disable it, add ENG_BLD=0 in build command
ifeq ($(TARGET_BUILD_VARIANT), eng)
ENG_BLD := 1
endif
ifeq ($(TARGET_BUILD_VARIANT), userdebug)
ENG_BLD := 1
endif
ifneq ($(USE_PREBUILT_BSP),yes)
MOTO_PREBUILT_DIR=$(TOPDIR)motorola/bsp/prebuilt/target/images/$(TARGET_PRODUCT)
MOTO_MOD_INSTALL=$(TARGET_OUT)/lib/modules
KERNEL_OUT_DIR=$(PRODUCT_OUT)/obj/PARTITIONS/kernel_intermediates
TARGET_PREBUILT_KERNEL := $(KERNEL_OUT_DIR)/build/arch/arm/boot/zImage
WLAN_DRV_PATH = $(TOPDIR)system/wlan/ti/wilink_6_1/platforms/os/linux
ifneq ($(DO_NOT_REBUILD_THE_KERNEL),1)
.PHONY: $(TARGET_PREBUILT_KERNEL)
endif
ifeq ($(TARGET_PRODUCT), cdma_pittsburgh)
TEST_MUDFLAP=1
BLD_CONF=msm7627_pittsburgh
else
ifeq ($(TARGET_PRODUCT), morrison)
BLD_CONF=msm7x01a_mot
else
BLD_CONF=mapphone
endif
endif
$(TARGET_PREBUILT_KERNEL): $(HOST_OUT_EXECUTABLES)/depmod$(HOST_EXECUTABLE_SUFFIX)
ifeq ($(TARGET_PRODUCT), cdma_pittsburgh)
make -f kernel/kernel.mk TEST_MUDFLAP=$(TEST_MUDFLAP) MOTO_PREBUILT_DIR=$(MOTO_PREBUILT_DIR) BLD_CONF=$(BLD_CONF) KERNEL_OUT_DIR=$(KERNEL_OUT_DIR) DEPMOD=$(HOST_OUT_EXECUTABLES)/depmod$(HOST_EXECUTABLE_SUFFIX) KERNEL_CROSS_COMPILE=$(shell pwd)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin/arm-eabi- ENG_BLD=
else
ifeq ($(TARGET_PRODUCT), morrison)
make -f kernel/kernel.mk TEST_MUDFLAP=$(TEST_MUDFLAP) MOTO_PREBUILT_DIR=$(MOTO_PREBUILT_DIR) BLD_CONF=$(BLD_CONF) KERNEL_OUT_DIR=$(KERNEL_OUT_DIR) DEPMOD=$(HOST_OUT_EXECUTABLES)/depmod$(HOST_EXECUTABLE_SUFFIX) KERNEL_CROSS_COMPILE=$(shell pwd)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin/arm-eabi- ENG_BLD=
else
error error
make -f kernel/kernel.mk MOTO_PREBUILT_DIR=$(MOTO_PREBUILT_DIR) BLD_CONF=$(BLD_CONF) KERNEL_OUT_DIR=$(KERNEL_OUT_DIR) DEPMOD=$(HOST_OUT_EXECUTABLES)/depmod$(HOST_EXECUTABLE_SUFFIX) KERNEL_CROSS_COMPILE=$(shell pwd)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin/arm-eabi- ENG_BLD=$(ENG_BLD)
mkdir -p $(MOTO_MOD_INSTALL)
find $(KERNEL_OUT_DIR)/build/lib/modules -name "*.ko" -exec cp -f {} \
$(MOTO_MOD_INSTALL) \; || true
cp $(WLAN_DRV_PATH)/tiwlan_drv.ko $(MOTO_MOD_INSTALL)
$(TOPDIR)prebuilt/$(HOST_OS)-$(HOST_ARCH)/toolchain/arm-eabi-4.4.0/bin/arm-eabi-strip --strip-debug $(MOTO_MOD_INSTALL)/*.ko
endif
endif
file := $(INSTALLED_KERNEL_TARGET)
ALL_PREBUILT += $(file)
$(file): $(TARGET_PREBUILT_KERNEL) | $(ACP)
$(transform-prebuilt-to-target)
endif
.PHONY: kernel
kernel: $(TARGET_PREBUILT_KERNEL)