3420 views|1 replies

88

Posts

0

Resources
The OP
 

Android4.4.2 source code compilation-iMX6Q/D core board-non-device tree source code [Copy link]

5.3.1 Android source code overall compilation - based on Xunwei-IMX6 development board series
This section introduces how to compile Android source code as a whole, that is, compile uboot, kernel, and Android image
all at once .
Note: When compiling the Android system, it is necessary to ensure that more than 4G of memory is
provided to the Ubuntu
system. Here, "providing more than 4G of memory" does not only mean setting up and allocating 4G of memory in the VMware Workstations virtual machine. For example, when the user is compiling, the PC's memory is a total of 6G, and 4G of memory is set in the virtual machine. However, under
the Windows system, QQ, antivirus software, music player, browser, etc. are running, so the memory
occupied is almost 2G, then the virtual machine will automatically adjust to occupy only 2G, or even less than 2G of memory, so it
may not be compiled.
The correct way to allocate memory is to first allocate more than 4G of memory to the virtual machine, and then turn off as
many unnecessary applications as possible under Windows, and turn off as many background programs of applications as possible.
Of course, if the user's PC has 8G or 16G of memory, it is up to you.
The Android source code is in the CD directory "04_Source_Android4.4 File System". The compressed package is first
decompressed in Windows, and then a separate compressed package "iTOP-iMX6_android4.4.2_20160904.tar.gz" is obtained.
Decompress the "iTOP-iMX6_android4.4.2_20160904.tar.gz" compressed package to Ubuntu (the author
created a new imx6 directory in the /home directory, and copied and decompressed the source code to the imx6 directory). Note: The decompression
command
, including the decompression command later, may have a slightly different date in the compressed package. Users should adjust it according to actual conditions.

Use the decompression command "tar -vxf iTOP-iMX6_android4.4.2_20160904.tar.gz" to decompress the source code, as
shown in the figure below.
After decompression, you will get the "iTOP-iMX6_android4.4.2" folder, as shown in the figure below.
Use the command "cd iTOP-iMX6_android4.4.2" to enter the "iTOP-iMX6_android4.4.2" directory,
as shown in the figure below.
As shown in the figure below, use the ls command to see the compilation script "create.sh".
Run the script "./create.sh" to compile uboot, kernel, and
Android file system for commercial core boards, as shown in the figure below.
Note! If you want to compile uboot, kernel, and Android file system for industrial core boards,
you need to add the parameter "1GDDR" when compiling, that is: "./create.sh 1GDDR", as shown in the figure below. (1. To support
industrial core boards, the source code version must be 20180706 and later. 2. The screenshot below is
different . You don't need to worry about it. You just need to know that when compiling the source code for industrial core boards, you need to add parameters. The other steps
are exactly the same.)
As shown in the figure below, start compiling.
Compilation is complete, as shown in the figure below.
After the compilation is complete, use the command "cd out/target/product/topeet_6dq" to enter the image directory. Use the ls command to see that "u-boot.bin", "boot.img", "system.img", "recovery.img" and other image files
are generated . 5.3.2 Separate compilation The previous section introduced the overall compilation of Android. This section introduces the separate compilation of uboot and kernel. 5.3.2.1 Compile uboot separately Enter the "iTOP-iMX6_android4.4.2/bootable/bootloader/uboot-imx" directory obtained by decompressing the source code , as shown in the figure below, and you can see the script "build_uboot.sh". If you have not executed the "5.3.1 Android source code overall compilation" section, you can configure the compilation file before running the separate compilation script. ①: For commercial core board: enter the directory "board/freescale/mx6q_topeet/", cp flash_header.S_2G flash_header.S enter the directory "include/configs", cp mx6q_topeet.h_2G mx6q_topeet.h ②: For industrial core board: enter the directory "board/freescale/mx6q_topeet/", cp flash_header.S_1G flash_header.S enter the directory "include/configs", cp mx6q_topeet.h_1G mx6q_topeet.h


















After the configuration is complete, run the script "build_uboot.sh" to start compiling uboot separately. As shown in the figure below.
As shown in the figure below, the compilation is complete.
As shown in the figure below, the "u-boot.bin" file is generated, which is the image of uboot. All
systems of the iTOP-iMX6 development board use a set of uboot source code and image.
5.3.2.2 Compile the kernel separately
To compile the kernel separately, enter the "iTOP-iMX6_android4.4.2/kernel_imx"
directory
, as shown in the figure below. As shown in the figure below, use the command "./build_android_kernel.sh" to start compiling the kernel.
As shown in the figure below, start compiling.
As shown in the figure below, the compilation is complete.
As shown in the figure below, uImage is generated in the "iTOP-iMX6_android4.4.2/kernel_imx/arch/arm/boot" directory
, which is the kernel image. However, the kernel burning file of iMX6 is special and needs to be packaged and compressed again,
so it is necessary to re-run the overall compilation script "create.sh" of android to generate "boot.img".
After android is compiled once, the subsequent compilation will be very fast.
For more content, please follow Xunwei Electronics

This post is from Embedded System

Latest reply

When making and pasting, don't paste the format, it will look neat   Details Published on 2020-4-23 14:46

79

Posts

723

Resources
2
 

When making and pasting, don't paste the format, it will look neat

This post is from Embedded System
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list