/
i.MX 8M Mini Android

i.MX 8M Mini Android

Setting up Android 9 (Pie) for conga-SMX8M

1. Build environment - supported OS

  • Ubuntu 16.04 64 bit [Clean install]

  • Linux Mint; based on Ubuntu 18.04 Bionic 64 bit

2. Some packages are needed:

$ sudo apt-get update $ sudo apt-get install uuid uuid-dev zlib1g-dev liblz-dev liblzo2-2 liblzo2-dev lzop git-core curl u-boot-tools mtd-utils android-tools-fsutils openjdk-8-jdk device-tree-compiler gdisk m4 libz-dev $ sudo apt-get install openjdk-8-jdk

3. Config the local git:

$ git config --global user.email "youremail" $ git config --global user.name "Your name"

4. Setup SSH (optional for contributors)

A SSH key must be generated in order to push software changes to the congatec git server, after login into git.congatec.com go to the link https://git.congatec.com/profile/keys and follow the instructions there to generate and link a key with the computer will fetch and build the Android BSP.

5. Get Android src

Download and unpack the Android NXP release package (https://www.nxp.com/webapp/sps/download/license.jsp?colCode=P9.0.0_2.2.0_GA_ANDROID_SOURCE&appType=file1&DOWNLOAD_ID=null)

$ cd ~ (or any other directory you like) $ tar xzvf imx-p9.0.0_2.2.0-ga.tar.gz

6. Getting i.MX Android NXP release source code

6.1. Check vendor folder

Check if folder "vendor" contains subfolders "nxp" and "nxp-opensource".
Remove any other subfolders to prevent compilation errors.

7. Fetch congatec source code

Congatec support are split to several repositories. All of them needs to be mannualy checked out in appropriate android folder.

7.1. Android kernel

Kernel Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

Kernel Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

p9.0.0_4.14.98

2.2.0_ga

cgtimx8mm__imx_p9.0.0_4.14.98_2.2.0_ga

N/A

7.1.a. Checkout latest version
7.1.b. Checkout particular version

7.2. Android bootloader

Uboot Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

Uboot Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

p9.0.0_2018.3

2.2.0_ga

cgtimx8mm__imx_p9.0.0_v2018.03_4.14.98_2.2.0_ga

N/A

7.2.a. Checkout latest version
7.2.b. Checkout particular version

7.3. Android mk-image utility

NXP Image Tool Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

NXP Image Tool Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

N/A

2.2.0_ga

cgtimx8mm__imx_p9.0.0_2.2.0_ga

N/A

7.3.a. Checkout latest version
7.3.b. Checkout particular version

7.4. Device configuration files

Device Configuration Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

Device Configuration Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

N/A

2.2.0_ga

cgtimx8mm__imx_p9.0.0_2.2.0_ga

N/A

7.4.a. Checkout latest version
7.4.b. Checkout particular version

7.5. Other hardware supporting packages

7.5.1 Qualcom Blue Tooth HAL

BT HAL Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

BT HAL Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

N/A

2.2.0_ga

cgtimx8mm__imx_p9.0.0_2.2.0_ga

N/A

7.5.1.a. Checkout latest version
7.5.1.b. Checkout particular version

7.5.2 TinyALSA audio HAL

Audio HAL Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

Audio HAL Version

NXP Release Suffix

Congatec Branch

Congatec Release Tag

N/A

2.2.0_ga

cgtimx8mm__imx_p9.0.0

N/A

7.5.2.a. Checkout latest version
7.5.2.b. Checkout particular version

NOTE: for proper audio function it is necessary to have this or newer version of kernel and device repositories:

8. Update DTB to reflect your configuration

Current DTB is dedicated for device assembly variant"conga-SMX8-Mini/QC-4G eMMC16 DP" equiped with display port video output.
Android doesn't support dynmic change of DTB by UBoot as Linux does. Only possible method how to change video resolution is to change ".dts" file before Android system build. This paragraph describes how to perform it.

  • copy your dts file myfile.dts to $MY_ANDROID/vendor/nxp-opensource/kernel_imx/arch/arm64/boot/dtb/congatec/ or select one of predefined dts file.

  • Add your dtb build recipe to $MY_ANDROID/vendor/nxp-opensource/kernel_imx/arch/arm64/boot/dtb/congatec/Makefile in format dtb-$(CONFIG_ARCH_FSL_IMX8MM) += myfile.dtb

  • Update Boardconfig: $MY_ANDROID/device/fsl/imx8m/cgtsx8m/BoardConfig.mk; find line with variable definition TARGET_BOARD_DTS_CONFIG ... and update to TARGET_BOARD_DTS_CONFIG ?= myfile.dtb

9. Build the image

One way to make up for the limited RAM is using a bigger swap. Google recommends at least 16GB of RAM/swap so it’s not uncommon to create a 16GB swap when working in VM, to do this please use the following commands.

Set the environment and build the images

10. Transfer the image to the SD card

####(/dev/sdX check your device configuration)

After building is complete, you can access the target files with the following command:

11. System boot

Sx8m boards are delivered with Linux bootloader flashed in the internal eMMC flash memory. To boot Android system it is necessary to erase internal bootloader.
Power up the board and wait for bootloader. Break the bootloader boot sequence and enter to bootloader shell. To erase internal bootloader type:


(c) 2020-2021, Robert Pasz, congatec GmbH