Skip to content

Latest commit

 

History

History
123 lines (86 loc) · 4 KB

README.md

File metadata and controls

123 lines (86 loc) · 4 KB

Android Q10 for imx8mm

Prerequisites

repo

Make sure that the necessary packages have been installed.

sudo apt-get install xz-utils make flex lib32z1 zip curl

Install repo tool:

mkdir ~/Android/{bin,}
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/Android/bin/repo
chmod a+x ~/Android/bin/repo
export PATH=~/Android/bin:${PATH}

GCC

Download the tool chain for the A-profile architecture from arm Developer GNU-A Downloads page and deploy it in a directory on your discretion (hereafter /opt)

Recommended tool chain is gcc-arm-8.3-2019.03-x86_64-arm-eabi

export AARCH64_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-aarch64-elf/bin/aarch64-elf-
export AARCH32_GCC_CROSS_COMPILE=/opt/gcc-arm-8.3-2019.03-x86_64-arm-eabi/bin/arm-eabi-

Getting Android source code

NXP sources

  • Download the NXP Android sources from this location: imx-android-10.0.0_2.5.0.tar.gz

  • Untar the image:

    tar -C ~/Android -xf imx-android-10.0.0_2.5.0.tar.gz
  • Download and setup source:

    source ~/Android/imx-android-10.0.0_2.5.0/imx_android_setup.sh
    export A=$(pwd)
  • Follow the instructions in the ~/imx-android-10.0.0_2.5.0/README and make sure that the build environment is ready.

For more details see the NXP Android User Guide

CompuLab sources

  • Clone the repository

    git clone https://github.com/compulab-yokneam/imx8mm-android-q10.git
    export C=$(pwd)/imx8mm-android-q10

Apply the patches

  • U-boot

    git -C ${A}/vendor/nxp-opensource/uboot-imx checkout -b compulab-imx8-android android-10.0.0_2.5.0
    git -C ${A}/vendor/nxp-opensource/uboot-imx am ${C}/vendor/nxp-opensource/uboot-imx/*.patch
  • ATF

    git -C ${A}/vendor/nxp-opensource/arm-trusted-firmware/ checkout -b compulab-imx8-android android-10.0.0_2.5.0
    git -C ${A}/vendor/nxp-opensource/arm-trusted-firmware am ${C}/vendor/nxp-opensource/arm-trusted-firmware/*.patch
  • Kernel

    git -C ${A}/vendor/nxp-opensource/kernel_imx checkout -b compulab-imx8-android android-10.0.0_2.5.0
    git -C ${A}/vendor/nxp-opensource/kernel_imx am ${C}/vendor/nxp-opensource/kernel_imx/*.patch
    
  • Board

    git -C ${A}/device/fsl checkout -b compulab-imx8-android android-10.0.0_2.5.0
    git -C ${A}/device/fsl am ${C}/device/fsl/*.patch
  • Peripherals

    git -C ${A}/hardware/broadcom/libbt checkout -b compulab-imx8-android android-10.0.0_2.5.0
    git -C ${A}/hardware/broadcom/libbt am ${C}/hardware/broadcom/libbt/*.patch

Set a desired machine configuration:

export MACHINE=ucm_imx8m_mini SOC=imx8mm

Build Android

  • Go to Android build directory and issue:

    cd ${A}
    source build/envsetup.sh
    lunch ${MACHINE}-eng
    ./imx-make.sh -j16 2>&1 | tee build-log.txt

Create a bootable SD-card

  • Use a uSD card reader and a uSD сard. Any commercially available micro-SD card of 16GB+ may be used for the installation.

  • Plug the USB SD card reader into the host PC. Insert the micro-SD сard into the сard reader. From now we assume the device name of the MMC/SD card on your Linux PC is /dev/sdX.

  • Prepare the uSD card:

    sudo dd if=/dev/zero bs=1M count=16 of=/dev/sdX
    sudo partprobe /dev/sdx
  • In the Android build directory issue the following commands:

    export MACHINE=ucm_imx8m_mini SOC=imx8mm
    cd out/target/product/${MACHINE}
    sudo ./fsl-sdcard-partition.sh -f ${SOC} /dev/sdX

What's next?

Boot Android using the uSD card as described here Boot from the SD-card

Known issues:

  • Wi-Fi interface is disabled in GUI