Difference between revisions of "IMX8/iMX8MEVK/Getting Started/Loading Pre-built Images"

From RidgeRun Developer Connection
Jump to: navigation, search
(Android Images)
(Android Images)
Line 35: Line 35:
 
This section describes the boot process of loading the '''i.MX8MQuad EVK''' board with an Embedded Android system image and introduces how to build the software components that create your own system image.
 
This section describes the boot process of loading the '''i.MX8MQuad EVK''' board with an Embedded Android system image and introduces how to build the software components that create your own system image.
  
 +
=== Image Storage ===
 
The storage devices on the development system (MMC/SD or NAND) must be programmed with the U-Boot boot loader. The boot process determines which storage device to access based on the [https://developer.ridgerun.com/wiki/index.php?title=IMX8/iMX8MEVK/Getting_Started/Selecting_Boot_Options switch settings]. When the boot loader is loaded and begins execution, the U-Boot environment space is then read to determine how to proceed with the boot process.
 
The storage devices on the development system (MMC/SD or NAND) must be programmed with the U-Boot boot loader. The boot process determines which storage device to access based on the [https://developer.ridgerun.com/wiki/index.php?title=IMX8/iMX8MEVK/Getting_Started/Selecting_Boot_Options switch settings]. When the boot loader is loaded and begins execution, the U-Boot environment space is then read to determine how to proceed with the boot process.
  
 +
=== Image Types ===
 
The images can come from pre-built release packages or be created from source code. Regardless of how you obtain them, all Android images contain the following components:
 
The images can come from pre-built release packages or be created from source code. Regardless of how you obtain them, all Android images contain the following components:
 
 
*U-Boot image: ''u-boot.imx''
 
*U-Boot image: ''u-boot.imx''
*boot image: ''boot.img''
+
*Boot image: ''boot.img''
 
*Android system root image: ''system.img''
 
*Android system root image: ''system.img''
 
*Recovery root image: ''recovery.img''
 
*Recovery root image: ''recovery.img''
  
 
For more information about the Android BSP refer to the [https://www.nxp.com/docs/en/user-guide/Android_User's_Guide.pdf Android User Guide].
 
For more information about the Android BSP refer to the [https://www.nxp.com/docs/en/user-guide/Android_User's_Guide.pdf Android User Guide].
 +
 +
=== Get NXP Android BSP Image ===
 +
 +
The pre-built images from the package are categorized by boot device and put in the directory with the device name. The latest pre-built image files can be found in Android section on the [https://www.nxp.com/support/developer-resources/run-time-software/i.mx-developer-resources/evaluation-kit-for-the-i.mx-8m-applications-processor:MCIMX8M-EVK?tab=In-Depth_Tab i.MX Software and Development Tool], or on the demo images [https://www.nxp.com/webapp/Download?colCode=IMX_O8.0.0_1.0.0_ANDROID_DEMO_MX7D&appType=license&Parent_nodeId=1458252097425719553900&Parent_pageType=product&Parent_nodeId=1513109797983730444282&Parent_pageType=product&Parent_nodeId=1513109797983730444282&Parent_pageType=product downloader link].
 +
 +
 +
 +
  
  

Revision as of 16:36, 13 November 2018


NXP Partner Program Registered Vertical.jpg NXP Partner Program Horizontal.jpg
  Index  





Yocto Images

Prebuilt images are .sdcard files, disk images that can be flashed directly to any SD card. These .sdcard files are the simplest way to evaluate the board and Linux features since they easily flash all the required components to boot the iMX8M EVK.

The .sdcard file includes the 4 elements required to boot the board:

  • Bootloader
  • Linux kernel image
  • Device tree
  • Root file system

You can get the prebuilt images from the latest Linux BSP. You need to decompress the BSP and decompress the bz2 image sdcard included in it.

For BSP L4.9.88_2.0.0 run:

##
## BSP and IMAGE_NAME in the example may not match exactly your BSP version. 
## Please make sure you set them accordingly.
##

 BSP=L4.9.88_2.0.0_images_MX8MQ
 tar -xvf $BSP.tar.gz
 cd $BSP

 IMAGE_NAME=fsl-image-qt5-validation-imx-xwayland-imx8mqevk
 bunzip2 -dk -f  $IMAGE_NAME.sdcard.bz2

Android Images

This section describes the boot process of loading the i.MX8MQuad EVK board with an Embedded Android system image and introduces how to build the software components that create your own system image.

Image Storage

The storage devices on the development system (MMC/SD or NAND) must be programmed with the U-Boot boot loader. The boot process determines which storage device to access based on the switch settings. When the boot loader is loaded and begins execution, the U-Boot environment space is then read to determine how to proceed with the boot process.

Image Types

The images can come from pre-built release packages or be created from source code. Regardless of how you obtain them, all Android images contain the following components:

  • U-Boot image: u-boot.imx
  • Boot image: boot.img
  • Android system root image: system.img
  • Recovery root image: recovery.img

For more information about the Android BSP refer to the Android User Guide.

Get NXP Android BSP Image

The pre-built images from the package are categorized by boot device and put in the directory with the device name. The latest pre-built image files can be found in Android section on the i.MX Software and Development Tool, or on the demo images downloader link.







This section describes how to build Android Oreo 8.1 platform for the i.MX 8 series devices. The main information was taken from the Android User's Guide

Building the Android platform for i.MX

Getting i.MX Android release source code

The image can be downloaded in the following link, this image is provided by Variscite.

Android Oreo 8.1

Unpack the Android Release Package

After you have set up a computer running Linux OS, unpack the Android release package as follows:

tar xzvf imx-o8.1.0_1.3.0_8m.tar.gz

The i.MX Android release source code consists of 3 parts:

  • NXP i.MX public source code: maintained in the CodeAurora Forum repository.
  • AOSP Android public source code: maintained in android.googlesource.com.
  • NXP i.MX Android proprietary source code package: maintained in www.NXP.com. Get the code from the following link: i.MX Android Source Code Package

Assume you had i.MX Android proprietary source code package imx-o8.1.0_1.3.0_8m.tar.gz under ~/. directory. To generate the i.MX Android release source code build environment, execute the following commands:

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin
source ~/imx-o8.1.0_1.3.0_8m/imx_android_setup.sh

# By default, the imx_android_setup.sh script will create the source code build environment in the folder ~/android_build
# ${MY_ANDROID} will be refered as the i.MX Android source code root directory in all i.MX Andorid release documentation.

export MY_ANDROID=~/android_build

Running the Android Platform with a Prebuilt Image

To test the Android platform before building any code, use the pre-built images from the following packages:

Building Android images

Commands lunch <buildName-buildType> to set up the build configuration and make to start the build process are executed. The build configuration command lunch can be issued with an argument <Build name>-<Build type> string, such as lunch evk_8mq-userdebug, or can be issued without the argument, which will present a menu of options to select. The Build Name is the Android device name found in the directory ${MY_ANDROID}/device/fsl/. The following table lists the i.MX Build Names.

Build Name Description
evk_8mq i.MX 8MQuad EVK Board

The build type is used to specify what debug options are provided in the final image. The following table lists the Build Types.

Build Type Description
user Production-ready image, no debug
userdebug Provides image with root access and debug, similar to "user"
eng Development image with debug tools

Android build steps are as follows:

1. Change to the top level build directory.

cd ${MY_ANDROID}

2. Set up the environment for building. This only configures the current terminal.

source build/envsetup.sh

3. Execute the Android lunch command. In this example, the setup is for the production image of i.MX 8MQuad EVK Board/Platform device with userdebug type.

lunch evk_8mq-userdebug

4. Execute the make command to generate the image.

make 2>&1 | tee build-log.txt

When the make command is complete, the build-log.txt file contains the execution output. Check for any errors.

Running the Android Platform with a Prebuilt Image

To test the Android platform before building any code, use the pre-built images from the following packages:

Image Package Description
android_O8.1.0_1.3.0_8M_image_8mq.tar.gz Prebuilt-image for i.MX 8MQuad EVK board, which includes NXP extended features.

The following tables list the detailed contents of android_O8.1.0_1.3.0_8M_image_8mq.tar.gz image package. The table below shows the pre-built images to support the system boot from SD and eMMC on i.MX 8MQuad EVK boards.

i.MX 8MQuad EVK Image Description
u-boot-imx8mq.imx Bootloader (with padding) for i.MX 8MQuad EVK board.
partition-table.img GPT table image for 16 GB SD card and eMMC.
partition-table-7GB.img GPT table image for 8 GB SD card.
partition-table-28GB.img GPT table image for 32 GB SD card.
boot-imx8mq.img Boot image for i.MX 8MQuad EVK board to support HDMI output.
/boot-imx8mq-mipi.img Boot image for i.MX 8MQuad EVK board to support MIPI-toHDMI output.
/boot-imx8mq-dual.img Boot image for i.MX 8MQuad EVK board to support HDMI and MIPI-to-HDMI dual output.
/boot-imx8mq-mipi-panel.img Boot image for i.MX 8MQuad EVK board to support MIPI panel output.
system.img System Boot image.
vbmeta-imx8mq.img Android Verify Boot metadata Image for i.MX 8MQuad EVK board to support HDMI output.
/vbmeta-imx8mq-mipi.img Android Verify Boot metadata image for i.MX 8MQuad EVK board to support MIPI-to-HDMI output.
/vbmeta-imx8mq-dual.img Android Verify Boot metadata image for i.MX 8MQuad EVK board to support HDMI and MIPI-to-HDMI dual output.
/vbmeta-imx8mq-mipi-panel.img Android Verify Boot metadata image for i.MX 8MQuad EVK board to support MIPI panel output.
vendor.img Vendor image for i.MX 8MQuad EVK board.

There are two methods for the build of Android image.

Method 1: Set the environment first and then issue the make command:

cd ${MY_ANDROID}
source build/envsetup.sh
make PRODUCT-XXX #XXX depends on different board, see table below:
i.MX Development Tool Description Image Build Command
Evaluation Kit i.MX 8MQuad EVK make PRODUCT-evk_8mq-userdebug>&1 | tee buildlog.txt

Method 2: Set the environment and then use lunch command to configure argument. See table below. An example for the i.MX 8MQuad EVK board is as follows:

cd ${MY_ANDROID}
source build/envsetup.sh
lunch evk_8mq-userdebug
make

Note: evk_8mq-userdebug creates a debuggable version of Android and evk_8mq-eng creates an engineering version of Android. Development mode enable and development tools are available on target.


[[IMX8/<Replace with "previous" page>|Previous: <Replace with "previous" page>]] Index [[IMX8/<Replace with "next" page>|Next: <Replace with "next" page>]]