IMX8/iMX8MEVK/Getting Started/Loading Pre-built Images: Difference between revisions
No edit summary |
mNo edit summary |
||
(65 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{IMX8/Head}}</noinclude> | <noinclude>{{IMX8/Head|previous=iMX8MEVK/Getting Started/Software Support|next=iMX8EVK/Yocto|metakeywords=evk,imx8evk,evaluation kit,i.MX8M Quad Evaluation Kit,iMX8MEVK,configure,configuring host machine,yocto images,android images,build,Building the Android platform}}</noinclude> | ||
== Yocto == | __TOC__ | ||
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. | == 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: | The '''.sdcard''' file includes the 4 elements required to boot the board: | ||
* Bootloader | * Bootloader | ||
Line 17: | Line 18: | ||
<syntaxhighlight lang=bash> | <syntaxhighlight lang=bash> | ||
## | |||
## 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 | BSP=L4.9.88_2.0.0_images_MX8MQ | ||
tar -xvf $BSP.tar.gz | tar -xvf $BSP.tar.gz | ||
Line 25: | Line 31: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Write the image to the SD Card=== | |||
<pre> | |||
DEVICE=/dev/sdX # The device may change in your system | |||
sudo dd if=$IMAGE_NAME.sdcard of=$DEVICE bs=4M && sync | |||
</pre> | |||
== 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. For more information refer to the [https://www.nxp.com/docs/en/user-guide/Android_User's_Guide.pdf Android User Guide]. | |||
=== 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. | |||
=== Get NXP Android BSP Image === | |||
The pre-built images from the package are categorized by the boot device and put in the directory with the device name. You can get the pre-built images from the latest [[IMX8/iMX8MEVK/Getting Started/Software_Support | Linux BSP]]. | |||
You need to decompress the BSP and decompress the bz2 image sdcard included in it. | |||
===Loading images onto an SD Card=== | |||
====Partition the SD card==== | |||
The images are inside the downloaded BSP tarball called '''<package_name>'''. Let's consider the tarball content is uncompressed in a folder called '''MY_ANDROID''' by running the following command: | |||
<pre> | |||
tar -xvf <package_name> | |||
</pre> | |||
'''IMPORTANT:''' The minimum SD card size required is '''8 GB'''. | |||
'''NOTE:''' Unmount all the SD card partitions before running any script inside the aforementioned folder: | |||
<pre> | |||
umount /dev/<device> | |||
</pre> | |||
Where the '''device''' can be recognized as one of the following options by the host machine: | |||
*'''sdX''' | |||
*'''mmcblkX''' | |||
*Other | |||
With '''X''' the disk index from ''''a'''' to ''''z''''. We have modified the original script in order to support any name the host computer assign to the SD card device. Such modified script can be obtained from [[iMX8MEVK/Getting_Started/Loading_Pre-built_Images/Android_SD_Partitions_RidgeRun_Script | this page]]. | |||
Once you have the pre-built images and the new version of the script, you are able to partition an SD card: | |||
<pre> | |||
cd ${MY_ANDROID}/ | |||
sudo ./fsl-sdcard-partition-rr.sh -f imx8mq -c <size_parameter> /dev/<device> | |||
</pre> | |||
Where the '''<size_parameter>''' should be selected from the table below. | |||
{| class="wikitable" style="margin-right: auto; margin-left: auto; border: none;" | |||
|- | |||
! style="background: black; color: white;" | SD Card Size!! style="background: black; color: white;" | Size Parameter | |||
|- | |||
! scope="row" | 8GB | |||
| style="text-align: center" | 7 | |||
|- | |||
! scope="row" | 16GB | |||
| style="text-align: center" | 14 | |||
|- | |||
! scope="row" | 32GB | |||
| style="text-align: center" | 28 | |||
|} | |||
Make sure you have the images required by the '''fsl-sdcard-partition.sh''' script are present inside the '''MY_ANDROID''' folder. The scripts could be the following: '''boot-loader''', '''boot image''', '''system image''', '''recovery image''', '''GPT table image''', and '''vendor image'''. This script requires to install the '''simg2img''' tool on the computer. '''simg2img''' is a tool that converts the sparse system image to raw system image on the Linux OS host computer. The '''android-toolsfsutils''' package includes the '''simg2img''' command for Ubuntu Linux OS. If you don't have '''simg2img''' in your host machine, install it as follows: | |||
<pre> | |||
sudo apt install android-tools-fsutils | |||
</pre> | |||
<noinclude>{{IMX8/Foot| | <noinclude>{{IMX8/Foot|iMX8MEVK/Getting Started/Software Support|iMX8EVK/Yocto}}</noinclude> |
Latest revision as of 17:05, 9 March 2023
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
Write the image to the SD Card
DEVICE=/dev/sdX # The device may change in your system sudo dd if=$IMAGE_NAME.sdcard of=$DEVICE bs=4M && sync
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. For more information refer to the Android User Guide.
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.
Get NXP Android BSP Image
The pre-built images from the package are categorized by the boot device and put in the directory with the device name. You can get the pre-built images from the latest Linux BSP. You need to decompress the BSP and decompress the bz2 image sdcard included in it.
Loading images onto an SD Card
Partition the SD card
The images are inside the downloaded BSP tarball called <package_name>. Let's consider the tarball content is uncompressed in a folder called MY_ANDROID by running the following command:
tar -xvf <package_name>
IMPORTANT: The minimum SD card size required is 8 GB.
NOTE: Unmount all the SD card partitions before running any script inside the aforementioned folder:
umount /dev/<device>
Where the device can be recognized as one of the following options by the host machine:
- sdX
- mmcblkX
- Other
With X the disk index from 'a' to 'z'. We have modified the original script in order to support any name the host computer assign to the SD card device. Such modified script can be obtained from this page.
Once you have the pre-built images and the new version of the script, you are able to partition an SD card:
cd ${MY_ANDROID}/ sudo ./fsl-sdcard-partition-rr.sh -f imx8mq -c <size_parameter> /dev/<device>
Where the <size_parameter> should be selected from the table below.
SD Card Size | Size Parameter |
---|---|
8GB | 7 |
16GB | 14 |
32GB | 28 |
Make sure you have the images required by the fsl-sdcard-partition.sh script are present inside the MY_ANDROID folder. The scripts could be the following: boot-loader, boot image, system image, recovery image, GPT table image, and vendor image. This script requires to install the simg2img tool on the computer. simg2img is a tool that converts the sparse system image to raw system image on the Linux OS host computer. The android-toolsfsutils package includes the simg2img command for Ubuntu Linux OS. If you don't have simg2img in your host machine, install it as follows:
sudo apt install android-tools-fsutils