Ramdisk. img, one of the components of boot. img, has been analyzed above. Another important component of boot. img is the kernel,
The kernel mentioned here can only be understood as the kernel file located in out/target/product/tcc8800/. This article mainly analyzes the copy of the kernel
Process and how to package it into boot. img. After analysis, it is found that the kernel file located in out/target/product/tcc8800/is actually the kernel
The compiled Image file is located in the kernel/arch/arm/boot directory. The clue is this Image file. A definition is found after searching:
LOCAL_KERNEL: = kernel/arch/arm/boot/Image
The definition is located in devices/telechips/tcc88xx-common/BoardConfigCommon. mk, followed by Android. mk in the same directory
The following definition is provided:
PRODUCT_COPY_FILES + = \
$ (LOCAL_KERNEL): kernel
It is intended to copy the Image file and rename it as the kernel. Subsequent copy settings are completed in build/core/Makefile and omitted here.
After the copy is complete, how does one package the kernel File into boot. img? The following content also exists in build/core/Makefile:
INTERNAL_BOOTIMAGE_ARGS: =... -- kernel $ (INSTALLED_KERNEL_TARGET)
The problem is to check the definition of INSTALLED_KERNEL_TARGET. The macro is located in build/target/board/Android. mk:
INSTALLED_KERNEL_TARGET: = $ (PRODUCT_OUT)/kernel
The content is obvious, so far, the kernel Image is in place.
In addition, the definition of INSTALL_KERNEL_TARGET is a little strange in build/target/board/Android. mk,
Build/target/board/Android. mk is extracted from main. mk using subdir_makefiles and included in main. mk.
Author: "Weike's blog"