Android 9.0 compilation and development based on i.mx8 development board

Android has attracted extensive market attention with its rich ecological environment and fast application development and distribution. Mir's latest myd-jx8mx core board and development board based on NXP imx8 processor also provides Android 9.0 support. Next, we will introduce how to compile Android 9.0 from the source code.

i. Introduction to mx8 development board http://www.myir-tech.com/product/myc-jx8mx.htm Please add a link description

Deploy development environment

The Linux operating system needs to be installed on the PC before development. It is recommended to use Ubuntu 16.04 64bit distribution, 8g memory and more than 500g free hard disk. Connect the network cable and configure the network. Subsequent operations need to connect to the Internet to install or download relevant software packages. Please refer to the official NXP document android_user's_guide.pdf.

The steps to replace the Ubuntu software source are as follows: 1. Back up the source CP / etc / apt / sources.list / etc / apt / sources.list Bak 2. Copy the 16.04 Tsinghua source content to this / etc / apt / sources.list file. 3. Update source apt get update PS: if you encounter an error in appstream3, you can delete the software package first and then update it.

Install prerequisite packages

The newly installed Ubuntu system also needs to install some common software. Execute the following commands to install it.

sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsd l1.2-dev u-boot-tools 

sudo apt-get install libsdl1.2-dev xterm sed cvs subversion coreutils texi2html docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff cu rl lzop asciidoc 

Set repo file

Repo is used to download resource files and store them in the 03 tools / repo directory. Add this file to the user environment as follows.

mkdir ~/bin 
cp ~/03-Tools/Repo/repo ~/bin 
chmod a+x ~/bin/repo
export PATH=~/bin:$PATH 

Configure Git

Git is required for resource download. The following operations are used for basic configuration. The user name and mailbox are changed to account name.

git config --global user.name "abc123" 
git config --global user.email "def456@gmail.com"
git config --list

3. Burning and compiling Android system

Android image compilation takes a lot of time. You can burn the compiled image to the development board to see the effect. The burning adopts uuu burning. Here, this chapter will first introduce how to burn the image into EMMC and SD card, and then introduce the method of compiling the image.

3.1 Android image burning EMMC method

The compiled image is located in the 02 image directory and will be Android_ p9.0.0_ 2.0.0-ga_ image_ 8mq-myd-mt53d512m32d2ds-053.zip and unzip it in the windows system.

Uuu burning will establish a soft link, so please open CMD with administrator privileges, as shown in the following figure:

Jump to the decompression directory and execute

uuu_ imx_ android_ flash.bat -f imx8mq -a -e -c 7

Next, please ensure that the TF card slot of the development board is not inserted, such as a TF card. One end of the typec port is connected to the computer, and the other end is connected to the tyepc port (J8) of the backplane. Set the dial switch to (SW1) llhl (SW2) HL, and then power on.

The burning process is as follows:

After burning, set the dial switch to (SW1) llhl (SW2) LH to start.

3.2 Android image burning SD method the compiled image is located in the 02 image directory, and Android_ p9.0.0_ 2.0.0-ga_ image_ 8mq-myd-mt53d512m32d2ds-053.zip and unzip it in the windows system. Uuu burning will establish a soft link, so please open CMD with administrator privileges, as shown in the following figure:

Jump to the decompression directory and execute

uuu_imx_android_flash.bat -f imx8mq -a -e -c 7 -t sd

The burning process is as follows:

Insert the TF card after 3 / 3. Please pay attention to this time.

After burning, set the dial switch to (SW1) hhll (SW2) LH to start. 3.3 Android image compilation method, please decompress the source code myir first_ android9.0.0_ 2.0.0.tar.gz, and then execute source myir_ Build.sh to start compiling

mkdir android_dir 
tar -zxf myir_android9.0.0_2.0.0.tar.gz -C android_dir
cd android_dir
source myir_build.sh 

myir_ In build.sh

snip 
#build_bootloader 
#build_kernel 
#build_dtbo 
make -j4 2>&1 | tee build-log.txt

Invalid Sign

The above is the method of compiling, burning and using Android 9.0 based on i.mx8 development board. i. Introduction to mx8 development board http://www.myir-tech.com/product/myc-jx8mx.htm Please add a link description

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>