forked from aosp-mirror/kernel_common
-
Notifications
You must be signed in to change notification settings - Fork 16
/
AndroidKernel.mk
27 lines (21 loc) · 1.4 KB
/
AndroidKernel.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
# This makefile is included from vendor/intel/*/AndroidBoard.mk.
# If the kernel source is present, AndroidBoard.mk will perform a kernel build
# otherise, AndroidBoard.mk will find the kernel binaries in a tarball.
# This can be overridden on the make command line.
TARGET_KERNEL_SOURCE_IS_PRESENT ?= true
.PHONY: get_kernel_from_source menuconfig
ifeq ($(BOARD_USE_64BIT_KERNEL),true)
KERNEL_BUILD_FLAGS := -B
endif
#menuconfig get_kernel_from_source: openssl $(MINIGZIP)
# +TARGET_TOOLS_PREFIX="$(ANDROID_BUILD_TOP)/$(TARGET_TOOLS_PREFIX)" TARGET_DEVICE="$(TARGET_DEVICE)" TARGET_BOARD_PLATFORM="$(TARGET_BOARD_PLATFORM)" KERNEL_SRC_DIR="$(KERNEL_SRC_DIR)" DIFFCONFIGS="$(DIFFCONFIGS)" KERNEL_DIFFCONFIG_DIR="$(KERNEL_DIFFCONFIG_DIR)" PRODUCT_OUT=`pwd`/$(PRODUCT_OUT) vendor/intel/support/kernel-build.sh $(KERNEL_BUILD_FLAGS) -o $@
# This rule is useful for creating a kernel that will be
# shared with a tree that does not have kernel source.
make_kernel_tarball: get_kernel_from_source bootimage
@echo Building kernel tarball: $(TARGET_KERNEL_TARBALL)
@rm -rf $(PRODUCT_OUT)/kerneltarball
@mkdir -p $(PRODUCT_OUT)/kerneltarball/root/lib/modules
@cp $(PRODUCT_OUT)/root/lib/modules/* $(PRODUCT_OUT)/kerneltarball/lib/modules
@cp $(PRODUCT_OUT)/bzImage $(PRODUCT_OUT)/kerneltarball/
tar cvzf $(TARGET_KERNEL_TARBALL) -C $(PRODUCT_OUT)/kerneltarball bzImage root/lib/modules
$(PRODUCT_OUT)/bzImage: get_kernel_from_source