Skip to content

compulab-yokneam/imx8-android

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CompuLab Android 15

NXP Resources

  • i.MX Android proprietary Source Code: imx-android-15.0.0_1.2.0.tar.gz

  • Documentation: Android User Guide

  • Create a bsp directory:

    mkdir -p /path/to/bsp
    export BSP=/path/to/bsp
  • Untar the Android source archive:

    tar -C ${BSP} -xf /path/to/imx-android-15.0.0_1.2.0.tar.gz
  • Setup Source:

    cd ${BSP}
    source ${BSP}/imx-android-15.0.0_1.2.0/imx_android_setup.sh
    export MY_ANDROID=${BSP}/android_build
  • Follow the instructions of the Android User Guide and make sure that the build environment is ready

Important
It is up to developers to make sure that NXP procedure works and an NXP example image can be created.

CompuLab Sources

  • Clone this repository

    mkdir ${BSP}/compulab-imx8
    git clone --single-branch --branch android-15.0.0_1.2.0 https://github.com/compulab-yokneam/imx8-android.git ${BSP}/compulab-imx8
    export C=${BSP}/compulab-imx8
  • Deploy a missing sensor folder

    cp -a ${C}/vendor/nxp/fsl-proprietary/sensor ${MY_ANDROID}/vendor/nxp/fsl-proprietary/

Apply the patches:

  • U-boot

    git -C ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx checkout -b compulab-imx8 lf-6.1.22-2.0.0
    git -C ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx am ${C}/vendor/nxp-opensource/uboot-imx/*.patch
  • ATF (for imx8mm only)

    git -C ${MY_ANDROID}/vendor/nxp-opensource/arm-trusted-firmware checkout -b compulab-imx8 android-14.0.0_2.0.0
    git -C ${MY_ANDROID}/vendor/nxp-opensource/arm-trusted-firmware am ${C}/vendor/nxp-opensource/imx-atf/*.patch
  • Kernel

    git -C ${MY_ANDROID}/vendor/nxp-opensource/kernel_imx checkout -b compulab-imx8 android-15.0.0_1.2.0
    git -C ${MY_ANDROID}/vendor/nxp-opensource/kernel_imx am ${C}/vendor/nxp-opensource/kernel_imx/*.patch
  • Board

    git -C ${MY_ANDROID}/device/nxp checkout -b compulab-imx8 android-15.0.0_1.2.0
    git -C ${MY_ANDROID}/device/nxp am ${C}/device/nxp/*.patch

Create the image

  • Set a desire machine configuration

    • ucm-imx8m-plus

      • mipi panel

        • export MACHINE=ucm_imx8m_plus SOC=imx8mp UBOOT_CONFIG=ucm-imx8m-plus_android_defconfig

      • lvds panel

        • export MACHINE=ucm_imx8m_plus SOC=imx8mp dtb_opt="-d lvds" UBOOT_CONFIG=ucm-imx8m-plus_android_defconfig

    • ucm-imx8m-plus-sbev

      • lvds panel

        • export MACHINE=ucm_imx8m_plus SOC=imx8mp dtb_opt="-d sbev" UBOOT_CONFIG=ucm-imx8m-plus-sbev_android_defconfig

  • Apply the u-boot changes in order to pass the andriod build process

    sed -i '/BINMAN/d' ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx/board/compulab/plat/Kconfig
    sed -i 's/ifdef CONFIG_SPL_OS_BOOT/if 1/g' ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx/board/compulab/plat/imx8mp/ddr/ddr.h
  • Goto Android build directory and issue:

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

CompuLab imx8mp u-boot external build how to

  • Prerequisites

  • Create U-boot binary

    cd ${MY_ANDROID}/vendor/nxp-opensource/uboot-imx
    export BUILD=$(pwd)/../uboot-imx-build.d
    # roll back the android sed changes
    git checout .
    make O=${BUILD} ${UBOOT_CONFIG}
    make O=${BUILD} flash.bin
    export COMPULAB_UBOOT=$(readlink -e ${BUILD}/flash.bin)
    cd -
  • Copy the U-boot file to the Android output folder

    cp -v ${COMPULAB_UBOOT} ${MY_ANDROID}/out/target/product/ucm_imx8m_plus/u-boot-${SOC}.imx

Create a bootable SD-card

  • Issue these commands for a 32G-card:

cd ${MY_ANDROID}
sudo ./device/nxp/common/tools/imx-sdcard-partition.sh  -f ${SOC} ${dtb_opt} -c 28 -D out/target/product/ucm_imx8m_plus /dev/sdX