forked from benoitm974/cink-peax
-
Notifications
You must be signed in to change notification settings - Fork 3
/
s9091.mk
40 lines (30 loc) · 2.17 KB
/
s9091.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
MY_KERNEL_OUT := $(ANDROID_BUILD_TOP)/$(KERNEL_SRC)/out
MEDIATEK_PATH := ${KERNEL_SRC}/../mediatek/
#MY_MAKE := $(KERNEL_SRC)/../mymake TARGET_PRODUCT=tinnoes77_s9091 MTK_ROOT_CUSTOM=$(ANDROID_BUILD_TOP)/$(KERNEL_SRC)/../mediatek/custom KBUILD_OUTPUT_SUPPORT=yes -j8
MY_MAKE := $(MAKE) TARGET_PRODUCT=tinnoes77_s9091 MTK_ROOT_CUSTOM=$(ANDROID_BUILD_TOP)/$(KERNEL_SRC)/../mediatek/custom KBUILD_OUTPUT_SUPPORT=yes
MY_ARM_CROSS_COMPILE := CROSS_COMPILE=$(ANDROID_BUILD_TOP)/prebuilt/linux-x86/toolchain/$(TARGET_KERNEL_CUSTOM_TOOLCHAIN)/bin/$(TARGET_KERNEL_CUSTOM_TOOLCHAIN_BIN)
$(MY_KERNEL_OUT):
#We can't use the symlink because this breaks the build
#test -d $(MY_KERNEL_OUT) || ln -s $(KERNEL_OUT) $(MY_KERNEL_OUT)
test -d $(MY_KERNEL_OUT) || mkdir -p $(MY_KERNEL_OUT)
mkdir -p ${MY_KERNEL_OUT}/mediatek
$(KERNEL_CONFIG): $(MY_KERNEL_OUT)
#cp -r $(KERNEL_SRC)/../output_files/* $(MY_KERNEL_OUT)/
${KERNEL_SRC}/../copy_modules ${KERNEL_SRC}/../mediatek ${MY_KERNEL_OUT}/mediatek
$(MY_MAKE) -C $(KERNEL_SRC) O=$(MY_KERNEL_OUT) ARCH=$(TARGET_ARCH) $(MY_ARM_CROSS_COMPILE) $(TARGET_KERNEL_CONFIG)
cp $(KERNEL_SRC)/$(TARGET_KERNEL_CONFIG) $(MY_KERNEL_OUT)/.config
$(MY_KERNEL_OUT)/piggy : $(TARGET_PREBUILT_INT_KERNEL)
$(hide) gunzip -c $(MY_KERNEL_OUT)/arch/$(TARGET_ARCH)/boot/compressed/piggy.gzip > $(MY_KERNEL_OUT)/piggy
TARGET_KERNEL_BINARIES: $(MY_KERNEL_OUT) $(KERNEL_CONFIG) $(KERNEL_HEADERS_INSTALL)
$(MY_MAKE) -C $(KERNEL_SRC) O=$(MY_KERNEL_OUT) ARCH=$(TARGET_ARCH) $(MY_ARM_CROSS_COMPILE) $(TARGET_PREBUILT_INT_KERNEL_TYPE)
$(MY_MAKE) -C $(KERNEL_SRC) O=$(MY_KERNEL_OUT) ARCH=$(TARGET_ARCH) $(MY_ARM_CROSS_COMPILE) modules
$(MY_MAKE) -C $(KERNEL_SRC) O=$(MY_KERNEL_OUT) INSTALL_MOD_PATH=$(KERNEL_OUT)/../../$(KERNEL_MODULES_INSTALL) ARCH=$(TARGET_ARCH) $(MY_ARM_CROSS_COMPILE) modules_install
cp -r $(MY_KERNEL_OUT)/* $(KERNEL_OUT)
$(mv-modules)
$(clean-module-folder)
$(TARGET_KERNEL_MODULES): TARGET_KERNEL_BINARIES
$(TARGET_PREBUILT_INT_KERNEL): $(TARGET_KERNEL_MODULES)
$(mv-modules)
$(clean-module-folder)
$(KERNEL_HEADERS_INSTALL): $(MY_KERNEL_OUT) $(KERNEL_CONFIG)
$(MY_MAKE) -C $(KERNEL_SRC) O=$(MY_KERNEL_OUT) ARCH=$(TARGET_ARCH) $(MY_ARM_CROSS_COMPILE) headers_install