Deploy Android14 on FRDM-iMX8MP Lf6.6.36

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

Deploy Android14 on FRDM-iMX8MP Lf6.6.36

Deploy Android14 on FRDM-iMX8MP Lf6.6.36

Customer may want to deploy Android 14 on FRDM-iMX8MP. This doc gives an introduction about how to deploy Android OS14 on FRDM-iMX8MP

 

Hardware:

FRDM-iMX8MP, Power supply cable, usb cable x2, 

Ubuntu PC

Outline:

Follow the below steps:

  • Setup the Android 14 source environment based on LF6.6.36.
  • Apply FRDM-iMX8MP patches in kernel, uboot, mkimage, and device directory.
  • Build the image for FRDM-iMX8MP
  • Flash the image

 

1. Setup the environment

  • On the Linux PC, set up the Android Source environment according to Section 2- Section 3 from the Android User’s Guide Rev. android-14.0.0_2.1.0 and do not build the image yet.
    $ cd ~ (or any other directory you like)
    $ tar xzvf imx-android-14.0.0_2.1.0.tar.gz
  • To generate the i.MX Android release source code build environment, execute the following commands:
    $ source ~/imx-android-14.0.0_2.1.0/imx_android_setup.sh
  • Prepare the build environment for U-Boot and Linux kernel. This step is mandatory because there is no GCC cross-compile tool chain in the one in AOSP codebase. An approach is provided to use the self-installed GCC cross-compile tool chain for both AArch32 and AArch64.
  • Change to the top-level build directory and set up the environment for building. This only configures the current terminal
    $ cd ${MY_ANDROID}
    $ source build/envsetup.sh

2. Apply FRDM-iMX8MP patches into AOSP

 

  • Apply the patch in device/nxp, copy all the patches into android_build/device/nxp, and then running the command:
    $ git apply --check 0001-device-nxp-add-FRDM-i.MX8MP-Android14-basic-support.patch
    $ git apply 0001-device-nxp-add-FRDM-i.MX8MP-Android14-basic-support.patch
  • Apply the patches in uboot, copy all the patches into android_build/vendor/nxp-opensource/uboot-imx, and then running the command:
    $ git am *.patch
  • Apply the patches in kernel, copy all the patches into android_build/vendor/nxp-opensource/kernel-imx, and then running the command:
    $ git am *.patch
  • Apply the patch in mkimage, copy all the patches into android_build/vendor/nxp-opensource/ imx-mkimage, and then running the command:
    $ git am *.patch

 

 

3. Build the image for FRDM-iMX8MP

  • Execute the Android lunch command:
    $ lunch frdm_8mp-trunk_staging-userdebug
  • Execute the imx-make.sh script to generate the image.
    $ ./imx-make.sh -j4 2>&1 | tee build-log.txt
    NOTE: The following outputs are generated by default in ${MY_ANDROID}/out/target/product/frdm_8mp:

 

4. Flash the image

The board image files can be flashed into the target board using Universal Update Utility (UUU).

For the UUU binary file, download it from GitHub: uuu release page on GitHub. 

To achieve more flexibility, two script files are provided to invoke UUU to automatically flash all Android images.

  • uuu_imx_android_flash.sh for Linux OS
  • uuu_imx_android_flash.bat for Windows OS

For this release, these two scripts are validated on UUU 1.5.179 version. Download the corresponding version from GitHub:

  • For Linux OS, download the file named uuu.
  • For Windows OS, download the file named uuu.exe.

Perform the following steps to download the board images:

  • Download the UUU binary file from GitHub as described before. Install UUU into a directory contained by the system environment variable of "PATH".
  • Make the board enter serial download mode. Change the board's SW5 (boot mode) to 0001 (from 1-4 bit) to enter serial download mode.
  • Power on the board. Use the USB cable to connect the USB 3.0 dual-role port (with silkprint "PORT1") on the board to your host PC.
  • On the Linux system, open the shell terminal. For example, you can execute a command as follows:
    $ sudo ./uuu_imx_android_flash.sh -f imx8mp -p frdm -a -e
  • On the Windows system, open the command-line interface in administrator mode. The corresponding command is as follows:
    $ uuu_imx_android_flash.bat -f imx8mp -p frdm -a -e

NOTE: If you want to change the dtb, you can add -d dtb_feature. Also, you can check all the info by using the command: uuu_imx_android_flash.bat

Power off the board and Change the board's SW5 (boot mode) to 0010 (from 1-4 bit) to enter emmc boot mode

Attachments
%3CLINGO-SUB%20id%3D%22lingo-sub-2124639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EDeploy%20Android14%20on%20FRDM-iMX8MP%20Lf6.6.36%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2124639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3ECustomer%20may%20want%20to%20deploy%20Android%2014%20on%20FRDM-iMX8MP.%20This%20doc%20gives%20an%20introduction%20about%20how%20to%20deploy%20Android%20OS14%20on%20FRDM-iMX8MP%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EHardware%3A%20%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFRDM-iMX8MP%2C%20Power%20supply%20cable%2C%20usb%20cable%20x2%2C%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EUbuntu%20PC%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EOutline%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3EFollow%20the%20below%20steps%3A%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3ESetup%20the%20Android%2014%20source%20environment%20based%20on%20LF6.6.36.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EApply%20FRDM-iMX8MP%20patches%20in%20kernel%2C%20uboot%2C%20mkimage%2C%20and%20device%20directory.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EBuild%20the%20image%20for%20FRDM-iMX8MP%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EFlash%20the%20image%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E1.%20Setup%20the%20environment%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EOn%20the%20Linux%20PC%2C%20set%20up%20the%20Android%20Source%20environment%20according%20to%20%3CSTRONG%3ESection%202-%20Section%203%3C%2FSTRONG%3E%20from%20the%20Android%20User%E2%80%99s%20Guide%20Rev.%20android-14.0.0_2.1.0%20and%20do%20not%20build%20the%20image%20yet.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20cd%20~%20(or%20any%20other%20directory%20you%20like)%0A%24%20tar%20xzvf%20imx-android-14.0.0_2.1.0.tar.gz%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3ETo%20generate%20the%20i.MX%20Android%20release%20source%20code%20build%20environment%2C%20execute%20the%20following%20commands%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20source%20~%2Fimx-android-14.0.0_2.1.0%2Fimx_android_setup.sh%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EPrepare%20the%20build%20environment%20for%20U-Boot%20and%20Linux%20kernel.%20This%20step%20is%20mandatory%20because%20there%20is%20no%20GCC%20cross-compile%20tool%20chain%20in%20the%20one%20in%20AOSP%20codebase.%20An%20approach%20is%20provided%20to%20use%20the%20self-installed%20GCC%20cross-compile%20tool%20chain%20for%20both%20AArch32%20and%20AArch64.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EChange%20to%20the%20top-level%20build%20directory%20and%20set%20up%20the%20environment%20for%20building.%20This%20only%20configures%20the%20current%20terminal%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20cd%20%24%7BMY_ANDROID%7D%0A%24%20source%20build%2Fenvsetup.sh%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E2.%20Apply%20FRDM-iMX8MP%20patches%20into%20AOSP%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EApply%20the%20patch%20in%20device%2Fnxp%2C%20copy%20all%20the%20patches%20into%20android_build%2Fdevice%2Fnxp%2C%20and%20then%20running%20the%20command%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20git%20apply%20--check%200001-device-nxp-add-FRDM-i.MX8MP-Android14-basic-support.patch%0A%24%20git%20apply%200001-device-nxp-add-FRDM-i.MX8MP-Android14-basic-support.patch%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EApply%20the%20patches%20in%20uboot%2C%20copy%20all%20the%20patches%20into%20android_build%2Fvendor%2Fnxp-opensource%2Fuboot-imx%2C%20and%20then%20running%20the%20command%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20git%20am%20*.patch%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EApply%20the%20patches%20in%20kernel%2C%20copy%20all%20the%20patches%20into%20android_build%2Fvendor%2Fnxp-opensource%2Fkernel-imx%2C%20and%20then%20running%20the%20command%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20git%20am%20*.patch%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EApply%20the%20patch%20in%20mkimage%2C%20copy%20all%20the%20patches%20into%20android_build%2Fvendor%2Fnxp-opensource%2F%20imx-mkimage%2C%20and%20then%20running%20the%20command%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20git%20am%20*.patch%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E3.%20Build%20the%20image%20for%20FRDM-iMX8MP%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EExecute%20the%20Android%20lunch%20command%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20lunch%20frdm_8mp-trunk_staging-userdebug%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EExecute%20the%20imx-make.sh%20script%20to%20generate%20the%20image.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20.%2Fimx-make.sh%20-j4%202%26gt%3B%26amp%3B1%20%7C%20tee%20build-log.txt%3C%2FCODE%3E%3C%2FPRE%3E%3CEM%20style%3D%22font-family%3A%20inherit%3B%20text-align%3A%20justify%3B%22%3E%3CSTRONG%3ENOTE%3A%3C%2FSTRONG%3E%20The%20following%20outputs%20are%20generated%20by%20default%20in%20%24%7BMY_ANDROID%7D%2Fout%2Ftarget%2Fproduct%2Ffrdm_8mp%3A%3C%2FEM%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSPAN%3E4.%20Flash%20the%20image%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3EThe%20board%20image%20files%20can%20be%20flashed%20into%20the%20target%20board%20using%20Universal%20Update%20Utility%20(UUU).%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3EFor%20the%20UUU%20binary%20file%2C%20download%20it%20from%20GitHub%3A%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Fmfgtools%2Freleases%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Euuu%20release%20page%20on%20GitHub.%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3ETo%20achieve%20more%20flexibility%2C%20two%20script%20files%20are%20provided%20to%20invoke%20UUU%20to%20automatically%20flash%20all%20Android%20images.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22lia-list-style-type-circle%22%3E%0A%3CLI%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3Euuu_imx_android_flash.sh%20for%20Linux%20OS%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3Euuu_imx_android_flash.bat%20for%20Windows%20OS%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3EFor%20this%20release%2C%20these%20two%20scripts%20are%20validated%20on%20UUU%201.5.179%20version.%20Download%20the%20corresponding%20version%20from%20GitHub%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%20class%3D%22lia-align-justify%20lia-align-left%20lia-list-style-type-circle%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%0A%3CLI%3E%3CSPAN%3EFor%20Linux%20OS%2C%20download%20the%20file%20named%20uuu.%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EFor%20Windows%20OS%2C%20download%20the%20file%20named%20uuu.exe.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CSPAN%3EPerform%20the%20following%20steps%20to%20download%20the%20board%20images%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%3EDownload%20the%20UUU%20binary%20file%20from%20GitHub%20as%20described%20before.%20Install%20UUU%20into%20a%20directory%20contained%20by%20the%20system%20environment%20variable%20of%20%22PATH%22.%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EMake%20the%20board%20enter%20serial%20download%20mode.%20Change%20the%20board's%20SW5%20(boot%20mode)%20to%200001%20(from%201-4%20bit)%20to%20enter%20serial%20download%20mode.%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3EPower%20on%20the%20board.%20Use%20the%20USB%20cable%20to%20connect%20the%20USB%203.0%20dual-role%20port%20(with%20silkprint%20%22PORT1%22)%20on%20the%20board%20to%20your%20host%20PC.%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EOn%20the%20Linux%20system%2C%20open%20the%20shell%20terminal.%20For%20example%2C%20you%20can%20execute%20a%20command%20as%20follows%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20sudo%20.%2Fuuu_imx_android_flash.sh%20-f%20imx8mp%20-p%20frdm%20-a%20-e%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%3E%3CSPAN%3E%3CSPAN%3EOn%20the%20Windows%20system%2C%20open%20the%20command-line%20interface%20in%20administrator%20mode.%20The%20corresponding%20command%20is%20as%20follows%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%24%20uuu_imx_android_flash.bat%20-f%20imx8mp%20-p%20frdm%20-a%20-e%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3E%3CEM%3E%3CSTRONG%3ENOTE%3A%3C%2FSTRONG%3E%20If%20you%20want%20to%20change%20the%20dtb%2C%20you%20can%20add%20-d%20dtb_feature.%20Also%2C%20you%20can%20check%20all%20the%20info%20by%20using%20the%20command%3A%20uuu_imx_android_flash.bat%3C%2FEM%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-justify%20lia-align-left%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%20style%3D%22text-align%20%3A%20justify%3B%20text-align%20%3A%20left%3B%22%3EPower%20off%20the%20board%20and%20Change%20the%20board's%20SW5%20(boot%20mode)%20to%200010%20(from%201-4%20bit)%20to%20enter%20emmc%20boot%20mode%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2124639%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3EFRDM-IMX8MP%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFRDM-Training%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EHands-On%20Training%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Ei.MX%20Application%20Processors%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
No ratings
Version history
Last update:
‎08-27-2025 11:05 AM
Updated by: