-
Notifications
You must be signed in to change notification settings - Fork 16
Getting Started with Android 6 for Xilinx Zynq UltraScale MPSoC
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 6 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
Please check AOSP: Installing the JDK and AOSP: JDK Requirements for the detailed instructions to install proper version of the JDK. Please use OpenJDK 7 to build Android 6. On Ubuntu LTS 14.04 it can be installed with:
$ sudo apt-get install openjdk-7-jdk
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 ccache 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
$ mkdir -p ~/bin
$ PATH=~/bin:$PATH
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
-
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 "[email protected]"
-
Initialize repo client with URL for the manifest and branch specified:
$ repo init -u git://github.com/MentorEmbedded/mpsoc-manifest.git -b zynqmp-android_6.0.1
-
The following branches are available to use with the "-b" flag:
Branch Description zynqmp-android_6.0.1 Android 6.0.1 based on android-6.0.1_r74 AOSP tag -
Pull down the source tree:
$ repo sync -c
-
Download by using "Download Mali-400 User Space Components" link from https://www.xilinx.com/products/design-tools/embedded-software/petalinux-sdk/arm-mali-400-software-download.html
-
Save it to the Android top build foder
-
Run:
$ mkdir -p tmp_mali && tar -xf mali-400-userspace.tar -C ./tmp_mali && mkdir -p vendor/xilinx/zynqmp/proprietary && cp -r tmp_mali/Android/android-6.0.1/MALI-userspace/r6p2-01rel0/* vendor/xilinx/zynqmp/proprietary/ && rm -rf tmp_mali/
-
You should have the following files after that:
$ tree vendor/xilinx/zynqmp/proprietary/ vendor/xilinx/zynqmp/proprietary/ ├── lib64 │ ├── libGLES_mali.so │ └── libGLES_mali.so_es1 ├── libGLES_mali.so └── libGLES_mali.so_es1
-
Set up build environment:
$ source build/envsetup.sh
-
Choose a target:
$ lunch zcu102-eng
-
The following lunch targets are supported (zcu102-* and ultrazed_eg_iocc-* targets use DisplayPort as display output, zcu102_ozzy-* targets use external LVDS LCD attached via FMC board as display output):
Target Description zcu102-eng Development configuration of Android for ZCU102 board zcu102-userdebug Production version of Android for ZCU102 board with root access and debuggability zcu102_ozzy-eng Development configuration of Android for ZCU102 with iVeia Ozzy FMC board zcu102_ozzy-userdebug Production version of Android for ZCU102 board with iVeia Ozzy FMC with root access and debuggability ultrazed_eg_iocc-eng Development configuration of Android for Avnet UltraZed-EG SoM with IO Carrier Card ultrazed_eg_iocc-userdebug Production version of Android for Avnet UltraZed-EG SoM with IO Carrier Card with root access and debuggability -
Build the code:
$ make -j8
Run the following script to prepare bootable SD card. Use path to your SD card instead of /dev/mmcblk0. Use zcu102, zcu102_ozzy or ultrazed_eg_iocc 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 zcu102
-
Set boot mode of the board to "SD Boot". Insert SD card to the board.
-
Connect external monitor using DisplayPort for zcu102-*. Please note that DisplayPort must be connected before board power-on. External monitor should support 1920x1080 resolution.
-
Connect USB mouse (and optionally USB keyboard) as shown below:
-
Attach iVeia Ozzy FMC for zcu102_ozzy-* targets. Refer to https://support.iveia.com/ for more detailed guide about usage of iVeia Ozzy FMC
-
Power on the board
-
If after booting you see only Android home screen background without other UI elements (like Status Bar, Home button, etc), then MALI libraries with a workaround for ES1 silicon should be used. Open serial debug console and perform the following to install libraries:
$ su $ stop $ mount -o remount,rw /system $ mv /system/lib/egl/libGLES_mali.so_es1 /system/lib/egl/libGLES_mali.so $ mv /system/lib64/egl/libGLES_mali.so_es1 /system/lib64/egl/libGLES_mali.so $ sync $ mount -o remount,ro /system $ start
-
Install SoM on IOCC. Check official UltraZed-EG documentation for details.
-
Use J11 to connect to USB Serial debug console. Check official UltraZed-EG documentation for details.
-
Set boot mode of the board to "SD Boot" - on SoM set SW2[1-4] to OFF-ON-OFF-ON.
-
Insert SD card to the board.
-
Connect external monitor using DisplayPort. Please note that DisplayPort must be connected before board power-on. External monitor should support 1920x1080 resolution.
-
Make sure that the following jumpers are set on IOCC - J1[2:3], J2[2:3], JP1 OFF.
-
Power on the board
-
If after booting you see only Android home screen background without other UI elements (like Status Bar, Home button, etc), then MALI libraries with a workaround for ES1 silicon should be used. Open serial debug console and perform the following to install libraries:
$ su $ stop $ mount -o remount,rw /system $ mv /system/lib/egl/libGLES_mali.so_es1 /system/lib/egl/libGLES_mali.so $ mv /system/lib64/egl/libGLES_mali.so_es1 /system/lib64/egl/libGLES_mali.so $ sync $ mount -o remount,ro /system $ start