Android M 6.0 Build about 64-bit (__arm64__)

Source: Internet
Author: User

Compilation of Android M

For the new version of Android system (6.0 start?? ), at compile time, it is supported to compile the Binaries of two CPU architectures (i.e., 32-bit and 64-bit)at the same time, which is called "Multilib build".

For native static libraries and shared libraries, the compilation system compiles Binary of two architectures at the same time.

Product_packages will decide which binary will be put into System Image.

The system defaults to the compiled 64-bit version, which can be customized by modifying the boardconfig.mk file.

Product configuration (entire system)

In Boardconfig.mk, the following variables can be configured second CPU architecture and ABI (Application binary interface):

Target_2nd_archtarget_2nd_arch_varianttarget_2nd_cpu_varianttarget_2nd_cpu_abitarget_2nd_cpu_abi2

Take Build/target/board/generic_arm64/boardconfig.mk as an example:

Target_no_bootloader: = truetarget_no_kernel:= truetarget_arch: = arm64target_arch_variant: = armv8-atarget_cpu_variant:= Generictarget_cpu_abi:= Arm64-v8atarget_2nd_arch:= Armtarget_2nd_cpu_abi:= armeabi-v7atarget_2nd_cpu_abi2:= Armeabi

If you want to change to a default compiled 32-bit system, you can set the following variables:

Target_prefer_32_bit: = True

Configuring the module in ANDROID.MK

In the andorid.mk of a module, the local_multilib variable can be used to override the Target_prefer_32_bit set by the system .

Local_multilib can be set to:

"Both"    //Build both 32-bit and-bit"+"/       /Build-bit"+"       //Build-bit" First "for     devicedevice") "           

You can also compile Binaries for the specified schema by using the "local_module_target_arch" variable for the specified schema:

: = arm

Reference documents:

https://source.android.com/source/64-bit-builds.html (please fq~~~ yourself)https://www.ibm.com/developerworks/cn/opensource/os-cn-android-build/

Android M 6.0 Build about 64-bit (__arm64__)

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.