这是构建
Android 14
源代码时的警告消息:
build/make/core/Makefile:4889: warning: Neither INSTALLED_KERNEL_TARGET nor INSTALLED_BOOTIMAGE_TARGET is defined when PRODUCT_O
TA_ENFORCE_VINTF_KERNEL_REQUIREMENTS is true. Information about the updated kernel cannot be built into OTA update package. You
can fix this by: (1) setting TARGET_NO_KERNEL to false and installing the built kernel to out/target/product/generic_arm64/kern
el, so that kernel information will be extracted from the built kernel; or (2) Add a prebuilt boot image and specify it in BOARD
_PREBUILT_BOOTIMAGE; or (3) extracting kernel configuration and defining BOARD_KERNEL_CONFIG_FILE and BOARD_KERNEL_VERSION manua
lly; or (4) unsetting PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS manually.
这里是源代码:
build/make/core/Makefile
ifneq ($(strip $(TARGET_NO_KERNEL)),true)
ifneq ($(strip $(BOARD_KERNEL_BINARIES)),)
INSTALLED_KERNEL_TARGET := $(foreach k,$(BOARD_KERNEL_BINARIES), \
$(PRODUCT_OUT)/$(k))
else
INSTALLED_KERNEL_TARGET := $(PRODUCT_OUT)/kernel
endif
else
INSTALLED_KERNEL_TARGET :=
endif
设置
TARGET_NO_KERNEL = true
的正确方法是什么?那么在哪里设置呢?
要将
TARGET_NO_KERNEL
设置为 true
,您可以将以下行添加到您的 BoardConfig.mk
文件中:
TARGET_NO_KERNEL := true
这会将
TARGET_NO_KERNEL
标志设置为 true
。您还可以通过添加以下行在 Android.mk
文件中设置此标志:
LOCAL_KERNEL := <path-to-your-kernel>
您可以将
<path-to-your-kernel>
替换为内核的路径。这会将构建的内核安装到out/target/product/generic_arm64/kernel
,以便从构建的内核中提取内核信息1.