forked from AnClark/kernel-huawei-p6
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Android.mk
61 lines (44 loc) · 2.58 KB
/
Android.mk
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
58
59
60
61
#Android makefile to build kernel as a part of Android Build
#ifeq ($(TARGET_PREBUILT_KERNEL),)
KERNEL_OUT := $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ
KERNEL_CONFIG := $(KERNEL_OUT)/.config
TARGET_PREBUILT_KERNEL := $(KERNEL_OUT)/arch/arm/boot/zImage
KERNEL_ARCH_ARM_CONFIGS := kernel/arch/arm/configs
#KERNEL_GEN_CONFIG_FILE := huawei_k3v2oem1_$(HW_PRODUCT)_defconfig
#KERNEL_GEN_CONFIG_PATH := $(KERNEL_ARCH_ARM_CONFIGS)/$(KERNEL_GEN_CONFIG_FILE)
KERNEL_COMMON_DEFCONFIG := $(KERNEL_ARCH_ARM_CONFIGS)/$(KERNEL_DEFCONFIG)
#KERNEL_PRODUCT_CONFIGS := device/hisi/k3v2oem1/product_spec/kernel_config/$(HW_PRODUCT)
KERNEL_DEBUG_CONFIGS := $(KERNEL_ARCH_ARM_CONFIGS)/debug
#$(shell cd device/hisi/customize/hsad;./xml2complete.sh > /dev/null)
#$(shell cd kernel/drivers/huawei/hsad;./xml2code.sh)
#add debug-kernel-config file generation rules by z00175161
ifeq ($(TARGET_BUILD_TYPE),release)
KERNEL_DEBUG_CONFIGFILE := $(KERNEL_COMMON_DEFCONFIG)
$(KERNEL_DEBUG_CONFIGFILE):FORCE
echo "do nothing. Configuration is already provided by Surdupetru"
else
KERNEL_DEBUG_CONFIGFILE := $(KERNEL_ARCH_ARM_CONFIGS)/huawei_k3v2oem1_$(HW_PRODUCT)_debug_defconfig
$(KERNEL_DEBUG_CONFIGFILE):FORCE
#$(shell device/hisi/k3v2oem1/kernel-config.sh -f $(KERNEL_COMMON_DEFCONFIG) -d $(KERNEL_DEBUG_CONFIGS) -o $(KERNEL_DEBUG_CONFIGFILE))
echo "do nothing. Configuration is already provided by Surdupetru. No need to generate again."
endif
ifeq ($(KERNEL_DEBUG_CONFIGFILE),$(KERNEL_COMMON_DEFCONFIG))
KERNEL_TOBECLEAN_CONFIGFILE :=
else
KERNEL_TOBECLEAN_CONFIGFILE := $(KERNEL_DEBUG_CONFIGFILE)
endif
$(KERNEL_OUT):
mkdir -p $(KERNEL_OUT)
$(KERNEL_GEN_CONFIG_PATH): $(KERNEL_DEBUG_CONFIGFILE)
#$(shell device/hisi/k3v2oem1/kernel-config.sh -f $(KERNEL_DEBUG_CONFIGFILE) -d $(KERNEL_PRODUCT_CONFIGS) -o $(KERNEL_GEN_CONFIG_PATH))
echo "do nothing. Configuration is already provided by Surdupetru. No need to generate again."
$(KERNEL_CONFIG): $(KERNEL_OUT) $(KERNEL_GEN_CONFIG_PATH)
$(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- $(KERNEL_GEN_CONFIG_FILE)
@rm -frv $(KERNEL_GEN_CONFIG_PATH)
@rm -frv $(KERNEL_TOBECLEAN_CONFIGFILE)
#$(TARGET_PREBUILT_KERNEL): $(KERNEL_CONFIG)
# $(hide) $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- -j 18
# $(hide) $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- -j 18 zImage
kernelconfig: $(KERNEL_OUT) $(KERNEL_GEN_CONFIG_PATH)
$(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- $(KERNEL_GEN_CONFIG_FILE) menuconfig
@rm -frv $(KERNEL_GEN_CONFIG_PATH)