conga SMX8-X Android 11
A x86 based Linux system with installed cross-compile toolchain / SDK Android development is required for i.MX 8-based congatec designs. It is possible to use a virtual machine but a dedicated system is preferrable. Furthermore, the host should have a serial port to access the serial console and an SD card reader.
The i.MX 8-based congatec designs require a 64-bit Ubuntu 16.04 system as the host for Android development.
Setting up and building Android
1. Installation in Ubuntu 18.04 64 bit [Clean install]
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 device-tree-compiler gdisk m4 libz-dev bison flex make libssl-dev gcc-multilib
3. Config the local git:
$ git config --global user.email "youremail"
$ git config --global user.name "Your name"
4. A SSH key must be generated
In order to fetch te software from 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 Yocto BSP.
5. Download and unpack the Android NXP
Download the release package https://www.nxp.com/webapp/sps/download/license.jsp?colCode=11.0.0_1.2.0_ANDROID_SOURCE&appType=file2&DOWNLOAD_ID=null
$ cd ~ (or any other directory you like)
$ tar xzvf imx-android-11.0.0_1.2.0.tar.gz
In the imx_android_setup.sh script, a .xml file that contains the code repository information is specified. To make the code synchronized by this script the same as the release state, code repository revision is specified with the release tag in this file. The release tag is static and is not moved after the code is published, so no matter when imx_android_setup.sh is executed, the working area of the code repositories synchronized by this script are the same as release state and images being built are the same as prebuilt images.
6. Getting i.MX Android NXP
7. Fetch congatec source code
7.1. Android kernel
7.2. Device configuration files
7.3. Hardware Bluetooth files
7.4. Hardware Wlan files
7.5. NXP imx-firmware files
8. Prepare build environment for U-boot
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.
a. Download the tool chain for the A-profile architecture on arm Developer GNU-A Downloads page https://developer.arm.com/downloads/-/gnu-a It is recommended to use the 8.3 version for this release. There are two options, either gcc-arm-8.3-2019.03-x86_64-aarch64-elf.tar.xz or gcc-arm-8.3-2019.03-x86_64-aarch64-linux-gnu.tar.xz. The first one is dedicated for compiling bare-metal programs, and the second one can also be used to compile the application programs. We recomend to select the second one.
b. Decompress the file into a path on local disk, for example, to /opt/. Export a variable named AARCH64_GCC_CROSS_COMPILE to point to the tool as follows:
The preceding command can be added to /etc/profile. When the host boots up, AARCH64_GCC_CROSS_COMPILE is set and can be directly used.
9. Build the images
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 images to the SD card (/dev/sdX check your device)
After building is complete, you can access the target files with the following command:
10.1. conga-SMX8
10.2. conga-SMX8-X
11. Bootcontainer
11.1 SMX8
In order to use the bootloader according the target variant follow the next steps to build boot containers
In order to build the bootcontainer the cgtbcbe tool is required, to fetch it and set the correct configuration for you variant follow the next steps.
11.2 SMX8-X
In order to use the bootloader according the target variant follow the next steps to build boot containers
In order to build the bootcontainer the cgtbcbe tool is required, to fetch it and set the correct configuration for you variant follow the next steps.
12. Hardware configuration
Bootcontainer is programmed into the SDcard, therefore the module needs be configured as follows:
conga-SMX8-X
Select on conga-SEVA
M17 ON-ON
M18 OFF-OFF