Compiling Android8.1.0-1.3.0 BSP For i.MX8MQ-EVK On Ubuntu18.04 LTS

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Compiling Android8.1.0-1.3.0 BSP For i.MX8MQ-EVK On Ubuntu18.04 LTS

Compiling Android8.1.0-1.3.0 BSP For i.MX8MQ-EVK On Ubuntu18.04 LTS

   Some of Chinese customer couldn’t normally download android source code from google site, here give a way to download android source from Mirror site of Tsinghua University. Customers in other areas can refer to the configurations of ubuntu 18.04 in the document.

Updating software packages for ubuntu18.04 LTS

1、Using software updater to update software packages

pastedImage_1.png

Press Install Now button to update software.

pastedImage_2.png

pastedImage_3.png

pastedImage_4.png

Restart ubuntu18.04

2、Installing necessary software packages

#sudo apt-get install flex

# sudo apt-get install bison

# sudo apt-get install gperf

# sudo apt-get install build-essential

# sudo apt-get install zlib1g-dev

# sudo apt-get install lib32ncurses5-dev

# sudo apt-get install x11proto-core-dev

# sudo apt-get install libx11-dev

# sudo apt-get install lib32z1-dev

# sudo apt-get install libgl1-mesa-dev

# sudo apt-get install tofrodos

# sudo apt-get install python-markdown

# sudo apt-get install libxml2-utils

# sudo apt-get install xsltproc

# sudo apt-get install uuid-dev:i386 liblzo2-dev:i386

# sudo apt-get install gcc-multilib g++-multilib

# sudo apt-get install subversion

# sudo apt-get install openssh-server openssh-client

# sudo apt-get install uuid uuid-dev

# sudo apt-get install zlib1g-dev liblz-dev

# sudo apt-get install liblzo2-2 liblzo2-dev

# sudo apt-get install lzop

# sudo apt-get install git-core curl

# sudo apt-get install u-boot-tools

# sudo apt-get install mtd-utils

# sudo apt-get install android-tools-fsutils

# sudo apt-get install openjdk-8-jdk

# sudo apt-get install device-tree-compiler

# sudo apt-get install aptitude

# sudo aptitude install libcurl4-openssl-dev nss-updatedb

3、Downloading and unpacking Android release package

https://www.nxp.com/products/processors-and-microcontrollers/applications-processors/i.mx-applicatio...

--O8.1.0_1.3.0_ANDROID_SOURCE_8MQ_GA

File name is imx-o8.1.0_1.3.0_8m.tar.gz

# cd ~

# tar xzvf imx-o8.1.0_1.3.0_8m.tar.gz

Downloading android8.1.0-1.3.0 source code

  1. Getting repo

# cd ~

# mkdir bin

# cd bin

# curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

# chmod a+x ~/bin/repo

# export PATH=${PATH}:~/bin

 

  1. Modifying repo File

Open ~/bin/repo file with 'gedit' and Change google address

From

REPO_URL = 'https://gerrit.googlesource.com/git-repo'

To

REPO_URL = 'https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'

3Setting email address

# git config --global user.email "xxxx@nxp.com"

# git config --global user.name "xxxx"

[ Email & Name should be yours]

4Modifying android setup script and Running it

Open ~/ imx-o8.1.0_1.3.0_8m /imx_android_setup.sh and add a line like below:

...

      if [ "$rc" != 0 ]; then

         echo "---------------------------------------------------"

         echo "-----Repo Init failure"

         echo "---------------------------------------------------"

         return 1

      fi

find -name 'aosp-O8.1.0-1.3.0.xml'| xargs perl -pi -e 's|https://android.googlesource.com/|https://aosp.tuna.tsinghua.edu.cn/|g'

fi

 

# Don't Delete .repo directory and hidden files

#rm -rf $android_builddir/.??*

...

Then save it and exit.

# cd ~/

# source ~/ imx-o8.1.0_1.3.0_8m/imx_android_setup.sh

Then android_build directory is created at ~/

# export MY_ANDROID=~/android_build

pastedImage_5.png

         48 hours later:

pastedImage_6.png

Compiling android8.1.0-1.3.0 BSP

# cd ~/android_build

# gedit ./prebuilts/sdk/tools/jack-admin

              And find “JACK_SERVER_COMMAND” ,change it to be:

JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096m -cp $LAUNCHER_JAR $LAUNCHER_NAME"

         Save and exit. And run:

# ./prebuilts/sdk/tools/jack-admin stop-server

# ./prebuilts/sdk/tools/jack-admin start-server

# export ARCH=arm64

# export CROSS_COMPILE=~/android_build/prebuilts/gcc/linux-x86/aarch64/aarch64-linuxandroid-4.9/bin/aarch64-linux-android-

# export LC_ALL=C

# source build/envsetup.sh

# lunch evk_8mq-userdebug

              Begin to build android BSP for i.MX8MQ

# make –j4

pastedImage_7.png

pastedImage_8.png

NXP TIC weidong sun

2018-08-15

No ratings
Version history
Last update:
‎08-14-2018 05:49 PM
Updated by: