Skip to content

Getting Started with Android 8 v2019.2 for Xilinx Zynq UltraScale MPSoC

Grigory Tolstolytkin edited this page Sep 11, 2020 · 2 revisions

Introduction

Welcome to the supporting documentation for Mentor Embedded Android on Xilinx Zynq UltraScale+ MPSoC platform. This page provides brief instructions on how to build and run Android 8 on Xilinx Zynq UltraScale+ MPSoC boards. For more detailed information about this release and other Mentor Embedded offerings for Xilinx Zynq UltraScale+ MPSoC please check https://www.mentor.com/embedded-software/semiconductors/xilinx/ultrascale

Initializing Build Environment

Installing JDK

Please check AOSP: Installing the JDK and AOSP: JDK Requirements for the detailed instructions to install proper version of the JDK. Please use OpenJDK 8 to build Android 8. On Ubuntu 15.04 it can be installed with:

$ sudo apt-get install openjdk-8-jdk

Installing packages

Please follow AOSP: Installing Required Packages to initialize build environment depending on your build host. Please note that builds are tested with 64-bit Ubuntu LTS 14.04 hosts. For the Ubuntu LTS 14.04 the following packages are required:

$ sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip

In addition to the packages from the AOSP guide, please install the following for the SD card initialization scripts:

$ sudo apt-get install dosfstools e2fsprogs parted

Downloading the Source

Installing Repo

$ mkdir -p ~/bin  
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo    

Initializing a Repo client

  • Create an empty directory to hold your working files:

    $ mkdir WORKING_DIRECTORY
    $ cd WORKING_DIRECTORY
    
  • Configure git with your real name and email address:

    $ git config --global user.name "Your Name"
    $ git config --global user.email "you@example.com"
    
  • Initialize repo client with URL for the manifest and branch specified:

    $ repo init -u git://github.com/MentorEmbedded/mpsoc-manifest.git -b zynqmp-android_8 -m release_android-8_xilinx-v2019.2.xml
    
  • The following branches are available to use with the "-b" flag:

    Branch Description
    zynqmp-android_8 Android 8 based on android-8.1.0_r23 AOSP tag
  • default.xml is development version of manifest and tracks latest changes

  • release_android-8_xilinx-v2018.1.xml is stable manifest for release based on Xilinx SW/SDK v2018.1

  • release_android-8_xilinx-v2018.3.xml is stable manifest for release based on Xilinx SW/SDK v2018.3

  • release_android-8_xilinx-v2019.2.xml is stable manifest for release based on Xilinx SW/SDK v2019.2

  • Pull down the source tree:

    $ repo sync -c
    

Download MALI 400 Userspace Binaries

  • Contact Xilinx to download "Download Mali-400 User Space Components"

  • Save it to the Android top build foder and unpack

  • You should have the following files after that:

    $ tree vendor/xilinx/zynqmp/proprietary/
    vendor/xilinx/zynqmp/proprietary/
    ├── lib64
    │   └── libGLES_mali.so
    └── libGLES_mali.so
    

Build the code

  • Set up build environment:

    $ source build/envsetup.sh
    
  • Choose a target:

    $ lunch zcu106-eng
    
  • Build the code:

    $ make -j8
    

Preparing SD Card

Run the following script to prepare bootable SD card. Use path to your SD card instead of /dev/mmcblk0. Use zcu106_vcu as a second argument to specify which product subfolder in out/target/product/ to use.

$ cd WORKING_DIRECTORY
$ sudo device/xilinx/common/scripts/mksdcard.sh /dev/mmcblk0 zcu106_vcu es2

Running the Build

Xilinx ZCU106

  • Use default ZCU106 User Guide as a reference for switches and connectors location - https://www.xilinx.com/support/documentation/boards_and_kits/zcu102/ug1182-zcu102-eval-bd.pdf
  • Set boot mode of the board to "SD Boot" - set SW6[4:1] to [off, off, off, on]
  • Use J83 to connect to USB Serial debug console. Check official ZCU106 User Guide for details.
  • Insert SD card to the board.
  • Connect external monitor using DisplayPort. Please note that DisplayPort must be connected before board power-on.
  • Connect USB mouse and USB keyboard using USB hub to the J96
  • Power on the board