Android build boot. img (2): Copy and package kernel

Source: Internet
Author: User

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"
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.