在vendor/xxxxx/AndroidBoard.mk中追加如下一行
include $(LOCAL_PATH)/kernel.mk
然后将kernel.mk脚本放到该xxxxx目录下
kernel.mk.rar - ifneq ($(TARGET_NO_KERNEL),true)
-
-
BOARD_KERNEL_BASE ?= 0x0
-
KERNEL_PATH ?= kernel
-
KERNEL_CPU ?= at91rm9200dk
-
KERNEL_CONFIG ?= $(KERNEL_CPU)_defconfig
-
KERNEL_OUTPUT ?= $(shell pwd)/$(TARGET_OUT_INTERMEDIATES)/KERNEL#$(KERNEL_PATH)#$(HOME)/xxxxluther.gliethttpxxxxx
-
-
TARGET_OUT_INTERMEDIATES ?= out/target/luther.gliethttp.product/obj
-
HOST_PREBUILT_TAG ?= linux-x86
-
ifeq ($(strip $(CROSS_COMPILE)),)
-
KERNEL_CROSS_COMPILE_PATH = $(shell pwd)/prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.0/bin/
-
KERNEL_CROSS_COMPILE := arm-eabi-
-
else
-
KERNEL_CROSS_COMPILE_PATH = ./
-
KERNEL_CROSS_COMPILE := $(CROSS_COMPILE)
-
endif
-
MAKE_JOBS ?= 8
-
TARGET_ARCH ?= arm
-
-
KERNEL_DOTCONFIG_DEP = $(KERNEL_PATH)/arch/$(TARGET_ARCH)/configs/$(KERNEL_CONFIG)
-
KERNEL_DOTCONFIG = $(KERNEL_OUTPUT)/.config
-
TARGET_PREBUILT_KERNEL = $(KERNEL_OUTPUT)/arch/$(TARGET_ARCH)/boot/Image
-
-
ifeq (,$(shell [ -f $(KERNEL_PATH)/init/main.c ] && echo 'y'))
-
define kernel-make
-
echo >/dev/null 2>&1
-
endef
-
else
-
#$(shell rm -f $(TARGET_PREBUILT_KERNEL) 2>&1 >/dev/null)
-
ifneq ($(KERNEL_OUTPUT),$(KERNEL_PATH))
-
define kernel-make
-
export PATH=$(KERNEL_CROSS_COMPILE_PATH):${PATH}; \
-
$(MAKE) -j$(MAKE_JOBS) -C $(KERNEL_PATH) \
-
ARCH=$(TARGET_ARCH) \
-
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
-
O=$(KERNEL_OUTPUT) \
-
$(if $(SHOW_COMMANDS),V=1)
-
endef
-
else
-
define kernel-make
-
export PATH=$(KERNEL_CROSS_COMPILE_PATH):${PATH}; \
-
$(MAKE) -j$(MAKE_JOBS) -C $(KERNEL_PATH) \
-
ARCH=$(TARGET_ARCH) \
-
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
-
$(if $(SHOW_COMMANDS),V=1)
-
endef
-
endif
-
endif
-
-
$(TARGET_PREBUILT_KERNEL): KERNEL_EXIST $(KERNEL_DOTCONFIG)
-
$(hide) $(kernel-make) zImage modules
-
-
$(KERNEL_DOTCONFIG): $(KERNEL_DOTCONFIG_DEP)
-
@mkdir -p $(KERNEL_OUTPUT)
-
@if [ ! -f $(KERNEL_OUTPUT)/.config ]; then \
-
echo "creating kernel config -- $(KERNEL_CONFIG)"; \
-
$(kernel-make) $(KERNEL_CONFIG); \
-
else \
-
echo ".config is ready"; \
-
fi
-
-
KERNEL_EXIST:
-
@if [ "$(KERNEL_PATH)" != "$(KERNEL_OUTPUT)" ] && \
-
[ -f $(KERNEL_PATH)/.config -o -d $(KERNEL_PATH)/include/config ]; then \
-
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; \
-
echo; \
-
echo "Force clean $(shell pwd)/$(KERNEL_PATH)"; \
-
echo; \
-
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; \
-
cd $(KERNEL_PATH); $(MAKE) -j$(MAKE_JOBS) mrproper; cd - 2>&1 >/dev/null; \
-
fi
-
-
$(INSTALLED_KERNEL_TARGET): $(TARGET_PREBUILT_KERNEL) | $(ACP)
-
# $(transform-prebuilt-to-target)
-
$(copy-file-to-target)
-
-
kernel: $(INSTALLED_KERNEL_TARGET)
-
-
#ALL_PREBUILT += $(INSTALLED_KERNEL_TARGET)
-
-
endif
阅读(5084) | 评论(0) | 转发(0) |