Imx Linux Users Guide
Imx Linux Users Guide
Document information
Information Content
Keywords i.MX, Linux, LF6.6.36_2.1.0
Abstract This document describes how to build and install the i.MX Linux OS BSP, where BSP stands for
Board Support Package, on the i.MX platform. It also covers special i.MX features and how to use
them.
NXP Semiconductors
UG10163
i.MX Linux User's Guide
1 Overview
This document describes how to build and install the i.MX Linux OS BSP, where BSP stands for Board Support
Package, on the i.MX platform. It also covers special i.MX features and how to use them.
The document also provides the steps to run the i.MX platform, including board DIP switch settings, and
instructions on configuring and using the U-Boot bootloader.
The later chapters describe how to use some i.MX special features when running the Linux OS kernel.
Features covered in this guide may be specific to particular boards or SoCs. For the capabilities of a particular
board or SoC, see the i.MX Linux Release Notes (RN00210).
1.1 Audience
This document is intended for software, hardware, and system engineers who are planning to use the product,
and for anyone who wants to know more about the product.
1.2 Conventions
This document uses the following conventions:
• Courier New font: This font is used to identify commands, explicit command parameters, code examples,
expressions, data types, and directives.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
1.4 References
i.MX has multiple families supported in software. The following are the listed families and SoCs per family. The
i.MX Linux Release Notes describes which SoC is supported in the current release. Some previously released
SoCs might be buildable in the current release but not validated if they are at the previous validated level.
• i.MX 6 Family: 6QuadPlus, 6Quad, 6DualLite, 6SoloX, 6SLL, 6UltraLite, 6ULL, 6ULZ
• i.MX 7 Family: 7Dual, 7ULP
• i.MX 8 Family: 8QuadMax, 8QuadPlus, 8ULP
• i.MX 8M Family: 8M Plus, 8M Quad, 8M Mini, 8M Nano
• i.MX 8X Family: 8QuadXPlus, 8DXL, 8DXL OrangeBox, 8DualX
• i.MX 9 Family: i.MX 91, i.MX 93, i.MX 95
This release includes the following references and additional information.
• i.MX Linux Release Notes (RN00210) - Provides the release information.
• i.MX Linux User's Guide (UG10163) - Provides the information on installing U-Boot and Linux OS and using
i.MX-specific features.
• i.MX Yocto Project User's Guide (UG10164) - Describes the board support package for NXP development
systems using Yocto Project to set up host, install tool chain, and build source code to create images.
• i.MX Porting Guide (UG10165) - Provides the instructions on porting the BSP to a new board.
• i.MX Machine Learning User's Guide (UG10166) - Provides the machine learning information.
• i.MX DSP User's Guide (UG10167) - Provides the information on the DSP for i.MX 8.
• i.MX 8M Plus Camera and Display Guide (UG10168) - Provides the information on the ISP Independent
Sensor Interface API for the i.MX 8M Plus.
• i.MX Digital Cockpit Hardware Partitioning Enablement for i.MX 8QuadMax (UG10169) - Provides the i.MX
Digital Cockpit hardware solution for i.MX 8QuadMax.
• i.MX Graphics User's Guide (UG10159) - Describes the graphics features.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• Harpoon User's Guide (HRPNUG_3.1) - Presents the Harpoon release for i.MX 8M device family.
• i.MX Linux Reference Manual (RM00293) - Provides the information on Linux drivers for i.MX.
• i.MX VPU Application Programming Interface Linux Reference Manual (RM00294) - Provides the reference
information on the VPU API on i.MX 6 VPU.
• EdgeLock Enclave Hardware Security Module API (RM00284) - This document is a software reference
description of the API provided by the i.MX 8ULP, i.MX 93, and i.MX 95 Hardware Security Module (HSM)
solutions for the EdgeLock Enclave (ELE) Platform.
The quick start guides contain basic information on the board and setting it up. They are on the NXP website.
• SABRE Platform Quick Start Guide (IMX6QSDPQSG)
• i.MX 6UltraLite EVK Quick Start Guide (IMX6ULTRALITEQSG)
• i.MX 6ULL EVK Quick Start Guide (IMX6ULLQSG)
• i.MX 7Dual SABRE-SD Quick Start Guide (SABRESDBIMX7DUALQSG)
• i.MX 8M Quad Evaluation Kit Quick Start Guide (IMX8MQUADEVKQSG)
• i.MX 8M Mini Evaluation Kit Quick Start Guide (8MMINIEVKQSG)
• i.MX 8M Nano Evaluation Kit Quick Start Guide (8MNANOEVKQSG)
• i.MX 8QuadXPlus Multisensory Enablement Kit Quick Start Guide (IMX8QUADXPLUSQSG)
• i.MX 8QuadMax Multisensory Enablement Kit Quick Start Guide (IMX8QUADMAXQSG)
• i.MX 8M Plus Evaluation Kit Quick Start Guide (IMX8MPLUSQSG)
• i.MX 8ULP EVK Quick Start Guide (IMX8ULPQSG)
• i.MX 8ULP EVK9 Quick Start Guide (IMX8ULPEVK9QSG)
• i.MX 93 EVK Quick Start Guide (IMX93EVKQSG)
• i.MX 93 9x9 QSB Quick Start Guide (93QSBQSG)
Documentation is available online at nxp.com.
• i.MX 6 information is at nxp.com/iMX6series
• i.MX SABRE information is at nxp.com/imxSABRE
• i.MX 6UltraLite information is at nxp.com/iMX6UL
• i.MX 6ULL information is at nxp.com/iMX6ULL
• i.MX 7Dual information is at nxp.com/iMX7D
• i.MX 7ULP information is at nxp.com/imx7ulp
• i.MX 8 information is at nxp.com/imx8
• i.MX 6ULZ information is at nxp.com/imx6ulz
• i.MX 91 information is at nxp.com/imx91.
• i.MX 93 information is at nxp.com/imx93
• i.MX 95 information is at nxp.com/imx95
The latest DDR configuration and test tools are available online at nxp.com and at NXP Community:
• i.MX 6/7:
i.MX 6/7 Series DDR Tool Release
• i.MX 8:
i.MX 8M Family DDR Tool Release
i.MX 8/8X Family DDR Tools Release
• i.MX 9 series:
Config Tools for i.MX Applications Processors
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
2 Introduction
The i.MX Linux BSP is a collection of binary files, source code, and support files that can be used to create a U-
Boot bootloader, a Linux kernel image, and a root file system for i.MX development systems. The Yocto Project
is the framework of choice to build the images described in this document, although other methods can be used.
All the information on how to set up the Linux OS host, how to run and configure a Yocto Project, generate an
image, and generate a rootfs, are covered in the i.MX Yocto Project User's Guide (UG10164).
When Linux OS is running, this guide provides information on how to use some special features that i.MX SoCs
provide. The release notes provide the features that are supported on a particular board.
The i.MX 8 board connects the host driver using the micro USB connector. The USB to serial driver can be
found under www.ftdichip.com/Drivers/VCP.htm. The FT4232 USB to serial converter provides four serial ports.
The i.MX 8 board uses the first port for the Arm Cortex-A cores console and the second port for SCU's console.
Users need to select the first port (COM) in the terminal setup. The i.MX 8DXL board uses the third and fourth
ports respectively for Arm Cortex-A cores console and SCU console.
4 Booting Linux OS
Before booting the Linux OS kernel on an i.MX board, copy the images (U-Boot, Linux kernel, device tree, and
rootfs) to a boot device and set the boot switches to boot that device. There are various ways to boot the Linux
OS for different boards, boot devices, and results desired. This section describes how to prepare a boot device,
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
where files need to be in the memory map, how to set switches for booting, and how to boot Linux OS from U-
Boot.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
4.1.1 Bootloader
U-Boot is the tool recommended as the bootloader for i.MX 6 and i.MX 7. i.MX 8 and i.MX 9 require a
bootloader that includes U-Boot as well as other components described below. U-Boot must be loaded onto a
device to be able to boot from it. U-Boot images are board-specific and can be configured to support booting
from different sources.
The pre-built or Yocto project default bootloader names start with the name of the bootloader followed by the
name of the platform and board and followed by the name of the device that this image is configured to boot
from: u-boot-[platform][board]_[machine_configuration].bin. If no boot device is specified, it
boots from SD/MMC.
The manufacturing tool can be used to load U-Boot onto all devices with i.MX 6 and i.MX 7. U-Boot can be
loaded directly onto an SD card using the Linux dd command. U-Boot can be used to load a U-Boot image onto
some other devices.
On i.MX 8, the U-Boot cannot boot the device by itself. The i.MX 8 pre-built images or Yocto Project default
bootloader is imx-boot for the SD card, which is created by the imx-mkimage. The imx-boot binary
includes the U-Boot, Arm trusted firmware, DCD file (8QuadMax/8QuadXPlus/8DXL), system controller
firmware (8QuadMax/8QuadXPlus/8DXL), SPL (8M SoC), DDR firmware (8M), HDMI firmware (8M Quad), and
SECO firmware (8QuadMax/8QuadXPlus/8DXL).
On i.MX 8M SoC, the second program loader (SPL) is enabled in U-Boot. SPL is implemented as the first-level
bootloader running on TCML (For i.MX 8M Nano and i.MX 8M Plus, the first-level bootloader runs in OCRAM).
It is used to initialize DDR and load U-Boot, U-Boot DTB, Arm trusted firmware, and TEE OS (optional) from
the boot device into the memory. After SPL completes loading the images, it jumps to the Arm trusted firmware
BL31 directly. The BL31 starts the optional BL32 (TEE OS) and BL33 (U-Boot) for continue booting kernel.
In imx-boot, the SPL is packed with DDR Firmware together, so that ROM can load them into Arm Cortex-M4
TCML or OCRAM (only for i.MX 8M Nano and i.MX 8M Plus). The U-Boot, U-Boot DTB, Arm Trusted firmware,
and TEE OS (optional) are packed into a FIT image, which is finally built into imx-boot.
On i.MX 8, i.MX 8M, i.MX 8ULP, i.MX 93, and i.MX 91, the kernel is 64 bit and device trees are located in the
arch/arm64/boot/dts/freescale folder and use the dts extension. The kernel is built using linux-imx
software provided in the release package and the filename starting with Image.
The Universal Update Utility (UUU) runs on a Windows or Linux OS host and is used to download images to
different devices on an i.MX board.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The following command decompresses zst file and writes into eMMC:
The following command executes downloading and bootloader (SPL and U-Boot) by USB:
The following command burns into eMMC (If only one board is supported in such a release package and the
board supports eMMC chip):
Note:
For i.MX 8QuadXPlus B0, UUU flashes the eMMC image to boot partition with 32 KB offset. It may not be
compatible with all eMMC devices. It is recommended to enable eMMC fastboot mode and use the UUU kernel
version script to flash the eMMC image to boot partition with 0 offset.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
$ cat /proc/partitions
major minor #blocks name
8 0 78125000 sda
8 1 75095811 sda1
8 2 1 sda2
8 5 3028221 sda5
8 32 488386584 sdc
8 33 488386552 sdc1
8 16 3921920 sdb
8 18 3905535 sdb1
In this example, the device node assigned is /dev/sdb (a block is 1024 Bytes).
Note: Make sure that the device node is correct for the SD/MMC card. Otherwise, it may damage your
operating system or data on your computer.
The entire contents of the SD card are replaced. If the SD card is larger than 4 GB, the additional space is not
accessible.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Each of them copies the kernel to the media at offset 1 MB (bs x seek = 512 x 2048 = 1 MB). The file
zImage_imx_v7_defconfig refers to the zImage file created when using the imx_v7_defconfig
configuration file, which supports both i.MX 6 and i.MX 7 SoCs.
The i.MX DTB image can be copied by using the copy command and copying the file to the 2nd partition or the
following commands copy an i.MX DTB image to the SD/MMC card by using dd command.
Choose a command for your board:
For i.MX 6 and i.MX 7, the following command can be used to copy the kernel image to the boards, such as the
i.MX 6UltraLite EVK board and i.MX 6ULL EVK board:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
For i.MX 6 and i.MX 7, this copies the board-specific .dtb file to the media at offset 10 MB (bs x seek = 512 x
20480 = 10 MB).
$ mkdir /home/user/mountpoint
$ sudo mount /dev/sdx2 /home/user/mountpoint
$ cd /home/user/rootfs
$ tar -jxvf imx-image-multimedia-imx7ulpevk.tar.zst
$ cd /home/user/rootfs
$ sudo cp -a * /home/user/mountpoint
$ sudo umount /home/user/mountpoint
$ sync
Images can be downloaded to a device using a U-Boot image that is already loaded on the boot device or by
using the Manufacturing Tool UUU. Use a terminal program to communicate with the i.MX boards.
Alternatively, users can flash the Arm Cortex-M4 image from TFTP by performing the following steps:
1. Boot from the SD card.
2. TFTP the Arm Cortex-M4 image.
U-Boot > tftp ${loadaddr} m4_qspi.bin
3. Select the NOR flash on QuadSPI2 PortB CS0 on the i.MX 6SoloX SABRE-SD board.
U-Boot > sf probe 1:0
Select the NOR flash on QuadSPI1 PortA CS0 on the i.MX 7Dual SABRE-SD board and i.MX 7ULP EVK
board.
U-Boot > sf probe 0:0
4. Flash the Arm Cortex-M4 image to the selected NOR flash. The erase size is ${filesize}, around 64
Kbytes. This example assumes that it is 128 Kbytes.
U-Boot > sf erase 0x0 0x20000
U-Boot > sf write ${loadaddr} 0x0 ${filesize}
i.MX 7Dual SABRE-SD needs to program the Arm Cortex-M4 images to 1 MB offset, because the first 1 MB
is used by the U-Boot image in QuadSPI.
U-Boot > sf erase 0x100000 0x20000
U-Boot > sf write ${loadaddr} 0x100000 ${filesize}
Note:
On i.MX 7Dual SABRE-SD, the Arm Cortex-M4 image on QuadSPI is supported only when the U-Boot image is
built by the target mx7dsabresd_qspi1_defconfig booted by U-Boot from QuadSPI.
The default U-Boot for the i.MX 7Dual SABRESD board uses the Cortex-M4 image from the SD card and runs it
on OCRAM.
On i.MX 7ULP EVK, the Arm Cortex-M4 image needs to be programmed. Otherwise, it will not boot.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The i.MX 7ULP EVK board also supports to rework eMMC on the MicroSD port. The following steps describe
how to use this memory device.
Note:
To enable the full features for i.MX 7ULP, burn the Arm Cortex-M4 image to QuadSPI. It is recommended to use
the MfgTool script uuu LF6.6.36_2.1.0_images_MX7ULPEVK.zip\uuu_sd_m4.auto to burn both BSP
and Arm Cortex-M4 images.
1. Execute the following command on the U-Boot console to clean up the environments stored on eMMC:
U-Boot > env default -f -a
U-Boot > save
U-Boot > reset
2. Configure the boot pin. Power on the board and set the U-Boot environment variables as required. For
example,
U-Boot > setenv serverip <your tftpserver ip>
U-Boot > setenv bootfile <your kernel zImage/Image name on the tftp server>
U-Boot > setenv fdtfile <your dtb image name on the tftp server>
### The user can set fake MAC address via ethaddr enviroment if the MAC
address is not fused
U-Boot > setenv ethaddr 00:01:02:03:04:05
U-Boot > save
3. Copy zImage to the TFTP server. Then download it to RAM:
U-Boot > dhcp
4. Query the information about the eMMC chip.
U-Boot > mmc dev
U-Boot > mmcinfo
5. Check the usage of the mmc command. blk# is equal to <the offset of read/write>/<block
length of the card>. cnt is equal to <the size of read/write>/<block length of the
card>.
mmc read addr blk# cnt
mmc write addr blk# cnt
mmc erase blk# cnt
mmc rescan
mmc part - lists available partition on current mmc device
mmc dev [dev] [part] - show or set current mmc device [partition]
mmc list - lists available devices
6. Program the kernel zImage/Image into eMMC. For example, the command below writes the image with
the size 0x800000 from ${loadaddr} to the offset 0x100000 of the eMMC chip. Here, the following
equations are used: 0x800 =0x100000/0x200, 0x4000=0x800000/0x200. The block size of this card is
0x200. This example assumes that the kernel image is less than 0x800000 bytes. If the kernel image
exceeds 0x800000, enlarge the image length.
### Select mmc dev 2 (USDHC4) on the i.MX 6 SABRESD board:
U-Boot > mmc dev 2 0
### Select mmc dev 1 (USDHC3) on the i.MX 7Dual SABRESD board:
U-Boot > mmc dev 1 0
### Select mmc dev 1 (USDHC2) on the i.MX 6UltraLite EVK board:
U-Boot > mmc dev 1 0
### Select mmc dev 0 (USDHC1) on the i.MX 7ULP EVK board:
U-Boot > mmc dev 0 0
### Select mmc dev 0 (eMMC0) on the i.MX 8QuadMax MEK, i.MX 8QuadXPlus MEK,
i.MX 8M Quad, 8DualX, and 8DXL boards:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
3. Flash the Arm Cortex-M4 image from the SD card to the NOR flash on QuadSPI2 PortB CS0 on the i.MX
6SoloX SABRE-SD board or QuadSPI1 PortA CS0 offset 1 MB on the i.MX 7Dual SABRE-SD board.
U-Boot > run update_m4_from_sd
Alternatively, users can flash the Arm Cortex-M4 image from TFTP by performing the following steps:
1. Boot from the SD card.
2. TFTP the Arm Cortex-M4 image.
U-Boot > tftp ${loadaddr} m4_qspi.bin
3. Select the NOR flash on QuadSPI2 PortB CS0 on the i.MX 6SoloX SABRE-SD board.
U-Boot > sf probe 1:0
Select the NOR flash on QuadSPI1 PortA CS0 on the i.MX 7Dual SABRE-SD board and i.MX 7ULP EVK
board.
U-Boot > sf probe 0:0
4. Flash the Arm Cortex-M4 image to the selected NOR flash. The erase size is ${filesize}, around 64
Kbytes. This example assumes that it is 128 Kbytes.
U-Boot > sf erase 0x0 0x20000
U-Boot > sf write ${loadaddr} 0x0 ${filesize}
i.MX 7Dual SABRE-SD needs to program the Arm Cortex-M4 images to 1 MB offset, because the first 1 MB
is used by the U-Boot image in QuadSPI.
U-Boot > sf erase 0x100000 0x20000
U-Boot > sf write ${loadaddr} 0x100000 ${filesize}
Note:
On i.MX 7Dual SABRE-SD, the Arm Cortex-M4 image on QuadSPI is supported only when the U-Boot image is
built by the target mx7dsabresd_qspi1_defconfig booted by U-Boot from QuadSPI.
The default U-Boot for the i.MX 7Dual SABRESD board uses the Cortex-M4 image from the SD card and runs it
on OCRAM.
On i.MX 7ULP EVK, the Arm Cortex-M4 image needs to be programmed. Otherwise, it will not boot.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The following is an example to format the first partition to a 50 MB vfat filesystem and format the second
partition to an ext4 filesystem:
~$ fdisk /dev/sdb
Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1): 1
First sector (2048-30318591, default 2048): 4096
Last sector, +sectors or +size{K,M,G} (4096-30318591, default 30318591): +50M
Command (m for help): p
Disk /dev/sdb: 15.5 GB, 15523119104 bytes
64 heads, 32 sectors/track, 14804 cylinders, total 30318592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3302445d
Device Boot Start End Blocks Id System
/dev/sdb1 4096 106495 51200 83 Linux
Command (m for help): n
Partition type:
p primary (1 primary, 0 extended, 3 free)
e extended
Select (default p): p
Partition number (1-4, default 2): 2
First sector (2048-30318591, default 2048): 106496
Last sector, +sectors or +size{K,M,G} (106496-30318591, default 30318591):
Using default value 30318591
Command (m for help): p
Disk /dev/sdb: 15.5 GB, 15523119104 bytes
64 heads, 32 sectors/track, 14804 cylinders, total 30318592 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3302445d
Device Boot Start End Blocks Id System
/dev/sdb1 4096 106495 51200 83 Linux
/dev/sdb2 106496 30318591 15106048 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
~$ mkfs.vfat /dev/mmcblk0p1
~$ mkfs.ext4 /dev/mmcblk0p2
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The following table shows the DIP switch settings for booting from the SD card slot labeled SD1 on the i.MX
7ULP EVK boards.
The following table shows the bootcfg pin settings for booting from the SD card slot labeled SD1 on the i.MX
8QuadMax MEK boards.
The following table shows the bootcfg pin settings for booting from the SD card slot labeled SD1 on the i.MX
8QuadXPlus MEK boards.
Note: This is the same setting for the i.MX 8DualX MEK and i.MX 8DXL EVK boards.
The i.MX 6UltraLite EVK board or i.MX 6ULL EVK board has one TF card slot on the CPU board. This slot uses
the USDHC2 controller. The following table shows the DIP switch settings for booting from the TF slot.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 7. Booting from TF on i.MX 6UltraLite EVK and i.MX 6ULL EVK
Switch D1 D2 D3 D4
SW601 OFF OFF ON OFF
SW602 ON OFF - -
The i.MX 8M Quad EVK board has one TF card slot. This slot uses the USDHC2 controller. The following table
shows the DIP switch settings for booting from the TF slot.
The i.MX 8M Mini EVK board has one TF card slot. This slot uses the USDHC2 controller. The following table
shows the DIP switch settings for booting from the TF slot.
The i.MX 8M Nano EVK board has one TF card slot. This slot uses the USDHC2 controller. The following table
shows the DIP switch settings for booting from the TF slot.
The i.MX 8M Plus EVK board has one TF card slot. This slot uses the USDHC2 controller. The following table
shows the DIP switch settings for booting from the TF slot.
The following table shows the DIP switch settings for booting from the USDHC2 slot.
Table 12. Booting from USDHC2 on i.MX 93 11x11 EVK and i.MX 91 11x11 EVK
Switch D1 D2 D3 D4
SW1301 OFF ON OFF OFF
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 15. Booting from USDHC2 on i.MX 95 19x19 EVK and i.MX 95 15x15 EVK
Switch D1 D2 D3 D4
SW7 ON OFF ON ON
The following table shows the DIP switch settings to boot from an SD card in slot SD3 on i.MX 6SoloX SABRE-
AI boards.
Table 17. Booting from an MMC card in Slot SD3 on i.MX 6SoloX SABRE-AI
Switch D1 D2 D3 D4 D5 D6 D7 D8
S4 OFF ON OFF X OFF OFF ON OFF
S3 X OFF OFF OFF ON ON OFF OFF
S1 OFF OFF ON OFF - - - -
The following table shows the DIP switch settings for booting from SD3, also labeled as J507. The SD3 slot is
located between the HDMI and UART ports.
Table 19. Booting from an SD card in slot SD4 on i.MX 6SoloX SABRE-SD
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW10 OFF OFF OFF OFF OFF OFF OFF OFF
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 19. Booting from an SD card in slot SD4 on i.MX 6SoloX SABRE-SD...continued
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW11 OFF OFF ON ON ON OFF OFF OFF
SW12 OFF ON OFF OFF OFF OFF OFF OFF
Table 20. Booting from an MMC card in slot SD4 on i.MX 6SoloX SABRE-SD
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW10 OFF OFF OFF OFF OFF OFF OFF OFF
SW11 OFF OFF ON ON ON OFF OFF OFF
SW12 OFF ON ON OFF OFF OFF OFF OFF
i.MX 7Dual is different from i.MX 6. The eMMC uses the SD3 pin connections from the i.MX 7Dual processor.
The following table shows the boot switch settings to boot from eMMC4.4 on the i.MX 7ULP EVK boards.
The following table shows the boot switch settings to boot from eMMC5.0 on the i.MX 8QuadMax MEK boards.
The following table shows the boot switch settings to boot from eMMC5.0 on the i.MX 8QuadXPlus MEK
boards.
Note: This is the same setting for the i.MX 8DualX MEK and i.MX 8DXL EVK boards, except that 8DXL EVK
uses SW1.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The following table shows the boot switch settings to boot from eMMC5.0 on the i.MX 8M Quad EVK boards.
The following table shows the boot switch settings to boot from eMMC5.1 on the i.MX 8M Mini EVK boards.
The following table shows the boot switch settings to boot from eMMC5.1 on the i.MX 8M Nano EVK boards.
The following table shows the boot switch settings to boot from eMMC5.1 on the i.MX 8M Plus EVK boards.
The following table lists the boot switch settings to boot from eMMC5.1 on the i.MX 8ULP EVK.
Table 31. Dualboot booting from eMMC for A35 on i.MX 8ULP EVK
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW5 OFF ON OFF OFF OFF OFF OFF ON
Table 32. Booting from eMMC on i.MX 93 11x11 EVK and i.MX 91 11x11 EVK
Switch D1 D2 D3 D4
SW1301 OFF OFF OFF OFF
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 35. Booting from eMMC on i.MX 95 19x19 EVK and i.MX 95 15x15 EVK
Switch D1 D2 D3 D4
SW7 ON OFF ON OFF
The following table shows the DIP switch settings needed to boot from NAND for i.MX 7Dual SABRE-SD
boards.
The following table shows the DIP switch settings needed to boot from NAND for i.MX 8M Mini DDR4 EVK
boards.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Note:
SPI and EIM NOR have pin conflicts on i.MX 6 SABRE-AI boards. Neither can be used for the same
configuration. The default U-Boot configuration is set to SPI NOR.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 46. Booting from QuadSPI on i.MX 6UltraLite EVK and i.MX 6ULL EVK
Switch D1 D2 D3 D4
SW601 OFF OFF OFF OFF
SW602 ON OFF - -
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 52. Singleboot booting from FlexSPI NOR on i.MX 8ULP EVK
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW5 OFF OFF OFF OFF OFF ON OFF ON
Table 53. Dualboot booting from FlexSPI for A35 on i.MX 8ULP EVK
Switch D1 D2 D3 D4 D5 D6 D7 D8
SW5 OFF ON OFF OFF OFF ON OFF ON
Table 54. Booting from M.2 FlexSPI NOR on i.MX 91 11x11 EVK
Switch D1 D2 D3 D4
SW1301 OFF ON OFF ON
Table 55. Booting from M.2 FlexSPI NOR on i.MX 91 9x9 QSB
Switch D1 D2 D3 D4
SW3 OFF ON OFF OFF
SW4 OFF X X X
Table 58. Setup for the Manufacturing Tool on i.MX 7Dual SABRE-SD
Switch D1 D2 D3 D4
S3 OFF ON - -
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 59. Setup for Manufacturing Tool on i.MX 6UltraLite EVK and i.MX 6ULL EVK
Switch D1 D2
SW602 OFF ON
Note:
The following settings are same for the i.MX 8DualX MEK and i.MX 8DXL EVK boards (8DXL EVK uses SW1).
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 68. Setup for Manufacturing Tool on i.MX 93 11x11 EVK and i.MX 91 11x11 EVK
Switch D1 D2 D3 D4
SW1301 ON ON OFF OFF
Table 71. Setup for Manufacturing Tool on i.MX 95 19x19 EVK and i.MX 95 15x15 EVK
Switch D1 D2 D3 D4
SW7 ON OFF OFF ON
Note:
If the SD card with bootable image is plugged in SD2 (baseboard), ROM will not fall back into the serial
download mode.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• From the build directory, the bitbake was run in, copy the sh file in tmp/deploy/sdk to the host machine
to build on and execute the script to install the SDK. The default location is in /opt, but it can be placed
anywhere on the host machine.
On the host machine, the following are the steps to build U-Boot and Kernel.
Toolchain Configuration:
• For i.MX 6 and i.MX 7 builds on the host machine, set the environment with the following command before
building.
source /opt/fsl-imx-fb/6.6-nanbield/environment-setup-cortexa9hf-neon-poky-linux-gnueab
export ARCH=arm
• For i.MX 8 and i.MX 9 builds on the host machine, set the environment with the following command before
building.
source /opt/fsl-imx-xwayland/6.6-nanbield/environment-setup-aarch64-poky-linux
export ARCH=arm64
U-Boot:
Download source by cloning with:
• To build an i.MX 6 or i.MX 7 U-Boot in the standalone environment, find the configuration for the target boot. In
the following example, i.MX 6ULL is the target.
make clean
make mx6ull_14x14_evk_defconfig
make
• To build an i.MX 8 U-Boot in the standalone environment, find the configuration for the target boot. In the
following example, i.MX 8QuadMax MEK board is the target and it runs on the Arm Cortex-A53 core by
default. SPL image (u-boot-spl.bin) is also generated with the default defconfig. It is needed when booting with
OP-TEE image.
make distclean
make imx8qm_mek_defconfig
make
For i.MX 8QuadXPlus MEK and i.MX 8DualX board:
make distclean
make imx8qxp_mek_defconfig
make
For i.MX 8DXL EVK board:
make distclean
make imx8dxl_evk_defconfig
make
• For i.MX 8M Quad EVK:
make distclean
make imx8mq_evk_defconfig
make
• For i.MX 8M LPDDR4 EVK:
make distclean
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
make imx8mm_evk_defconfig
make
• For i.MX 8M DDR4 EVK:
make distclean
make imx8mm_ddr4_evk_defconfig
make
• For i.MX 8M Plus LPDDR4 EVK board:
make distclean
make imx8mp_evk_defconfig
make
• For i.MX 8ULP EVK board:
make distclean
make imx8ulp_evk_defconfig
make
• For i.MX 93 11x11 EVK board:
make distclean
make imx93_11x11_evk_defconfig
make
• For i.MX 93 9x9 QSB board:
make distclean
make imx93_9x9_qsb_defconfig
make
Kernel:
Download source by cloning with:
• To build the kernel in the standalone environment for i.MX 6 and i.MX 7, execute the following commands:
make imx_v7_defconfig
make
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• To build the kernel in the standalone environment for i.MX 8 and i.MX 9, execute the following commands:
make imx_v8_defconfig
make
Note:
Users need to modify configurations for fused parts. For example, the i.MX 6UltraLite has four parts, G0, G1,
G2, and G3.
The fused modules are as follows:
• G0: TSC, ADC2, FLEXCAN1, FLEXCAN2, FREQ_MON, TEMP_MON, VOLT_MONLCDIF, CSI, ENET2,
CAAM, USB_OTG2, SAI23, BEE, UART5678, PWM5678, ECSPI34, I2C34, GPT2, and EPIT2.
• G1: TSC, ADC2, FLEXCAN2, FREQ_MON, TEMP_MON, VOLT_MON, LCDIF, CSI, ENET2, and BEE.
• G2: FREQ_MON, TEMP_MON, VOLT_MON, and BEE.
• G3: No fused module.
U-Boot configuration changes:
G0:
/* #define CONFIG_VIDEO */
#define CONFIG_FEC_ENET_DEV 0
/* #define CONFIG_CMD_BEE */
#define CONFIG_USB_MAX_CONTROLLER_COUNT 1
G1:
/* #define CONFIG_VIDEO */
#define CONFIG_FEC_ENET_DEV 0
/* #define CONFIG_CMD_BEE */
G2:
/* #define CONFIG_CMD_BEE */
G3: No change.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 72. Matrix table for targets of i.MX 8QuadMax, i.MX 8QuadXPlus, and i.MX 8DXL
- OP-TEE U-Boot SPL Cortex-M4
flash_spl Yes Yes Yes No
flash No Yes No No
flash_linux_m4 Yes Yes Yes Yes
flash_regression_ No Yes No Yes
linux_m4
For i.MX 8ULP EVK, to build imx-boot image by using imx-mkimage, perform the following steps:
1. Copy u-boot.bin from u-boot/u-boot.bin and u-boot-spl.bin from u-boot/spl/u-boot-
spl.bin to imx-mkimage/iMX8ULP/.
2. Copy bl31.bin from Arm Trusted firmware (imx-atf) to imx-mkimage/iMX8ULP/.
3. Copy the image of Sentinel firmware container mx8ulpa0-ahab-container.img to imx-mkimage/
iMX8ULP/.
4. Copy the image of uPower firmware image upower.bin to imx-mkimage/iMX8ULP/.
5. Copy the Cortex-M33 image m33_image.bin to imx-mkimage/iMX8ULP/.
6. If using OP-TEE, copy tee.bin to imx-mkimage/iMX8ULP/. The bl31.bin copied in Step 2 must be
built with OP-TEE SPD enabled.
7. Run make SOC=iMX8ULP flash_singleboot_m33 to generate flash.bin.
Note: For the location where the binaries for Sentinel/SECO/uPower/M33/V2X firmwares are available to
download, see the Table "BSP and multimedia standard packages" in the i.MX Linux Release Notes (RN00210).
The following table list the imx-mkimage targets used on i.MX 8ULP.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Dual Boot make SOC=iMX8ULP flash_ For RAM target: 1000_0010 A35-eMMC/
dualboot make SOC=iMX8ULP M33-NOR
make SOC=iMX8ULP flash_ flash_dualboot_m33For Flash target: 1010_0010 A35-Nor/
dualboot_flexspi make SOC=iMX8ULP flash_ M33-NOR
dualboot_m33_xip
Low Power - 1000_00x1 A35-eMMC/
Boot M33-NOR
- 1010_00x1 A35-Nor/
M33-NOR
For i.MX 8M EVK, to build imx-boot image by using imx-mkimage, perform the following steps:
1. Copy and rename mkimage from u-boot/tools/mkimage to imx-mkimage/iMX8M/mkimage_uboot.
2. Copy u-boot-spl.bin from u-boot/spl/u-boot-spl.bin to imx-mkimage/iMX8M/.
3. Copy u-boot-nodtb.bin from u-boot/u-boot-nodtb.bin to imx-mkimage/iMX8M/.
4. Copy imx8mq-evk.dtb (for i.MX 8M Quad EVK), imx8mm-evk.dtb (for i.MX 8M Mini LPDDR4 EVK),
imx8mm-ddr4-evk.dtb (for i.MX 8M Mini DDR4 EVK), or imx8mp-evk.dtb (for i.MX 8M Plus LPDDR4
EVK) from u-boot/arch/arm/dts/ to imx-mkimage/iMX8M/.
5. Copy bl31.bin from Arm Trusted Firmware (imx-atf) to imx-mkimage/iMX8M/.
6. Copy firmware/hdmi/cadence/signed_hdmi_imx8m.bin from the firmware-imx package to imx-
mkimage/iMX8M/.
7. For i.MX 8M Quad and i.MX 8M Mini LPDDR4 EVK, copy lpddr4_pmu_train_1d_dmem.bin,
lpddr4_pmu_train_1d_imem.bin, lpddr4_pmu_train_2d_dmem.bin, and
lpddr4_pmu_train_2d_imem.bin from firmware/ddr/synopsys of the firmware-imx package to
imx-mkimage/iMX8M/.
For i.MX 8M Mini DDR4 EVK, copy ddr4_imem_1d.bin, ddr4_dmem_1d.bin, ddr4_imem_2d.bin,
and ddr4_dmem_2d.bin from firmware/ddr/synopsys of the firmware-imx package to imx-
mkimage/iMX8M.
For i.MX 8M Plus LPDDR4 EVK, copy lpddr4_pmu_train_1d_dmem_201904.bin,
lpddr4_pmu_train_1d_imem_201904.bin, lpddr4_pmu_train_2d_dmem_201904.bin, and
lpddr4_pmu_train_2d_imem_201904.bin from firmware/ddr/synopsys of the firmware-imx
package to imx-mkimage/iMX8M/.
8. For i.MX 8M Quad EVK, run make SOC=iMX8M flash_evk to generate flash.bin (imx-boot image)
with HDMI FW included.
For i.MX 8M Mini LPDDR4 EVK, run make SOC=iMX8MM flash_evk to generate flash.bin (imx-boot
image).
For i.MX 8M Mini DDR4 EVK, run make SOC=iMX8MM flash_ddr4_evk to generate flash.bin (imx-
boot image).
For i.MX 8M Plus LPDDR4 EVK, run make SOC=iMX8MP flash_evk to generate flash.bin (imx-boot-
image).
To boot with eMMC fasboot on i.MX 8M Quad EVK and i.MX 8M Mini LPDDR4 EVK, use
flash_evk_emmc_fastboot target.
For i.MX 93 A1 and i.MX 91, to build imx-boot image by using imx-mkimage, perform the following steps:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
mtdparts=gpmi-nand:64m(boot),16m(kernel),16m(dtb),-(rootfs)
mtdparts=8000000.nor:1m(uboot),-(rootfs)
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
mtdparts=spi32766.0:768k(uboot),8k(env),128k(dtb),-(kernel)
mtdparts=21e4000.qspi:1m(uboot),8m(kernel),1m(dtb),-(user)
U-Boot has the mapping below to help in accessing the QuadSPI flash in U-Boot for non-parallel mode.
The basic procedure for running Linux OS on an i.MX board is as follows. This document uses a specific set of
environment variable names to make it easier to describe the settings. Each type of setting is described in its
own section as follows.
1. Power on the board.
2. When U-Boot comes up, set the environment variables specific to your machine and configuration. Common
settings are described below and settings specific to a device are described in separate sections.
3. Save the environment setup:
U-Boot > saveenv
4. Run the boot command:
U-Boot > run bootcmd
The commands env default -f -a and saveenv can be used to return to the default environment.
For the i.MX 7ULP EVK, i.MX 8QuadMax MEK boards, and i.MX 8QuadXPlus MEK board, change to
console=ttyLP0,115200.
Specifying displays
The display information can be specified on the Linux boot command line. It is not dependent on the source
of the Linux image. If nothing is specified for the display, the settings in the device tree are used. Add
${displayinfo} to the environment macro containing bootargs. The specific parameters can be found in
the i.MX Linux Release Notes (RN00210). The following are some examples of these parameters.
• U-Boot > setenv displayinfo 'video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24' for an
HDMI display
• U-Boot > setenv displayinfo 'video=mxcfb1:dev=ldb video=mxcfb0:dev=hdmi,1920x1080
M@60,if=RGB24' for LVDS and HDMI dual displays
• U-Boot > setenv displayinfo 'video=mxcfb0:dev=lcd,if=RGB565' for an LCD
• U-Boot > setenv displayinfo 'video=mxcepdcfb:E060SCM,bpp=16
max17135:pass=2,vcom=-2030000' for an EPDC connection
• U-Boot > setenv displayinfo 'video=mxcfb0:mxcfb0:dev=lcd,if=RGB565
video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24' for LCD and HDMI dual displays
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
fdt_addr 0x18000000 0x83000000 0x83000000 0x83000000 0x63000000 0x83000000 0x83000000 0x43000000 0x83000000 0x93000000 Address in
the memory
the device
tree code are
copied to
In addition, fdtfile is used to specify the filename of the device tree file. The commands used to set the U-
Boot environment variables are as follows:
Special settings
i.XM 6Solo, and 6UltraLite can specify uart_from_osc on the command line to specify that the OSC clock
rather than PLL3 should be used. This allows the system to enter low power mode.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Power on the board, and then enter the commands provided. The following settings may be used to boot the
Linux system from NAND.
Assume that the kernel image starts from the address 0x1400000 byte (the block starting address is 0x800).
The kernel image size is less than 0x400000 byte. The rootfs is located in /dev/mtd2.
U-Boot > setenv bootcmd 'run bootargsset; nand read ${loadaddr} 0x1000000
0x800000; nand read ${fdt_addr} 0x2000000 0x100000; bootz ${loadaddr} -
${fdt_addr}'
To facilitate the Arm Cortex-M4 processor Normal Up, a script has been added to the default U-Boot. The
following steps may help users who need to run the Cortex-M4 processor Normal Up script.
1. Power on the board.
2. On the i.MX 6SoloX SABRE-SD board, assumed that the Arm Cortex-M4 image is at address 0x78000000
(NOR flash of QuadSPI2 PortB CS0). On the i.MX 6SoloX SABRE-AI board, assumed that the Arm Cortex-
M4 image is at address 0x68000000 (NOR flash of QuadSPI1 PortB CS0).
At the U-Boot prompt:
Note:
For how to add the MCC demo to the kernel and limit RAM available to kernel to use it, see Chapter 53 "i.MX 6
SoloX MultiCore Communication (MCC)" of the i.MX Linux Reference Manual (RM00293).
As well as supporting running the Arm Cortex-M4 image from QuadSPI, the default i.MX 7Dual SABRE-SD
board supports loading the Arm Cortex-M4 image from the SD card and running it on OCRAM.
Prepare the Arm Cortex-M4 image to the FAT partition of the SD card. Name the file to m4_qspi.bin when
using m4boot script.
After the board is powered on, the following information is displayed at the U-Boot prompt:
Note:
If your image has no resource table, such as NXP hello_world.bin, clear the resource table area.
Otherwise, Linux OS may shows the garbage value.
• For i.MX 8M Mini/Nano/Quad LPDDR4 EVK: run #mw 0xb80ff000 0 4 to clear the garbage resource table
area.
• For i.MX 8M Plus LPDDR4 EVK: run #mw 0x550ff000 0 4 to clear the garbage resource table area.
On the i.MX 8M boards, perform the commands to boot the Arm Cortex-M Core core:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
There are two methods to start the remote core: U-Boot bootaux and Linux remoteproc.
Whether to use bootaux or remoteproc to start the remote core, use remoteproc to stop or start the
Cortex-M core for debug purposes only. It is not recommended to stop the Cortex-M core from Linux OS in a
production system.
If you choose to use remoteproc to start the remote core directly, execute run prepare_mcore in U-Boot
before starting the Linux OS.
On the i.MX 8QuadMax and i.MX 8QuadXPlus boards, there are two ways to boot the Arm Cortex-M4 cores:
• Booting from ROM
Users need to use imx-mkimage to pack the Arm Cortex-M4 images into imx-boot image. It is necessary to
specify the core ID and its TCML address in the build command. The following is an example:
flash_linux_m4: $(MKIMG) mx8qmb0-ahab-container.img scfw_tcm.bin u-boot-spl.bin
m4_image.bin m4_1_image.bin u-boot-atf-container.img
./$(MKIMG) -soc QM -rev B0 -dcd skip -append mx8qmb0-ahab-container.img -c -
flags 0x00200000 -scfw scfw_tcm.bin -ap u-boot-spl.bin a53 0x00100000 -p3 -m4
m4_image.bin 0 0x34FE0000 -p4 -m4 m4_1_image.bin 1 0x38FE0000 -out flash.bin
cp flash.bin boot-spl-container.img
@flashbin_size=`wc -c flash.bin | awk '{print $$1}'`; \
pad_cnt=$$(((flashbin_size + 0x400 - 1) / 0x400)); \
echo "append u-boot-atf-container.img at $$pad_cnt KB"; \
dd if=u-boot-atf-container.img of=flash.bin bs=1K seek=$
$pad_cnt;
Note:
When booting with the packed Cortex-M4 image (flash_linux_m4), use kernel DTB with RPMSG enabled,
like fsl-imx8qm-mek-rpmsg.dtb for i.MX 8QuadMax MEK or fsl-imx8qxp-mek-rpmsg.dtb for i.MX
8QuadXPlus MEK.
• Booting from U-Boot (not support multiple partitions enabled)
U-Boot supports loading the Arm Cortex-M4 image from the FAT partitions of the SD card with default name
m4_0.bin and m4_1.bin. After the board is booted into the U-Boot console, use the following command to
boot Arm Cortex-M4 core 0:
U-Boot > run m4boot_0
Or the command to boot M4 core 1:
U-Boot > run m4boot_1
Or perform the commands for core 0 without depending on the script:
U-Boot > fatload mmc 1:1 0x80280000 m4_0.bin
U-Boot > dcache flush; bootaux 0x80280000 0
Pass clk_ignore_unused in bootargs when using bootaux to kick Arm Cortex-M33. This would increase
overall consumption.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
For i.MX 93, users can directly start/stop Cortex-M33 using remoteproc as follows:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
In the default configuration of the SD card and the example here, U-Boot is at the 1024 byte offset, 32 KB
offset for the i.MX 8QuadXPlus B0 and i.MX 8QuadMax B0, or 33 KB offset for the i.MX 8QuadXPlus A0, i.MX
8QuadMax A0, i.MX 8M EVK boards before the first partition, partition 1 is the partition with the Linux kernel and
device trees, and partition 2 is the rootfs.
Setting up the environment variables
For convenience, this document uses a standard set of variables to describe the information in the Linux
command line. The values used here may be different for different machines or configurations. By default,
U-Boot supports setting mmcdev and mmcroot automatically based on the uSDHC slot that we boot from.
This assumes zImage, the device tree file (DTB), and the rootfs are on the same SD/MMC card. To set these
environment variables manually, set mmcautodetect to no to disable the feature.
The following is one way to set up the items needed to boot Linux OS.
Note: If the MAC address has not been burned into the fuses, set the MAC address to use the network in U-
Boot.
# eth0:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Do not interrupt U-Boot. Let the board run into grub. Before grub runs, it should update the bootloader
automatically and remove capsule1.bin. And reboot the board again. The board will boot up with the
updated U-Boot.
To build U-Boot for an i.MX 6Solo on an i.MX 6DualLite SABRE-AI card, use the following command:
6 Power Management
The i.MX power management uses the standard Linux interface. Check the standard Linux power
documentation for information on the standard commands. The i.MX Linux Reference Manual (RM00293)
contains information on the power modes that are available and other i.MX-specific information in the power
management section.
There are three main power management techniques on i.MX boards: suspend and resume commands, CPU
frequency scaling, and bus frequency scaling. They are described in the following sections.
Scaling governors are used in the Linux kernel to set the CPU frequency. CPU frequencies can be scaled
automatically depending on the system load either in response to ACPI events or manually by userspace
programs. For more information about governors, read governors.txt from www.kernel.org/doc/Documentation/
cpu-freq/governors.txt.
The following are some of the more frequently used commands:
These commands return information about the system and the current settings.
• The kernel is pre-configured to support only certain frequencies. The list of frequencies currently supported
can be obtained from:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
• To get the available scaling governors:
cat /sys/devices/system/cpu/*/cpufreq/scaling_available_governors
• To check the current CPU frequency:
cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_cur_freq
The frequency is displayed depending on the governor set.
• To check the maximum frequency:
cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_max_freq
• To check the minimum frequency:
cat /sys/devices/system/cpu/*/cpufreq/cpuinfo_min_freq
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
This release does not support the bus frequency scaling feature on i.MX 8QuadXPlus and i.MX 8QuadMax.
The system automatically adjusts the bus frequency (DDR, AHB, etc.) for optimal performance based on the
devices that are active.
The bus frequency driver is enabled by default. The following DDR frequencies are supported:
• Normal DDR frequency – Default frequency in U-Boot
• Audio DDR frequency – 50 MHz on i.MX 6Quad, i.MX 6DualLite, and i.MX 6SoloX, and 100 MHz on i.MX
7Dual.
• Low power idle DDR frequency – 24 MHz
On the i.MX 8M board:
• For LPDDR4, the Audio DDR frequency is 25 MHz, the low power idle DDR frequency is 25 MHz.
• For DDR4, the audio DDR frequency is 166 MHz, the low power idle DDR frequency is 166 MHz.
To enter a low power idle DDR frequency, ensure that all devices that require high DDR frequency are disabled.
Most drivers do active clock management, but certain commands can be used to avoid waiting for timeouts to
occur:
echo 1 > /sys/class/graphics/fb0/blank -> to blank the display (may need to blank fb1, fb2, and so
on, if more than one display is active).
ifconfig eth0 down -> disables the Ethernet module. On i.MX 6SoloX, i.MX 7Dual, i.MX 6UltraLite, and
i.MX 6UltraLiteLite should also disable Ethernet 1 (eth1).
i.MX 8M Plus needs some additional steps to enable USB runtime PM:
Execute the following command for i.MX 8ULP to enable system level voltage and frequency scaling:
On most systems, the chip enters low power IDLE mode after the above two commands are executed.
To manipulate bus frequency, use the following commands to achieve the results desired:
cat /sys/bus/platform/drivers/imx_busfreq/soc\:busfreq/enable -> displays the status of bus
frequency.
echo 0 > /sys/bus/platform/drivers/imx_busfreq/soc\:busfreq/enable -> disables bus
frequency.
echo 1 > /sys/bus/platform/drivers/imx_busfreq/soc\:busfreq/enable -> enables bus
frequency.
The i.MX Linux Reference Manual (RM00293) has more information on the bus frequency in the chapter about
DVFS.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
7 Multimedia
i.MX provides audio optimized software codecs, parsers, hardware acceleration units, and associated plugins.
The i.MX provides GStreamer plugins to access the i.MX multimedia libraries and hardware acceleration units.
This chapter provides various multimedia use cases with GStreamer command line examples.
One option is to set these as environment variables as shown in the following examples. Use the full path to the
command on your system.
export GSTL=gst-launch-1.0
export PLAYBIN=playbin or export PLAYBIN=playbin3
export GPLAY=gplay-1.0
export GSTINSPECT=gst-inspect-1.0
In this document, variables are often used to describe the command parameters that have multiple options.
These variables are of the format $description where the type of values that can be used are described. The
possible options can be found in the Section about Multimedia in the i.MX Linux Release Notes (RN00210) for
i.MX-specific options, or at "gstreamer.freedesktop.org/ for the community options.
The GStreamer command line pipes the input through various plugins. Each plugin section of the command line
is marked by an exclamation mark (!). Each plugin can have arguments of its own that appear on the command
line after the plugin name and before the next exclamation mark (!). Use $GSTINSPECT $plugin to get
information on a plugin and what arguments it can use.
Square brackets ([ ]) indicate optional parts of the command line.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• Audio-only playback
• Video-only playback
• Audio/Video file playback
• Multichannel audio playback
• Other methods for playback
• Video playback to multiple displays
If the file to be played contains an ID3 header, use the ID3 parser. If the file does not have an ID3 header, this
has no effect.
This example plays an MP3 file in the audio jack output.
This is an example of an MP4 container with H.264 encoding format video file playback:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
For the platforms without VPU hardware, $video_decoder_plugin could be a software decoder plugin like
avdec_h264.
Supports the PCM, AC3, and DDP format audio pass-through function by the S/PDIF interface.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Video 1 Video 2
Video 5
Video 3 Video 4
aaa-052989
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
For i.MX 8M Mini/8M Plus and i.MX 95, use the following command:
Use extra-controls property after v4l2xxxenc to specify the value for different codec controls. v4l2-ctl
--device device_path --list-ctrls shows all video device's controls and their values.
For example:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
7.3.4 Transcoding
Transcoding is converting a file from one video encoding to another.
VPU video encoding only works on SoC with VPU encoder support.
For i.MX 6 family with VPU, use the following command:
capsfilter is the container's mime type. CAPS1 is the target video resolution, and the vpuenc_xxx can be
vpuenc_mpeg4, vpuenc_h263, vpuenc_h264, and vpuenc_jpeg.
For example:
For i.MX 8M Mini/8M Plus and i.MX 95, use the following command:
Note:
• For some mux, such as matroskamux, add h264parse/h265parse before mux.
• For i.MX 6, h264parse is not required, because the VPU can output AVC and byte-stream formats. For i.MX
8 and i.MX 95, h264parse/h265parse should be added before some mux, because the VPU supports only
the byte-stream output.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Note:
Run the following command to work in EARC mode:
The following examples show how to make an MP3 or WMA audio recording.
• MP3 recording
$GSTL pulsesrc num-buffers=$NUMBER blocksize=$SIZE ! lamemp3enc
! filesink location=output.mp3
Note:
The recording duration is calculated as $NUMBER * $SIZE * 8 / (samplerate * channel * bit
width).
Therefore, to record 10 seconds of a stereo channel sample with a 44.1K sample rate and a 16 bit width, use
the following command:
• $DEVICE could be set to /dev/video, /dev/video0, or /dev/video1 according to the system video input
device.
• $INPUT_CAPS should be set to video/x-
raw,format=(string)NV12,width=1920,height=1080,framerate=(fraction)30/1.
• $MUXER can be set to qtmux, matroskamux, mp4mux, avimux, or flvmux.
• $EXTENSION is filename extension according to the muxer type.
Refer to Section Section 7.3.3 to choose the correct $video_encoder_plugin.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
! v4l2sink
Parameter comments:
• Get the camera support format and resolution using gst-inspect-1.0 v4l2src.
• Set caps filter according to the camera's supported capabilities if the user needs other format or resolution.
• Ensure that the right caps filter has been set, which also needs to be supported by v4l2sink.
7.3.9 Libcamera
7.3.9.1 Overview
Note: This section is specific to i.MX 95.
Libcamera is an open source camera stack and framework developed by the Linux media community in
collaboration with the industry. It is a user space library that relies on the existing Linux kernel drivers and API.
It aims to abstract the complexity of the camera subsystem and provide the users with a unified and intuitive
interface for the camera operation.
It supports single and multi-camera use cases. Supported cameras can be either an internal camera typically
connected through a MIPI CSI bus, or USB camera exposing a UVC class.
Native Libcamera applications make direct use of the interfaces exported by the library. A GStreamer adapter is
also supported by the framework: It implements a GStreamer plugin available to applications to use as a source
element for a GStreamer pipeline.
GStreamer
Libcamera V4L2
source Android HAL
adapters compatibility
plugin
Libcamera
Libcamera
framework
User space
Kernel
V4L2
Media device Video device
Subdevice
aaa-056250
Libcamera library
Camera devices
Camera device
manager
USB
Camera CSI ISI ISP
UVC class
aaa-056251
The pipeline handlers’ roles are to implement the platform-specific handling of the media devices from the
hardware pipeline:
• For the Neo ISP pipeline case, it corresponds to the camera, CSI, ISI, and ISP devices.
• For the ISI pipeline case, it corresponds to the camera, CSI, and ISI devices.
They are responsible for the enumeration and configuration of those devices and circulating the image and
metadata buffers between the hardware and software parties.
The IPA is the component implementing the camera control algorithms (White Balance, Auto Exposure Control,
etc.). Algorithms from the IPA process on a camera frame basis the statistics metadata output by the ISP. They
compute and reconfigure the necessary parameters in real time to optimize the ISP and camera operation.
UVC camera support is standard. Its pipeline handler comes with the Libcamera framework.
7.3.9.2.1.1 Algorithms
IPA consists of several algorithms. Some of them are used for static configuration, only executing once at the
first frame to configure an ISP block in a fixed way for the whole duration of the camera stream. Conversely,
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
some algorithms are dynamic, processing the ISP statistics of each frame of the camera stream, to produce an
updated configuration for the ISP or the sensor, or both, applied for the subsequent frames.
The following table lists the NXP Neo ISP algorithms supported in that release.
Note: For detailed ISP hardware specification information, contact your NXP Account Manager or Field
Representative.
CameraHelper overview
CameraHelper is a helper class used by NXP Neo IPA, whose purpose is to abstract the specifics of that
camera.
Relevant files are in the <libcamera>/src/ipa/nxp/cam_helper source tree directory. It contains
essentially:
• The base class definition (camera_helper.h) and implementation (camera_helper.cpp)
• The camera-specific subclasses (camera_helper_<camera model>.cpp) that may override some
methods of the base class for customization purposes
• The meson configuration file (meson.build) that lists the source files and dependencies to be included for
the build
To support a supplementary camera, an associated CameraHelper subclass must be implemented. That
typically involves the creation of a dedicated source file and updating the meson.build accordingly.
Calibration file
Some IPA algorithms require the usage of parameters that must be configured specifically for a given camera
model. Those configurable values are listed in a dedicated configuration file named <camera model>.yaml.
The IPA module loads at run-time the calibration file relevant to the camera model used for the camera session.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
The calibration files are present in the libcamera source tree in the directory <libcamera>/src/ipa/nxp/
neo/data. To support a new camera sensor, a dedicated calibration file shall be created there, and the local
meson.build file is updated accordingly so that this file gets installed.
A calibration file is a YAML document that consists of a mapping listing the parameters relevant to each
algorithm. Some algorithms do not require any parameters. Algorithms can also be omitted from the mapping if
they are optional or purposely disabled.
The following table gives a high-level view of the parameters associated to each algorithm.
Configuration details for those parameters, when applicable, are documented in the relevant algorithm
implementations, present in the directory <libcamera>/src/ipa/nxp/neo/algorithms.
The context for those parameters is highly related to the Neo ISP pipeline and blocks definition. For detailed ISP
hardware specification information, contact your NXP Account Manager or Field Representative.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Usage examples are given in the subsequent sections, requiring camera-dependent environment variables.
Environment variables are as follows:
• W: sensor width
• H: sensor height
• RAW: sensor mbus code
Note: Only valid for raw camera sensors.
• CAMERAn: libcamera unique/persistent identifier for camera instance number n.
The following table lists the variables to be set for each setup.
X-IMX95-OS08A20 W=3840
H=2160
RAW=SBGGR12
CAMERA0="/base/soc/bus@42000000/i2c@42530000/os08a20_mipi@36"
X-MX95MBDES1003 W=2592
H=1944
CAMERA0="/base/soc/bus@42000000/i2c@42530000/ox05b1s@36"
RAW=SGRBG10
XRPI-CAM-MINISAS W=1280
XRPI-CAM H=800
CAMERA0="/base/soc/bus@42000000/i2c@42530000/ap1302_mipi@3c"
export LIBCAMERA_PIPELINES_MATCH_LIST='nxp/neo,imx8-isi'
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
export LIBCAMERA_LOG_LEVELS='NxpNeo:DEBUG,ISI:DEBUG'
DISPLAY_W=640
DISPLAY_H=480
gst-launch-1.0 \
libcamerasrc camera-name="${CAMERA0}" ! \
video/x-raw, format=YUY2 ! \
queue ! \
waylandsink window-width=${DISPLAY_W} window-height=${DISPLAY_H}
DISPLAY_W=640
DISPLAY_H=480
gst-launch-1.0 -v \
imxcompositor_g2d name=comp \
sink_0::xpos=0 sink_0::ypos=0 \
sink_0::width=${DISPLAY_W} sink_0::height=${DISPLAY_H} \
sink_1::xpos=0 sink_1::ypos=${DISPLAY_H} \
sink_1::width=${DISPLAY_W} sink_1::height=${DISPLAY_H} \
sink_2::xpos=${DISPLAY_W} sink_2::ypos=0 \
sink_2::width=${DISPLAY_W} sink_2::height=${DISPLAY_H} \
sink_3::xpos=${DISPLAY_W} sink_3::ypos=${DISPLAY_H} \
sink_3::width=${DISPLAY_W} sink_3::height=${DISPLAY_H} ! \
waylandsink \
libcamerasrc camera-name="${CAMERA0}" ! \
video/x-raw,format=YUY2 ! queue ! comp.sink_0 \
libcamerasrc camera-name="${CAMERA1}" ! \
video/x-raw,format=YUY2 ! queue ! comp.sink_1 \
libcamerasrc camera-name="${CAMERA2}" ! \
video/x-raw,format=YUY2 ! queue ! comp.sink_2 \
libcamerasrc camera-name="${CAMERA3}" ! \
video/x-raw,format=YUY2 ! queue ! comp.sink_3
DISPLAY_W=640
DISPLAY_H=480
gst-launch-1.0 \
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
7.3.9.5.4 Gstreamer single smart camera with 2 streams composition and preview
DISPLAY_W=640
DISPLAY_H=480
DISPLAY_W2=320
DISPLAY_H2=240
gst-launch-1.0 -v \
libcamerasrc camera-name="${CAMERA0}" name=src \
src.src ! \
video/x-raw,format=YUY2,width=1280,height=800 ! \
queue ! \
waylandsink window-width=${DISPLAY_W} window-height=${DISPLAY_H} \
src.src_0 ! \
video/x-raw,format=NV12,width=640,height=400 ! \
queue ! \
waylandsink window-width=${DISPLAY_W2} window-height=${DISPLAY_H2}
In addition, writing frames to the file system generates a huge amount of data that is not absorbable in real
time. In that case, because of the delay induced on the application to recycle its buffers, periodic frame loss is
expected to occur.
Sample command lines in this section assume that the environment variables have been set beforehand for the
targeted camera.
1. List the detected camera.
cam -l
2. List the stream formats for a camera.
cam --camera 1 -I
3. Capture 1000 decoded frames and display over HDMI.
cam \
--camera 1 \
--stream width=${W},height=${H},pixelformat=YUYV \
--capture=1000 \
--display=HDMI-A-1
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
7.3.9.7 Limitations
Note:
The TV decoder is ADV7180. It supports NTSC and PAL TV mode. The output video frame is interlaced, so the
sink plugin needs to enable deinterlace. The default value of v4l2sink deinterface is True.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
This command line is an example of how to receive and display web camera input.
Note: Supports TS, MP4, and WebM container format segment currently.
RTSP streams can be played with a manual pipeline or by using playbin. The format of the commands is as
follows.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• Manual pipeline
$GSTL rtspsrc location=$RTSP_URI name=source
! queue ! $video_rtp_depacketize_plugin ! $vpu_dec ! $video_sink_plugin
source.
! queue ! $audio_rtp_depacketize_plugin ! $audio_parse_plugin ! beepdec !
$audio_sink_plugin
• PLAYBIN
$GSTL $PLAYBIN uri=$RTSP_URI
Two properties of rtspsrc that are useful for RTSP streaming are:
• Latency: This is the extra added latency of the pipeline, with the default value of 200 ms. If you need low-
latency RTSP streaming playback, set this property to a smaller value.
• Buffer-mode: This property is used to control the buffering algorithm in use. It includes four modes:
– None: Outgoing timestamps are calculated directly from the RTP timestamps, not good for real-time
applications.
– Slave: Calculates the skew between the sender and receiver and produces smoothed adjusted outgoing
timestamps, good for low latency communications.
– Buffer: Buffer packets between low and high watermarks, good for streaming communication.
– Auto: Chooses the three modes above depending on the stream. This is the default setting.
To pause or resume the RTSP streaming playback, use a buffer-mode of slave or none for rtspsrc, as in
buffer-mode=buffer. After resuming, the timestamp is forced to start from 0, and this causes buffers to be
dropped after resuming.
Manual pipeline example:
Playback does not exit automatically in GStreamer 1.x, if buffer-mode is set to buffer in the rtpsrc plugin.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• Server address:
rtsp://$SERVER_IP:8554/test
For example:
rtsp://10.192.241.106:8554/test
• Client operations supported are Play, Stop, Pause, Resume, and Seek.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Resize
Rotate
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
imxvideoconvert_g2d supports the Dewarp function on the i.MX 95 board. It supports both the RGB
format and packed YUV422 format, such as YUY2. NV12 format dewarp is not support since there is hardware
limitation for DPU.
• imxvideoconvert_g2d can probe and parse the header data automatically in the map file, which contains
the initialization parameters. You can enable video warp and configure the Dewarp map file, which contains
the header data as follows. Example:
gst-launch-1.0 videotestsrc ! video/x-raw,format=RGBA,width=1920,height=1080 !
imxvideoconvert_g2d video-warp-enable=true video-warp-coord-
file=dewarp_map_file ! video/x-raw,format=RGBA,width=1920,height=1080 !
videoconvert ! waylandsink
• If the map file has no header data, which contains the initialization parameters, configure these parameters
manually as follows:
– The map-format parameter configures three Dewarp modes, which are 0 (coordinate mode), 1 (Delta
mode), and 2 (Delta increment mode).
– The width and height parameters configure the actual input video width and height information.
– The bpp parameter means bit per pixel and configures the memory layout of each x/y value in coordinate
buffers.
– The arb_start_x and arb_start_y parameters configure the start value of of each x/y, which are used
only in Delta mode or Delta increment mode.
– The arb_delta_xx, arb_delta_xy, arb_delta_yx, and arb_delta_yy parameters configure the
initial Delta value, which are used only in Delta increment mode. Example:
gst-launch-1.0 videotestsrc ! video/x-
raw,format=RGBA,width=1920,height=1080 !
imxvideoconvert_g2d video-warp-enable=true video-warp-coord-
file=dewarp_map_file
video-warp-extra-controls="c,map-format=2,width=1920,height=1080,bpp=8,
arb_start_x=0x286c,arb_start_y=0x16a6,arb_delta_xx=0x0e,arb_delta_xy=0xfc,
arb_delta_yx=0xfc,arb_delta_yy=0x14" !
video/x-raw,format=RGBA,width=1920,height=1080 ! videoconvert ! waylandsink
It is possible to combine CSC, resize, rotate, and deinterlace at one time. Both imxvideoconvert_ipu and
imxvideoconvert_g2d can be used at the same time in a pipeline. The following is an example:
1. Use the wpctl status command to list all the available audio sinks and sources:
$ wpctl status
A list of available audio sinks/sources is displayed:
Audio
├─ Devices:
│ 36. Built-in Audio [alsa]
│ 37. Built-in Audio [alsa]
│ 38. Built-in Audio [alsa]
│ 39. Built-in Audio [alsa]
│
├─ Sinks:
│ 40. Built-in Audio Mono [vol: 0.40]
│ * 42. Built-in Audio Analog Surround 5.1 [vol: 0.40]
│ 45. Built-in Audio Digital Stereo (IEC958) [vol: 0.40]
│
├─ Sink endpoints:
│
├─ Sources:
│ 41. Built-in Audio Mono [vol: 1.00]
│ * 43. Built-in Audio Analog Surround 5.1 [vol: 1.00]
│ 44. Built-in Audio Stereo [vol: 1.00]
│ 46. Built-in Audio Digital Stereo (IEC958) [vol: 1.00]
│
├─ Source endpoints:
│
└─ Streams:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
2. Use wpctl inspect <object-id> to display the information about the specified object.
For example, wpctl inspect 36 can check this audio card information.
3. Use wpctl set-default <object-id> to set the default audio sink and source according to the ID
number of sinks or sources in the list shown above.
Multichannel output support settings
For those boards that need to output multiple channels, perform the following steps to enable the multichannel
output profile:
1. Use pw-cli info <object-id> to find <param-id> of EnumProfile.
* params: (4)
* 8 (Spa:Enum:ParamId:EnumProfile) r-
* 9 (Spa:Enum:ParamId:Profile) rw
* 12 (Spa:Enum:ParamId:EnumRoute) r-
* 13 (Spa:Enum:ParamId:Route) rw
Here, 8 is the <param-id> of EnumProfile.
2. Use pw-cli enum-params <object-id> <param-id> to check the profile index of the card.
Here, <object-id> is the ID number of audio devices shown by wpctl status.
...
Object: size 464, type Spa:Pod:Object:Param:Profile (262151), id
Spa:Enum:ParamId:EnumProfile (8)
Prop: key Spa:Pod:Object:Param:Profile:index (1), flags 00000000
Int 3
Prop: key Spa:Pod:Object:Param:Profile:name (2), flags 00000000
String "output:analog-surround-71+input:analog-surround-51"
Prop: key Spa:Pod:Object:Param:Profile:description (3), flags 00000000
String "Analog Surround 7.1 Output + Analog Surround 5.1 Input"
...
Here, 3 is the profile index.
3. Use wpctl set-profile <object-id> <profile index> to set the profile for particular features.
4. Use pw-play xx.wav to play a multichannel wave file.
8 Audio
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
eARC mode ON
Besides, enabling the complete eARC feature, per the HDMI 2.1 specification, is more of a system-level
application that integrates different layers and modules of the CEC driver, DRM, HDMI controller driver, EDID,
and eARC driver modules.
8.3.1 Introduction
The Cortex-M core on the i.MX 8M Plus, i.MX 8M Mini, i.MX 8ULP, i.MX 93, and i.MX 95 platforms can be used
in an AsymmetricMultiprocessing (AMP) architecture for a low power voice User Interface (UI) solution.
The voice activity detection and wake work engine shall use the lowest power core of the i.MX 8M, i.MX 93, and
i.MX 95, so that the Cortex-A cluster and related peripherals can remain in sleep mode for most of the “active
listening” time.
Upon successful detection of a wake word, the Cortex-M core shall wake up the Cortex-A domain for better
acoustic performance and further voice processing.
There are three components needed for this solution:
• Audio Front End (AFE)
• Linux drivers
• Cortex-M Image
Note: The i.MX 8ULP platform is added in the supported list. However, for i.MX 8ULP, there is no low-power
wake word detection on Cortex-M. The Cortex-M is only for providing the path of the PDM microphone. AFE
and Linux drivers are supported.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Components in NXP
Voice Enablement scope
i.MX
Voice Processing
VoiceSeeker Audio
User space Playback
Linux kernel
Main app
RPMsg RPMsg ALSA
ALSA
Drivers buffer Drivers
PDM I2S
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Components in NXP
Voice Enablement scope
i.MX
Voice Processing
Audio
Playback User space
Linux kernel
ALSA
Drivers
PDM I2S
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
To interface audio with the Linux OS, the Advanced Linux Sound Architecture (ALSA) library is used. The
following figure shows the audio architecture.
ALSA logical
ALSA physical (loopback)
streams streams
Reference
(playback)
samples
Playback
Physical sink Virtual sink
samples
aaa-052980
The AFE code is on GitHub: https://github.com/nxp-imx/nxp-afe/. Use the Git tag corresponding to the current
Linux BSP release.
The AFE deliveries are in Yocto rootfs/unit_tests/nxp-afe/ and /usr/lib/nxp-afe/.
• /unit_tests/nxp-afe/afe: The main application of the AFE
• /unit_tests/nxp-afe/TODO.md: User guide document
• /unit_tests/nxp-afe/asound.conf_imx8mm: Used for i.MX 8M Mini default and RPMsg dtb
• /unit_tests/nxp-afe/asound.conf_imx8mp: Used for i.MX 8M Plus default and RPMsg dtb
• /unit_tests/nxp-afe/asound.conf_imx8mp_revb4: Used for i.MX 8M Plus EVKB4 default and
RPMsg dtb
• /unit_tests/nxp-afe/asound.conf_imx93: Used for i.MX 93 default and RPMsg dtb for both EVK and
QSB boards
• /unit_tests/nxp-afe/asound.conf_imx95: Used for i.MX 95 EVK default and RPMsg dtb
In addition to the AFE, the Yocto BSP integrates VoiceSeeker (a multi-microphone voice control audio front-
end signal processing solution), VoiceSpot (a small memory and MIPS profile wake word engine supporting the
"Hey NXP" voice trigger word), and VIT for local voice command recognition. These deliveries are available on
GitHub: https://github.com/nxp-imx/imx-voiceui. This contains:
• VoiceSeeker_wrapper folder contains the code used for generating the shared library used by the AFE
wrapper. Check the TODO.md in the nxp-afe repository.
• Voice_UI_Test_app folder contains the code used for generating the voice UI application called
"voice_ui_app". This application contains the VoiceSpot wake-word engine and VIT for local voice
command recognition. This application uses the output of the AFE for voice detection (wake-word and voice
commands).
See the README file in this GitHub repository, which explains how to build the VoiceSeeker library and the
Voice UI Test application. Once these are built, the user shall copy the following files to Yocto rootfs:
• Copy release/Config.ini to /unit_tests/nxp-afe/.
• Copy release/HeyNXP_1_params.bin to /unit_tests/nxp-afe/.
• Copy release/HeyNXP_en-US_1.bin to /unit_tests/nxp-afe/.
• Copy release/libvoiceseekerlight.so.2.0 to /usr/lib/nxp-afe/libvoiceseekerlight.so.
2.0, symbol link libvoiceseekerlight.so to libvoiceseekerlight.so.2.0.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
root@imx8mpevk:/unit_tests/nxp-afe# ls -l
-rw-r--r-- 1 weston weston 294 Mar 9 2018 Config.ini
-rw-r--r-- 1 weston weston 56 Mar 9 2018 HeyNXP_1_params.bin
-rw-r--r-- 1 weston weston 32812 Mar 9 2018 HeyNXP_en-US_1.bin
-rw-r--r-- 1 weston weston 4130 Mar 9 2018 TODO.md
-rwxr-xr-x 1 weston weston 67752 Mar 9 2018 afe
-rw-r--r-- 1 weston weston 1642 Mar 9 2018 asound.conf_imx8mm
-rw-r--r-- 1 weston weston 1661 Mar 9 2018 asound.conf_imx8mp
-rw-r--r-- 1 weston weston 1660 Mar 9 2018 asound.conf_imx8mp_revb4
-rw-r--r-- 1 weston weston 1642 Mar 9 2018 asound.conf_imx93
-rwxr-xr-x 1 weston weston 3414200 Mar 9 2018 voice_ui_app
root@imx8mpevk:/usr/lib/nxp-afe# ls -l
lrwxrwxrwx 1 weston weston 19 Mar 9 2018 libdummyimpl.so ->
libdummyimpl.so.1.0
-rw-r--r-- 1 weston weston 67576 Mar 9 2018 libdummyimpl.so.1.0
lrwxrwxrwx 1 weston weston 26 Mar 9 2018 libvoiceseekerlight.so ->
libvoiceseekerlight.so.2.0
-rw-r--r-- 1 weston weston 331104 Mar 9 2018 libvoiceseekerlight.so.2.0
After this, follow the steps in /unit_tests/nxp-afe/TODO.md to perform a test. The typical test method is
as follows:
• ./voice_ui_app &
• ./afe libvoiceseekerlight &
• aplay test.wav &
• arecord -d10 -fS32_LE -r16000 -c1 voiceseeker_afe_on.wav
The voice_ui_app binary enables the following VIT commands:
• MUTE
• NEXT
• SKIP
• PAIR DEVICE
• PAUSE
• STOP
• POWER OFF
• POWER ON
• PLAY MUSIC
• PLAY GAME
• WATCH CARTOON
• WATCH MOVIE
When users say "Hey NXP, power on", the "Hey NXP" wakes up the system, and the "power on" command is
detected.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
There is a configuration file called Config.ini through which user can choose the wake-word engine, select
the VIT language or implement other settings. It is a part of the standard voice solution.
$ cat /unit_tests/nxp-afe/Config.ini
[AFEConfig]
WWDectionDisable = 0
WakeWordEngine = VoiceSpot
DebugEnable = 0
# Declare mic coordinates if not using default value for supported i.MX EVKs
#mic0 = 35.0, 15.15, 0.0
#mic1 = 17.5, -15.15, 0.0
#mic2 = -17.5, -15.15, 0.0
#mic3 = -35.0, 15.15, 0.0
VoiceSpotModel = HeyNXP_en-US_1.bin
VoiceSpotParams = HeyNXP_1_params.bin
VITLanguage = English
• WWDectionDisable
Disables/Enables the wake-word and command detection.
– 0 - By default, enables the wake-word and command detection.
– 1 - Disables wake-word and command detection. voice_ui_app does not work.
• WakeWordEngine
This configuration depends on setting WWDectionDisable to 0. Selects if the voice_ui_app uses
VoiceSpot or VIT for wake-word detection.
– VoiceSpot - By default, use VoiceSpot to detect the wake-word.
– VIT - Use VIT to detect wake-word.
• DebugEnable
– 0 - By default, no debug recordings are made.
– 1 - Enables recording the AFE input/output streams for debugging and tuning the RefSignalDelay.
• RefSignalDelay
Used to calibrate the reference signal delay when using VoiceSeeker’s Acoustic Echo Cancellation (AEC).
The AEC enabled library is delivered with controlled access through Flexera. Please contact [email protected]
for more information.
• Mic coordinates
XYZ coordinates of the microphones in millimeters. The origin of the coordinate axis can be chosen as
convenient. Users can set custom values if not using the default value for the supported i.MX EVKs.
• VoiceSpotModel/VoiceSpotParams
The two parameters depend on setting WakeWordEngine to "VoiceSpot". They are used to specify the wake-
word model and parameters used by VoiceSpot.
• VITLanguage
This configuration depends on setting WakeWordEngine to "VIT". Selects the VIT language used to detect
the wake-word and commands.
– English - by default, uses English.
– Mandarin - uses Mandarin.
– Spanish - uses Spanish.
– German - uses German.
– Japanese - uses Japanese.
– Korean - uses Korean.
– Turkish - uses Turkish.
– Italian - uses Italian.
– French - uses French.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Note: For i.MX 95, use a system manager image built with the imx95alt configuration, or any similar
configuration that gives the necessary permission to the Cortex-M core to run this application.
2. Boot the board, stop in U-Boot prompt, and run the commands below:
a. Chose the appropriate device tree:
• i.MX 8M Mini:
setenv fdtfile imx8mm-evk-rpmsg-wm8524-lpv.dtb
• i.MX 8M Plus:
setenv fdtfile imx8mp-evk-rpmsg-lpv.dtb
• i.MX 93 EVK:
setenv fdtfile imx93-11x11-evk-rpmsg-lpv.dtb
• i.MX 93 QSB:
setenv fdtfile imx93-9x9-qsb-rpmsg-lpv.dtb
• i.MX 95 EVK:
setenv fdtfile imx95-19x19-evk-rpmsg-lpv.dtb
b. Load the Cortex-M image from Flash to TCM and boot the core before booting the Linux OS.
• i.MX 8M Mini and i.MX 8M Plus:
setenv lpv 'fatload mmc 1:1 0x48000000 <application_name>; cp.b
0x48000000 0x7e0000 0x40000; bootaux 0x7e0000;'
setenv bootcmd 'run prepare_mcore;run lpv;'${bootcmd}
• i.MX 93 EVK and QSB:
setenv lpv 'fatload mmc 1:1 0x80000000 <application_name>; cp.b
0x80000000
0x201e0000 0x20000; bootaux 0x1ffe0000 0;'
setenv bootcmd 'run lpv;'${bootcmd}
setenv mmcargs 'setenv bootargs ${jh_clk} console=${console} root=
${mmcroot} clk-imx93.mcore_booted snd_pcm.max_alloc_per_card=134217728'
• i.MX 95 EVK:
setenv lpv 'fatload mmc 1:1 0x90400000 <application_name>; cp.b
0x90400000 0x203c0000 0x40000; bootaux 0x00000000 1;'
setenv bootcmd 'run lpv;'${bootcmd}
setenv mmcargs 'setenv bootargs ${jh_clk} console=${console} root=
${mmcroot} clk-imx95.mcore_booted snd_pcm.max_alloc_per_card=134217728
pd_ignore_unused'
c. Save the changes above.
saveenv
3. Reboot the board, and the Cortex-M will be automatically started before the Linux OS. This can be checked
on the Cortex-M console.
4. Apply the appropriate ALSA configuration. After the Linux OS has booted, from the console:
• i.MX 8M Mini:
cp /unit_tests/nxp-afe/asound.conf_imx8mm /etc/asound.conf
• i.MX 8M Plus:
cp /unit_tests/nxp-afe/asound.conf_imx8mp /etc/asound.conf
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
8.3.5.3 Execution
Once started, users have no direct actions to control the Cortex-M application. It automatically executes
appropriate actions according to the Linux state:
• When Linux OS is active and an application is recording audio: The Cortex-M application is acting as a data
pump, getting audio data from the microphones and providing them to ALSA drivers through RPMsg.
• When Linux OS is suspended while an application is recording audio: Audio data are processed locally on
Cortex-M (by VoiceSeeker/VoiceSpot). The data is also stored in a ring-buffer. Once voice or the wake-word
is detected (depending on the application), the Linux OS is automatically resumed, data from the ring buffer is
sent to ALSA (so the Linux OS also gets the wakeword), and then the data-pump is re-started.
• Suspending Linux OS: Cortex-M only has the possibility to resume the Linux OS, not to suspend it. Instead,
the Linux OS should be suspended by user-space action (the decision to suspend cannot be based only
on voice. It should also consider all the other potential user applications running on the Linux OS). For test
purposes, this can be forced by the user by entering the following command to the Linux console.
echo mem > /sys/power/state
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• i.MX 93 EVK:
echo imx93-11x11-evk_m33_TCM_low_power_wakeword.elf > /sys/class/remoteproc/
remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/state
• i.MX 93 QSB:
echo imx93-9x9-qsb_m33_TCM_low_power_wakeword.elf > /sys/class/remoteproc/
remoteproc0/firmware
echo start > /sys/class/remoteproc/remoteproc0/state
• i.MX 95 EVK:
echo imx95-19x19-evk_m7_TCM_low_power_wakeword_sm_cm7.elf > /sys/class/
remoteproc/
remoteproc1/firmware
echo start > /sys/class/remoteproc/remoteproc1/state
Once started, the usage is the same as when the application is started by U-Boot.
If needed, users can also stop and restart remoteproc with the following commands:
Note: Replace remoteproc0 by remoteproc1 in the commands above for i.MX 95.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
USB Gadget
NXP Audio Front End
composite
Conversa Tuning
thread
Linux kernel
ALSA
Drivers
SAI SAI
USB
Memory & HW
Cortex-Ax Peripherals
PDM I2S
Note: The Conversa processing suite is a restricted-access solution. Contact your NXP representative for more
details.
9 Graphics
There are a number of graphics tools, tests, and example programs that are built and installed in the Linux
rootfs. There are some variation on what is included based on the build and packages selected, the board, and
the backend specified. This section describes some of them.
The kernel module version of graphics used on the system can be found by running the following command on
the board:
The user-side GPU drivers version of graphics can be displayed using the following command on the board:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
9.1 imx-gpu-sdk
This graphics package contains source for several graphics examples for OpenGLES 2.0 and OpenGLES
3.0 APIs for X11, Framebuffer, and XWayland graphical backends. These applications show that the graphics
acceleration is working for different APIs. The package includes samples, demo code, and documentation for
working with the i.MX family of graphic cores. More details about this SDK are in the i.MX Graphics User's
Guide (UG10159). This SDK is only supported for hardware that has OpenGLES hardware acceleration.
9.2 G2D-imx-samples
The G2D Application Programming Interface (API) is designed to make it easy to use and understand the 2D
BLT functions. It allows the user to implement customized applications with simple interfaces. It is hardware and
platform independent when using 2D graphics.
The G2D API supports the following features and more:
• Simple BLT operation from source to destination
• Alpha blend for source and destination with Porter-Duff rules
• High-performance memory copy from source to destination
• Up-scaling and down-scaling from source to destination
• 90/180/270 degree rotation from source to destination
• Horizontal and vertical flip from source to destination
• Enhanced visual quality with dither for pixel precision-loss
• High performance memory clear for destination
• Pixel-level cropping for source surface
• Global alpha blend for source only
• Asynchronous mode and synchronization
• Contiguous memory allocator
• VG engine
The G2D API document includes the detailed interface description and sample code for reference. The API is
designed with C-Style code and can be used in both C and C++ applications.
The G2D is supported on all i.MX. The hardware that supports G2D is described below. For more details, see
the Frame Buffer information in the i.MX Release Notes (RN00210) to check which hardware is used for G2D.
• For i.MX 6 with GPU, the G2D uses the 2D GPU.
• For i.MX with PXP, the G2D uses the PXP with limited G2D features.
The following is the directory structure for the G2D test applications located under /opt.
• g2d_samples
– g2d_test
– g2d_overlay_test
– g2d_multiblit_test
9.3 viv_samples
The directory viv_samples is found under /opt. It contains binary samples for OpenGL ES 1.1/2.0 and
OpenVG 1.1.
The following are the basic sanity tests, which help to make sure that the system is configured correctly.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• cl11: This contains unit tests and FFT samples for OpenCL 1.1 Embedded Profile. OpenCL is implemented on
the i.MX 6Quad, i.MX 6QuadPlus, and i.MX 8 boards.
– – UnitTest
– clinfo
– loadstore
– math
– threadwalker
– test_vivante
– functions_and_kernels
– illegal_vector_sizes
– initializers
– multi_dimensional_arrays
– reserved_data_types
– structs_and_enums
– unions
– unsupported_extensions
– fft
• es20: This contains tests for Open GLES 2.0.
– vv_launcher
– coverflow.sh
– vv_launcher
• tiger: A simple OpenVG application with a rotating tiger head. This is to demonstrate OpenVG.
• vdk: Contains sanity tests for OpenGL ES 1.1 and OpenGL ES 2.0.
The tiger and VDK tests show that hardware acceleration is being used. They will not run without it.
9.4 Qt 6
Qt 6 is built into the Linux image in the Yocto Project environment with the command bitbake imx-image-
full. For more details on Qt enablement, check out the README in the meta-imx repo and the i.MX Yocto
Project User's Guide (UG10164).
10 Security
The i.MX platforms define a series of security acceleration subsystems.
10.1.1 Introduction
The Linux kernel contains a Scatterlist Crypto API driver for the NXP CAAM security hardware block. It
integrates seamlessly with in-kernel crypto users, such as DM-Crypt, Keyctl, in a way that any disk encryption
and key management suites will automatically use the hardware to do the crypto acceleration. CAAM hardware
is known in Linux kernel as 'caam', after its internal block name: Cryptographic Accelerator and Assurance
Module.
There are several HW interfaces ("backends") that can be used to communicate (for example, submit requests)
with the engine, their availability depends on the SoC:
• Register Interface (RI) - available on all SoCs (though access from kernel is restricted on DPAA2 SoCs).
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Its main purpose is debugging (such as single-stepping through descriptor commands), though it is used also
for RNG initialization.
• Job Ring Interface (JRI) - legacy interface, available on all SoCs; on most SoCs there are 4 rings.
Note:
There are cases when fewer rings are accessible or visible in the kernel, for example, when firmware like
Trusted Firmware-A (TF-A) reserves one of the rings.
On top of these backends, there are the "frontends" - drivers that sit between the Linux Crypto API and backend
drivers. Their main tasks aim to:
• Register supported crypto algorithms.
• Process crypto requests coming from users (through the Linux Crypto API) and translate them into the proper
format understood by the backend being used.
• Forward the CAAM engine responses from the backend being used to the users.
To use a specific implementation, it is possible to ask for it explicitly by using the specific (unique) "driver name"
instead of the generic "algorithm name". See official Linux Kernel Crypto API documentation (section Crypto API
Cipher References And Priority). Currently, the default priority is 3000 for JRI frontend.
Cryptodev-Linux
AF_ALGAPI /dev/hwrng
API
Linux kernel
Cryptodev-Linux af_alg
caamhash caamalg
Descripter HW desc
lib (CCSR regs)
sha 3des/des
caampkc caamrng
Descripter Init
md5 aes rsa hwrng construct lib functions
caam_ jr ctrl
JR Rl
CAAM
i.MX
aaa-052988
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
crypto@30000 {
compatible = "fsl,sec-v4.0";
fsl,sec-era = <2>;
#address-cells = <1>;
#size-cells = <1>;
reg = <0x300000 0x10000>;
ranges = <0 0x300000 0x10000>;
interrupt-parent = <&mpic>;
interrupts = <92 2>;
clocks = <&clks IMX6QDL_CLK_CAAM_MEM>,
<&clks IMX6QDL_CLK_CAAM_ACLK>,
<&clks IMX6QDL_CLK_CAAM_IPG>,
<&clks IMX6QDL_CLK_EIM_SLOW>;
clock-names = "mem", "aclk", "ipg", "emi_slow";
};
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Section from boot log that specify where crypto test are made (If a boot test is passing with success, no
information will be reported. For algorithms with no tests available, a line in dmesg will be printed):
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
caamhash frontend (hash algorithms) may be individually turned off, since the nature of the application may be
such that it prefers software (core) crypto latency due to many small-sized requests.
caampkc frontend (public key / asymmetric algorithms) can be turned off too, if needed.
caamrng frontend (Random Number Generation) may be turned off in case there is an alternate source of
entropy available to the kernel.
caamkeyblob frontend (algorithms supporting tagged key) can be turned off if tagged keys or blobs are not
used.
If the messages are not present in the logs, either the driver is not configured in the kernel, or no CAAM
compatible device tree node is present in the device tree.
If the number of interrupts fired increment, then the hardware is being used to do the crypto. If the numbers do
not increment, then check the algorithm being exercised is supported by the driver. If the algorithm is supported,
there is a possibility that the driver is in polling mode (NAPI mechanism) and the hardware statistics in debugfs
(inbound/outbound bytes encrypted/protected - see below) should be monitored.
name : cbc(des)
driver : cbc-des-caam
module : kernel
priority : 3000
refcnt : 1
selftest : passed
internal : no
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
type : givcipher
async : yes
blocksize : 8
min keysize : 8
max keysize : 8
ivsize : 8
geniv : <built-in>
Note that although a test vector may not exist for a particular algorithm supported by the driver, the kernel will
emit messages saying which algorithms weren't tested, and mark them as 'passed' anyway:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Customer
Apache Nginx
applications
OpenSSL®
SSLAPI
Cyptodev-Linux
Caamalg
caam_ jr
JR
CAAM
i.MX
aaa-052990
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• cryptodev-linux (kernel space): Linux module that translates ioctl requests from cryptodev-engine into
calls to Linux Crypto API
• AF_ALG is a netlink-based in the kernel asynchronous interface that adds an AF_ALG address family
introduced in 2.6.38.
• Linux Crypto API (kernel space): Linux kernel crypto abstraction layer
• CAAM driver (kernel space): Linux device driver for the CAAM crypto engine
The following are offloaded in hardware in current BSP:
• Symmetric Ciphering operations - AES (CBC, ECB), 3DES (CBC, ECB)
• Digest Operations - SHA (1, 256, 384, 512), MD5
• Public Key Operations - RSA Sign (1k, 2k, 4k) / RSA Verify (1k, 2k, 4k)
CORE_IMAGE_EXTRA_INSTALL+="cryptodev-module openssl-bin"
bitbake imx-image-full
Note:
Starting from OpenSSL 1.1.1, the cryptodev engine is invoked by OpenSSL by default if the corresponding
module has been inserted in the kernel. Thus to perform only SW benchmark test using OpenSSL, remove the
cryptodev module by running rmmod cryptodev.
10.4.5.1 Running OpenSSL benchmarking tests for symmetric ciphering and digest
In the speed test file, a series of performance tests are made to check the performance of the symmetric and
digest operations. The following is described in the OpenSSL test execution:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
10.4.6.1 Running OpenSSL benchmarking tests for symmetric ciphering and digest
Execute the following command:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
This line must be placed at the top, before any sections are defined:
openssl_conf = openssl_init
Make sure there are no other openssl_conf = ... lines in the file.
This should be added to the bottom of the file:
[openssl_init]
engines=engine_section
[engine_section]
pkcs11 = pkcs11_section
[pkcs11_section]
engine_id = pkcs11
dynamic_path = /usr/lib/engines-3/pkcs11.so
MODULE_PATH = /usr/lib/libckteec.so.0
init = 0
The dynamic_path value is the PKCS#11 engine plug-in, and the MODULE_PATH value is the NXP
PKCS#11 library. The engine_id value is an arbitrary identifier for OpenSSL applications to select the
engine by the identifier.
2. Make sure tee-supplicant is running.
root@imx8mpevk:~# ps -aux | grep tee
root 661 0.0 0.0 76424 1432 ? Ssl May27 0:00 /usr/bin/
tee-supplicant
If it is not running, run the following command:
root@imx8mpevk:~# tee-supplicant &
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
ID: bc:8e:f3:ca:95:d6:e7:ae:57:89:43:1f:67:a3:e5:d1:05:d8:5d:66
Or to generate an EC key:
root@imx8mpevk:~# openssl req -engine pkcs11 -new -key "<token url private>" -
keyform engine -out req.pem -text -x509 -subj "/CN=NXP Semiconductor"
Engine "pkcs11" set.
Enter PKCS#11 token PIN for token label:<user pin>
The second command creates a self-signed certificate for the request. The private key used to sign the
certificate is the same private key used to create the request.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
For example:
Client-side command:
For example:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Linux
user space
Management tools File system (ext2, ext4)
Cryptsetup DM tools
Storage
/dev/mmcblk exports
Linux
Crypto-API kernel
RAID/LVM
Device mapper
drivers
CAAM
Symmetric Digest drivers Crypt target
asym mg
Peripherals
pcie drivers
caam_ jr
sata sdhc
JR
SATA PCI/NVMe
CAAM
USB SDHC
i.MX
SD aaa-052986
10.5.1 Enabling disk encryption support in kernel for the platform containing CAAM hardware
IP
By default, the kernel configuration file enables the Device Mapper configuration and Crypt Target support
as modules. Therefore, to enable disk encryption scenario, after the board is booted up, insert the following
modules:
If the disk encryption scenario is not enabled, some features in the kernel need to be enabled:
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• keyutils: provides keyctl, which is required to manage Linux Key retention service.
• lvm2: provides dmsetup utility and libraries to manage device-mapper.
• e2fsprogs-mke2fs: contains necessary tools to create filesystems.
• util-linux: provides blockdev utility needed to read number of sectors from a volume.
10.5.3.1.1 Usage
The following steps shows how to perform a full disk encryption on i.MX devices using the DM-Crypt with
Trusted keys backed by CAAM method.
1. Insert the kernel module.
$>: modprobe trusted
2. Generate the trusted key:
$>: KEYNAME=dm_trust
$>: KEY="$(keyctl add trusted $KEYNAME 'new 32' @s)"
$>: keyctl pipe $KEY >~/$KEYNAME.blob
$>: keyctl list @s
Output:
$>: keyctl list @s
2 keys in keyring:
48178143: ----s-rv 0 0 user: invocation_id
143779047: --alswrv 0 0 trusted: dm_trust
3. Create a secure volume. It could be a physical partition. In this example, make use of an image file and
mount it later.
$>: DEV=/dev/loop0
$>: BLOCKS=20
$>: fallocate -l $((BLOCKS*512)) ~/loop0.img
$>: losetup -P $DEV ~/loop0.img
4. Create the mapping table "TABLE". Where:
• Algo is set in Kernel Crypto API format to use the plain key. Algo/cipher is set to cbc(aes)-plain.
• Key is set as the trusted key of length 32 and the name is exported as $KEYNAME.
$>: DEV=/dev/loop0
$>: ALGO=capi:cbc(aes)-plain
$>: KEYNAME=dm_trust
$>: BLOCKS=20
$>: TARGET=crypt
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
sha512
Note:- Default algorithm is sha-256.
<salt> [Optional] The actual salt to use.
8 bytes salt value needs to be provided.
If salt value > 8 bytes, trim to 8 bytes.
If salt_value < 8 bytes, zero padding is added.
If no salt is provided, -nosalt option will be used.
<derived_key_name> Black key obtained after using PBKDF2
derivation function.
By default, the keys and blobs are created in KEYBLOB_LOCATION, which is /data/caam/.
Later, CAAM Tagged Key is added into Linux Key Retention service and managed by user-space application
such as keyctl. Black blobs can be stored on any non-volatile storage.
keyctl dmsetup
Linux kernel
ext2 ext3 ext4
keyring DM-crypt
Linux
kernel drivers
Hardware
PCIe SATA qSPI
CPU, CAAM
SD/MMC IFC
aaa-052987
Dmsetup (part of the libdevmapper package) is a powerful tool for performing very low-level configuration and
is used to manage encrypted volumes.
10.5.3.3 Usage
The following are the steps to perform a full disk encryption on i.MX devices using the DM-Crypt with CAAM's
tagged key method.
1. After booting the device, make sure that cryptographic transformations using Tagged Key are registered.
root@imx8mqevk:~# grep -B1 -A2 tk- /proc/crypto|grep -v kernel
name : tk(ecb(aes))
driver : tk-ecb-aes-caam
priority : 3000
--
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
name : tk(cbc(aes))
driver : tk-cbc-aes-caam
priority : 3000
root@imx8mqevk:~#
And caam-keygen application is available:
root@imx8mmevk:~# cd /; find -name "caam-keygen"
./usr/bin/caam-keygen
./dev/caam-keygen
./sys/class/misc/caam-keygen
./sys/devices/virtual/misc/caam-keygen
For now, we only support AES algorithms. Therefore, the size of the key accepted for encryption/decryption
is 16, 24, and 32 bytes.
2. Make sure DM-Crypt is enabled.
root@imx8mqevk:~# dmsetup targets
crypt v1.19.0
striped v1.6.0
linear v1.4.0
error v1.5.0
If any of the above is missing, check Kernel configurations or see section Enable disk encryption support in
kernel.
3. Then, provide the device with its key, the black key, which could be created either from a defined plain key
or randomly.
Here is an example for black key encrypted with ECB, from a given plaintext of size 16 bytes:
root@imx8mqevk:~# ./caam-keygen create fromTextkey ecb -t 0123456789abcdef
The result is a Tagged Key and a Blob files written to filesystem (the default location is /data/caam). The
used key encryption scheme is ECB.
root@imx8mqevk:~# ls -la /data/caam/
total 16
drwxr-xr-x 2 root root 4096 Aug 25 15:38 .
drwxr-xr-x 3 root root 4096 Aug 25 15:38 ..
-rw-r--r-- 1 root root 36 Aug 25 15:38 fromTextkey
-rw-r--r-- 1 root root 96 Aug 25 15:38 fromTextkey.bb
Next, add the key in key retention service, using keyctl:
root@imx8mqevk:~# cat /data/caam/fromTextkey | keyctl padd logon logkey: @s
876928653
4. Create a secure volume. It could be a physical partition. In this example, make use of an image file and
mount it later.
root@imx8mqevk:~# dd if=/dev/zero of=encrypted.img bs=1M count=32
32+0 records in
32+0 records out
33554432 bytes (34 MB, 32 MiB) copied, 3.20227 s, 10.5 MB/s
root@imx8mqevk:~#
root@imx8mqevk:~# losetup /dev/loop0 encrypted.img
root@imx8mqevk:~#
5. Use dmsetup to create a new device-mapper device named encrypted for example, and specify the
mapping table. The table can be provided on stdin or as argument.
root@imx8mqevk:~# dmsetup -v create encrypted --table "0 $(blockdev --getsz /dev/loop0) crypt
capi:tk(cbc(aes))-plain :36:logon:logkey: 0 /dev/loop0 0 1 sector_size:512"
Name: encrypted
State: ACTIVE
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
16. Mount.
root@imx8mqevk:~# mount /dev/mapper/encrypted /mnt/encrypted/
[ 191.961828] EXT4-fs (dm-0): mounted filesystem with ordered data mode.
Opts: (null)
[ 191.969533] ext4 filesystem being mounted at /mnt/encrypted supports
timestamps until 2038 (0x7fffffff)
root@imx8mqevk:~
17. Read from the device.
root@imx8mqevk:~# cat /mnt/encrypted/readme.txt
This is an encrypt with black key (ECB from text 16 bytes key size) test of
full disk encryption on i.MX.
root@imx8mqevk:~#
18. Unmount the device and deactivate the device mapper device.
root@imx8mqevk:~# umount /mnt/encrypted/; dmsetup remove encrypted
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
dm-setup keyctl
User space
Kernel space
K1
dm-crypt
K2 Key ring
encrypted keys Trusted ARM CE
HW RNG PTA
PTA
Block
Crypto-API
devices
ELE driver
Secure crypto
Linux Kernel drivers
driver
OP-TEE OS
Monitor mode
ATF
Hardware
RNG KDF
SATA OCRAM
Edgelock enclave
aaa-056243
Figure 14. Software stack that implements disk encryption on the i.MX platforms without CAAM hardware IP
This approach is implemented for protecting the DM-Crypt secrets and crypto operations, on the i.MX platforms
that do not have CAAM IP, such as i.MX 93.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
To protect the DM-Crypt operations like CAAM does, the following three key requirements are expected to be
fulfilled:
• Key does not leave the SoC:
In absence of the CAAM black key, the key(s) is/are always kept in Secure OCRAM giving security from
physical attacks.
• Crypto operations are done isolated boundary of CAAM:
In absence of CAAM, it is done in OP-TEE with Trusted Arm CE PTA, which is an isolated trusted execution
environment.
• Crypto Ops performance requirements like CAAM hardware accelerator:
In absence of CAAM, it can be satisfied by using the Arm Crypto Extension in Trusted Arm CE PTA.
Prerequisites:
• Ensure that a region of OCRAM is reserved. OP-TEE is using the OCRAM region:
– 0x20518000 - 0x2051C000 for saving keys.
• Compile the Kernel Image with the following KCONFIG:
– CONFIG_DM_CRYPT=y
– CONFIG_TRUSTED_KEYS=m
– CONFIG_TRUSTED_KEYS_TEE=y
• OP-TEE OS to be compiled to include Arm CE PTA:
– Currently, Runtime Random Number Generation from ELE is disabled because of some issues.
– To run this feature, disable CFG_WITH_SOFTWARE_PRNG.
– In all, flags that need to be enabled in OP-TEE:
– CFG_WITH_SOFTWARE_PRNG: To enable Runtime ELE RNG.
– Flags that need to be disabled in Linux OS:
– CONFIG_IMX_SEC_ENCLAVE: To disable the Linux Secure Enclave drive.
– CONFIG_IMX_ELE_TRNG: To disable Linux ELE TRNG support.
Usage:
• Insert the kernel module:
modprobe tee_crypto
modprobe trusted
modprobe dm_crypt
• Generate the key:
$:> export KEYNAME=dm_trust_plainkey
$:> KEY="$(keyctl add trusted $KEYNAME 'new 32' @s)"
$:> keyctl pipe $KEY >~/$KEYNAME.blob
$:> keyctl list @s
• Set the variables:
$:> export DEV=/dev/loop0
$:> export ALGO="capi:cbc-aes-tee-plain"
$:> export BLOCKS=$(blockdev --getsz /dev/loop0)
• Change the directory:
$:> cd /dev/shm/
• Run the following dd command:
$:> dd if=/dev/zero of=encrypted.img bs=1M count=512 && losetup /dev/loop0
encrypted.img
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
10.6.1 Prerequisites
The caam-keygen application is needed to import the black key from the black blob. Make sure that the caam-
keygen application is already present at /usr/bin.
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2019.01/gcc-
arm-8.2-2019.01-x86_64-aarch64-elf.tar.xz
$ tar xf gcc-arm-8.2-2019.01-x86_64-aarch64-elf.tar.xz
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
10.6.3 Usage
After the device successfully boots with the previously generated image, caam-crypt can be used to decrypt an
encrypted data stored in a file.
$ ./caam-crypt
Application usage: caam-crypt [options]
Options:
<crypto_op> <algo> [-k <blob_name>] [-in <input_file>] [-out <output_file>] [-
iv <IV value>]
<crypto_op> can be enc or dec
enc for encryption.
dec for decryption.
<algo> can be AES-256-CBC
<blob_name> the absolute path of the file that contains the black blob
<input_file> the absolute path of the file that contains input data
In case of encryption, input file will contain plain data.
In case of decryption, input file will contain encrypted data.
<output_file> the absolute path of the file that contains output data
<IV value> 16 bytes IV value
where:
• myblob: Generated black key blob. The caam-keygen application imports a black key from black blob. This
black key is used by CAAM for encryption/decryption.
• AES-256-CBC: Currently, the only supported symmetric algorithm used for encryption/decryption operation.
Note: Make sure that the algorithm used for encryption/decryption should be same.
• encrypted_file: Encrypted data stored in a file.
• plain_text_file: Plain text stored in a file (Padding is added for making data as multiples of block size).
• decrypted_file: Decrypted data stored in a file.
• iv: 16 bytes IV value.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
# sysctl -w net.core.optmem_max=1048576
The default value is set to 20480. Increasing to 1048576 (1 MB) seems to fix the issue of decryption of file size
greater than 1 MB.
10.7.1 Prerequisites
Check OpenSSL version using the following command. It must be 3.0.0 or higher.
openssl version
root@imx8mmevk:~# openssl req -new -newkey rsa:2048 -nodes -keyout rsa.key -out
rsa.csr
root@imx8mmevk:~# openssl x509 -req -sha256 -days 365 -in rsa.csr -signkey
rsa.key -out server.pem
root@imx8mmevk:~# openssl s_server -key rsa.key -cert server.pem -accept 443 -
ssl_config ktls
Using default temp DH parameters
ACCEPT
Remove -quiet to see full client logs. With TLSv1.2, the Kernel TLS supports these ciphers:
• AES128-GCM-SHA256
• AES256-GCM-SHA384
• ECDHE-RSA-AES128-GCM-SHA256
• ECDHE-RSA-AES256-GCM-SHA384
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
as an extended attribute (security.ima) and enforces local file integrity checks. The extended attribute
(security.ima) of a file is the hash value (SHA-1, SHA-256, or SHA-512) of its content. IMA maintains a list
of hash values over all executables and other sensitive system files loaded at runtime into the system.
Extended Verification Module (EVM): protects a file’s extended attributes against integrity attacks. The
extended security attribute (security.evm) stores the HMAC value over other extended attributes associated
with the file such as security.selinux, security.SMACK64, and security.ima.
EVM depends on the kernel key retention system and requires an encrypted key named evm-key for the HMAC
operation. The key is loaded onto the root user keyring using keyctl utility. EVM is enabled by setting an enable
flag in securityfs/evm file.
In normal secure boot process, contents of root file system mounted over persistent storage device are not
validated by any mechanism and hence cannot be trusted. Any malicious changes in non-trusted rootfs
contents are undetected. IMA EVM is the Linux standard mechanism to verify the integrity of the rootfs. Integrity
checks over file attributes and its contents are performed by Linux IMA EVM module before its execution. IMA
EVM depends on encrypted key loaded on user’s keyring. Loading keys to root user keyring and enabling
EVM is typically done using initramfs image. The initramfs image is validated using secure boot process and
becomes the part of chain of trust. Initramfs switches control to main rootfs mounted over storage device, after
EVM is successfully enabled on the system.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
-sh: /lib/modules/6.6.23-lts-next-06180-g4958e7a7a6dd/kernel/crypto/sm3.ko:
Permission denied
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Follow the CST User Guide available in the CST package to generate the keys, certificates, SRK table/
fuses and for more information.
Note: (Optional) Create and populate csf_hab4.cfg and/or csf_ahab.cfg with the preferred key type
at the CST location to use your preferred PKI tree. The default configuration files are located at the CST
Signer work directory in Yocto build.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
11 Connectivity
This section describes the connectivity for Bluetooth wireless technology and Wi-Fi, as well as for USB type-C.
Table 88. On-board chips and external solutions for Bluetooth and Wi-Fi support
SoC On-board chip PCIe M.2 card uSD card or SDIO M.2 card
8QuadXPlus/8DXL - NXP PCIe 88W9098 (tested -
with Murata LBEE5ZZ1XL)
8QuadMax - NXP PCIe 88W9098 (tested -
with Murata LBEE5ZZ1XL)
8M Quad - NXP 88W8997 (tested with -
Murata LBEE5XV1YM)
On i.MX 8M Quad WEVK
board (use M.2 on the bottom
side):
NXP PCIe 88W9098 (tested
with Murata LBEE5ZZ1XL).
8M Nano NXP 88W8987 (tested with - NXP SDIO IW612 (tested
AzureWave AW-CM358SM) with Murata LBES5PL2EL)
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 88. On-board chips and external solutions for Bluetooth and Wi-Fi support...continued
SoC On-board chip PCIe M.2 card uSD card or SDIO M.2 card
8M Plus - NXP 88W8997 (tested with NXP SDIO 88W8997 (tested
AW-CM276MAPUR) with Murata LBEE5XV1YM)
NXP PCIe 88W9098 (tested NXP SDIO 88W9098 (tested
with Murata LBEE5ZZ1XL). with Murata LBEE5ZZ1XL)
8ULP - - NXP SDIO IW416 (tested
with Murata LBEE5CJ1XK)
i.MX 91 - - NXP SDIO IW612 (tested
with Murata LBES5PL2EL)
i.MX 93 - - NXP SDIO IW612 (tested
with Murata LBES5PL2EL)
i.MX 95 - On i.MX 95 19x19 EVK On i.MX 95 15x15 EVK
board: board:
NXP PCIe 88W9098 (tested NXP SDIO IW612 (tested
with U-Blox JODY-W3). with Murata LBES5PL2EL)
Note: All Murata LBEE5QD1ZM are tested on i.MX 6/i.MX 7 platforms along with the Murata M.2-to-usd
adapter.
The wireless driver supports wpa_supplicant, which is a WEP/WPA/WPA2/WPA3 encryption authenticated tool.
• Wi-Fi driver: supports NXP 88W8987-based modules with SDIO interface, NXP 88W9098-based modules
with PCIe and SDIO interfaces, NXP 88W8997-based modules with PCIe and SDIO interfaces, NXP IW416-
based modules with SDIO interface, NXP 88W8801-based modules with SDIO interface, and NXP IW612-
based modules with SDIO interface.
• Firmware
The NXP release package already includes all NXP, Wi-Fi/Bluetooth firmware. It requires to accept NXP
license.
To run Wi-Fi, execute the following commands first and follow common commands below:
• For the following steps, execute these commands using connman
# For all the Wi-Fi modules:
modprobe moal mod_para=nxp/wifi_mod_para.conf
$connmanctl
connmanctl> enable wifi
connmanctl> scan wifi
connmanctl> services /* This should list of the network. For example
wifi_c0e4347f5053_4a62726f_managed_psk*/
connmanctl> agent on
connmanctl> connect wifi_c0e4347f5053_4a62726f_managed_psk /* Enter Passphrase
*/
Agent RequestInput wifi_c0e4347f5053_4a62726f_managed_psk
Passphrase = [ Type=psk, Requirement=mandatory ]
Passphrase?
connmanctl> quit
To run NXP Bluetooth with BlueZ stack, execute the following commands (it requires load Wi-Fi first to load
Bluetooth firmware):
modprobe btnxpuart
hciconfig hci0 up
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Run the following commands to connect the Bluetooth device for all chips:
$ bluetoothctl
[bluetooth]# default-agent
[bluetooth]# agent on
[bluetooth]# scan on
[bluetooth]# pair xx:xx:xx:xx:xx:xx
[BT dev]# connect xx:xx:xx:xx:xx:xx
[BT dev]# quit
Note:
MuRata has two kinds of 88W9098 1XL modules with no visual difference between them. The old version 1XL
sets the initial baud rate of Bluetooth firmware to 3 Mbps, and the new version 1XL sets it to 115200 bps.
BSP release supports the new 1XL module (115200 bps) by default. To use the old 1XL module (3 Mbps), add
the fw-init-baudrate = <3000000> property in Bluetooth device node of the dts file to make it work.
The i.MX 6 boards require board rework to support the Bluetooth/Wi-Fi enablement as well as running with the
Bluetooth/Wi-Fi device tree. The following is a list of the hardware modifications required and possibly conflicts
caused by these modifications.
• i.MX 6QuadPlus/Quad/Dual/DualLite/Solo: See https://community.nxp.com/docs/DOC-94235. This change
HAS a pin conflict with: EPDC/SPI-NOR/GPIO-LED.
• i.MX 6SoloX: Install R328, and disconnect R327. Connect with SD2 slot and BLUETOOTH CABLE
CONNECTOR J19. It has no Pin conflict with other modules.
• i.MX 6SLL: Install R127, and double check to ensure R126 and R128 are installed. Connect with SD3 slot and
BLUETOOTH CABLE CONNECTOR J4. It has no Pin conflict with other modules.
• i.MX 6UL/ULL/ULZ: Install R1701. It has no Pin conflict with other modules.
Rework is also required to support NXP PCIe 88W9098 on i.MX 8M Plus.
• To run NXP PCIe 88W9098 on i.MX 8M Plus, perform the hardware rework as follows:
Change R452 to 0 ohm.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
default-role = "source";
status = "okay";
};
For power capability related configuration, users need to check the PD specification to see how to composite
the PDO value. To make it support power source role for more voltages, specify the source PDO. The i.MX
8QuadXPlus board can support 5 V and 12 V power supply.
• Users can use /sys/kernel/debug/tcpm/2-0050 to check the power delivery state, which is for
debugging purpose information.
The following describes the connectivity for USB type-C and power delivery connection on the i.MX 95 EVK
board.
• The Linux release includes USB type-C and PD stack, which are enabled by default. The specific power
parameters are passed in by DTS. The following takes i.MX 95 EVK as an example:
ptn5110: tcpc@50 {
compatible = "nxp,ptn5110";
reg = <0x50>;
interrupt-parent = <&gpio5>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ptn5110>;
typec_con: connector {
compatible = "usb-c-connector";
label = "USB-C";
power-role = "dual";
data-role = "dual";
try-power-role = "sink";
source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)
PDO_VAR(5000, 20000, 3000)>;
op-sink-microwatt = <15000000>;
self-powered;
};
};
For power capability related configuration, users need to check the PD specification to see how to composite
the PDO value. To make it support power source role for more voltages, specify the source PDO. The i.MX 95
EVK board only supports 5V supply.
• Users can use /sys/kernel/debug/usb/tcpm-6-0050/log to check the power delivery state, which is
for debugging purpose information.
• Booting only by type-C port power supply is not supported.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
GND1 3V3_1
1 2
M2_USB_DP USB_D+ 3V3_2
TP601 3 Key E 4
M2_USB_DN USB_D- LED1
TP603 5 6
GND2 I2S_SCK M2_PCM_CLK
7 8 TP604
M2_SD_CLK SDIO_CLK I2S_WS M2_PCM_SYNC
TP605 9 10 TP606
M2_SD_CMD SDIO_CMD I2S_SD_IN M2_PCM_IN
TP607 11 1.8 V 12 TP608
M2_SD_DAT0 SDIO_DATA0 I2S_SD_OUT M2_PCM_OUT
TP609 13 14 TP610
M2_SD_DAT1 SDIO_DATA1 LED2
TP611 15 16
M2_SD_DAT2 SDIO_DATA2 1.8 V GND3
TP612 17 18
M2_SD_DAT3 SDIO_DATA3 UART_WAKE BT_DEV_WAKE
TP613 19 20 TP614
M2_SD_WAKE SDIO_WAKE UART_RXD M2_UART_RXD
TP615 21 22 TP616
M2_SD_nRST SDIO_RST
TP617 23
Workarounds
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Use an M.2 adapter to do a physical connection to bring SDIO, UART, and I2S signals to the J1003 connector.
With this, it is required to modify the device tree to enable these new modules.
11.5 Certification
12.1 Introduction
There are counters in some i.MX 8 DDR controllers, which are used to monitor DDR signals. Some signals can
help users monitor DDR transactions and calculate DDR bandwidth.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
– LCDIF1:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_id=0x68/,imx8_ddr0/axid-
write,axi_id=0x68/
• For i.MX 8DXL:
– All masters:
# perf stat -a -I 1000 -e imx8_ddr0/cycles/,imx8_ddr0/read-cycles/,imx8_ddr0/
write-cycles/
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_mask=0xffff/,imx8_ddr0/
axid-write,axi_mask=0xffff/
– USB 2.0:
# perf stat -a -I 1000 -e imx8_ddr0/axid-
read,axi_mask=0xb0,axi_id=0x40b/,imx8_ddr0/axid-
write,axi_mask=0xb0,axi_id=0x40b/
– USDHC0:
# perf stat -a -I 1000 -e imx8_ddr0/axid-read,axi_id=0x1b/,imx8_ddr0/axid-
write,axi_id=0x1b/
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
13.1 Introduction
The One-Time Programmable Controller driver is realized with the NVMEM Subsystem, which introduces
DT representation for consumer devices to get the data they require (MAC addresses, SoC/Revision ID, part
numbers, and so on) from the NVMEMs.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
• i.MX 8ULP
# hexdump /sys/bus/nvmem/devices/fsb_s400_fuse1/nvmem
• i.MX 8M Plus
f = open('/sys/devices/platform/30350000.ocotp-ctrl/imx-ocotp0/nvmem', 'br+')
f.seek(0x90) # MAC1_ADDR
f.write(pack('<L', 0x30445011))
f.close()
EAR00386
IW416 Type 1XK (LBEE5CJ1XK)
EAR00385
88W8987 Type 1ZM (LBEE5QD1ZM)
EAR00364
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
EAR00370
88W9098 Type 1XL (LBEE5ZZ1XL)
EAR00387
Table 91. Murata Wi-Fi/Bluetooth solutions for NXP and Embedded Artists EVKs
Embedded Artists M.2
EVK Murata module Interconnect
Module Part #
NXP i.MX 8QuadMax Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8QuadXPlus Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8M Type 1XK uSD-M.2 EAR00385
Type 1ZM uSD-M.2 EAR00364
[1]
Type 1YM (SDIO ) uSD-M.2 EAR00370
[1]
Type 1XL (SDIO ) uSD-M.2 EAR00387
Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8DXL Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8M Plus Type 1XK M.2 EAR00385
Type 1ZM M.2 EAR00364
[1]
Type 1YM (SDIO ) M.2 EAR00370
[1]
Type 1XL (SDIO ) M.2 EAR00387
Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8M Mini LPDDR4 Type 1XK uSD-M.2 EAR00385
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Table 91. Murata Wi-Fi/Bluetooth solutions for NXP and Embedded Artists EVKs...continued
Embedded Artists M.2
EVK Murata module Interconnect
Module Part #
Type 1ZM uSD-M.2 EAR00364
[1]
Type 1YM (SDIO ) uSD-M.2 EAR00370
[1]
Type 1XL (SDIO ) uSD-M.2 EAR00387
Type 1YM (PCIe) M.2 EAR00370
Type 1XL (PCIe) M.2 EAR00387
NXP i.MX 8M Nano LPDDR4 Type 1XK uSD-M.2 EAR00385
Type 1ZM uSD-M.2 EAR00364
[1]
Type 1YM (SDIO ) uSD-M.2 EAR00370
[1]
Type 1XL (SDIO ) uSD-M.2 EAR00387
NXP i.MX 7Dual Type 1XK uSD-M.2 EAR00385
Type 1ZM uSD-M.2 EAR00364
[1]
Type 1YM (SDIO ) uSD-M.2 EAR00370
NXP i.MX 7ULP Type 1XK uSD-M.2 EAR00385
Type 1ZM uSD-M.2 EAR00364
NXP i.MX 6QuadPlus Type 1XK uSD-M.2 EAR00385
NXP i.MX 6Quad Type 1YM (SDIO )
[1]
uSD-M.2 EAR00370
NXP i.MX 6DL
NXP i.MX 6SLL Type 1XK uSD-M.2 EAR00385
NXP i.MX 6UL Type 1ZM uSD-M.2 EAR00364
NXP i.MX 6ULL/ULZ [1]
Type 1YM (SDIO ) uSD-M.2 EAR00370
[1] Default strapping option on Embedded Artists 1YM/1XL M.2 module is WLAN-PCIe. Refer to Embedded Artists datasheet on how to modify strapping on
M.2 module for WLAN-SDIO configuration.
16.1.1 Yocto
Arm SystemReady Certification bootloader can be generated in the latest NXP i.MX Yocto Linux BSP. The build
steps are as follows.
If you are building for your own board, update imx-mkimag/iMX8M/soc.mak CAPSULE_GUID to match your
board guid.
Do not use the default one in imx-mkimage/iMX8M/soc.mak; otherwise, the SR-IR-2.0 certification will fail.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
$ sudo apt install gawk wget git diffstat unzip texinfo gcc build-essential
chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils
iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint3
xterm python3-subunit mesa-common-dev zstd liblz4-tool
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Modify Platform/StandaloneMm/PlatformStandaloneMmPkg/
PlatformStandaloneMmRpmb.dsc
- gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800
+ gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x3800^M
$ cd edk2
$ git submodule init && git submodule update --init --recursive
$ cd ..
$ export WORKSPACE=$(pwd)
$ export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/edk2-platforms
$ export ACTIVE_PLATFORM="Platform/StandaloneMm/PlatformStandaloneMmPkg/
PlatformStandaloneMmRpmb.dsc"
$ export GCC5_AARCH64_PREFIX= aarch64-poky-linux-
$ source edk2/edksetup.sh
$ make -C edk2/BaseTools
$ build -p $ACTIVE_PLATFORM -b RELEASE -a AARCH64 -t GCC5 -n `nproc`
+ CFG_CORE_DYN_SHM=y CFG_RPMB_TESTKEY=y \
+ CFG_REE_FS=n \
+ CFG_SCTLR_ALIGNMENT_CHECK=n \
+ CFG_CORE_HEAP_SIZE=2097152 \
+ CFG_TEE_RAM_VA_SIZE=4194304 \
+ CFG_PREALLOC_RPC_CACHE=n \
CFG_WERROR=y \
PLATFORM="$plat" \
O="$O"/build."$plat" \
To i.MX 8M Quad EVK, the CFG_RPMB_FS_DEV_ID should be 0. For i.MX 8M Nano/Mini/Plus EVK, it is 2 as
follows:
Build cmd.
Do not source the Yocto toolchain setup file; otherwise, the build fails. Take the following script as a reference.
#!/bin/sh
export GCC_PATH=/home/Freenix/tools/fsl-imx-internal-xwayland/5.15-kirkstone/
export SDKTARGETSYSROOT=$GCC_PATH/sysroots/cortexa72-cortexa53-crypto-poky-linux
export PATH=$PATH:$GCC_PATH/sysroots/x86_64-pokysdk-linux/usr/bin/aarch64-poky-
linux/
export CC="aarch64-poky-linux-gcc -mcpu=cortex-a72.cortex-a53 -march=armv8-a
+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-
security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export CXX="aarch64-poky-linux-g++ -mcpu=cortex-a72.cortex-a53 -march=armv8-a
+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-
security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export CPP="aarch64-poky-linux-gcc -E -mcpu=cortex-a72.cortex-a53 -march=armv8-
a+crc+crypto -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -
Wformat-security -Werror=format-security --sysroot=$SDKTARGETSYSROOT"
export AS="aarch64-poky-linux-as "
export LD="aarch64-poky-linux-ld --sysroot=$SDKTARGETSYSROOT"
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
#!/bin/sh
. /home/Freenix/tools/fsl-imx-internal-xwayland/5.15-kirkstone/environment-
setup-cortexa72-cortexa53-crypto-poky-linux
make imx8mm_evk_defconfig O=imx8mmevk
make O=imx8mmevk -j4
make imx8mp_evk_defconfig O=imx8mpevk
make O=imx8mpevk -j4
make imx8mn_evk_defconfig O=imx8mnevk
make O=imx8mnevk -j4
make imx8mq_evk_defconfig O=imx8mqevk
make O=imx8mqevk -j4
There is no need to generate the capsule key every time. Save the CRT.* files to a backup folder. The files are
required when generating capsule1.bin. If these files are lost, regenerate flash.bin and capsule1.bin.
If your flash.bin and capsule1.bin use different CRT files, capsule update will fail.
cp $U_BOOT/imx8mpevk/u-boot-nodtb.bin imx-mkimage/iMX8M
cp $U_BOOT/imx8mpevk/spl/u-boot-spl.bin imx-mkimage/iMX8M
cp $U_BOOT/imx8mpevk/arch/arm/dts/imx8mp-evk.dtb imx-mkimage/iMX8M
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
cp $ATF/build/imx8mp/release/bl31.bin imx-mkimage/iMX8M
cp $OPTEE/build.imx-mx8mpevk/core/tee-raw.bin imx-mkimage/iMX8M/tee.bin-stmm
Copy the ddr firmware to imx-mkimage/iMX8M/
make SOC=iMX8MP clean; make SOC=iMX8MP TEE=tee.bin-stmm flash_evk_stmm_capsule
[Save flash.bin, if you wanna generate capsule1.bin with other binaries, such
as updated u-boot/atf/tee, copy new binaries and rerun this command, and save
capsule1.bin]
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
2. Download https://github.com/ARM-software/arm-systemready/blob/main/IR/prebuilt_images/v24.03_2.1.1/ir-
acs-live-image-generic-arm64.wic.xz.
3. Burn acs.img to the SD card and plug in the SD card to the board.
4. Set the board to boot from eMMC, and check the board silkscreen to set the boot switch correctly.
5. (Optional) Clear the eMMC key if necessary.
Note:
• Once you burn the key in Step 7, you do not need to clear the key again every time.
• The key is the OP-TEE test key for test purposes. For production, use your own key.
=>mw 0x60000000 0xc33eebd3;mw 0x60000004 0x9f4c336e;mw 0x60000008
0xc0e28c98;mw 0x6000000c 0x615459b8;mw 0x60000010 0x86cf2b0d;mw 0x60000014
0xf24d8464;mw 0x60000018 0xc6e656ab;mw 0x6000001c 0xe401b71b
=>mw.b 0x50000000 0 0x400000
=>mmc rpmb write 0x50000000 0 0x2000 0x60000000
For i.MX 93 11x11 EVK:
=>mw 0x80000000 0xc33eebd3;mw 0x80000004 0x9f4c336e;mw 0x80000008
0xc0e28c98;mw 0x8000000c 0x615459b8;mw 0x80000010 0x86cf2b0d;mw 0x80000014
0xf24d8464;mw 0x80000018 0xc6e656ab;mw 0x8000001c 0xe401b71b
=>mw.b 0x90000000 0 0x400000
=>mmc rpmb write 0x90000000 0 0x2000 0x80000000
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
10. The following command can also be used to update and reset the board:
=>setenv -e -nv -bs -rt -v OsIndications =0x0000000000000004
=>efidebug capsule disk-update
When this command is executed:
u-boot=> efidebug capsule disk-update
Applying the capsule capsule1.bin succeeded.
Reboot after firmware update resetting.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Summary
-------
21 dt-validate warning
3 dt-validate warning missing property
7 dt-validate warning naming
Non-ignored entries
-------------------
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
16.4.1 Fedora
Perform the following steps:
1. Download the Fedora 36 Workstation or newer version.
• https://getfedora.org/en/iot/download/
• https://download.fedoraproject.org/pub/alt/iot/36/IoT/aarch64/iso/Fedora-IoT-ostree-
aarch64-36-20220618.0.iso
2. Burn the ISO to an SD card, and then boot the board from eMMC.
When the Fedora installer starts up, select what needs to be configured. After all configurations are
complete, enter b to start the installation.
When Fedora reports “Failed to set new efi boot target. This is most likely a kernel or firmware bug”,
respond with “yes” and continue. Ignore it, and it will not block the installation and boot.
3. After the installation is complete, press Enter to auto reboot.
16.4.2 OpenSuse
Perform the following steps:
1. Download openSUSE Leap 15.4 or newer version: https://get.opensuse.org/leap/15.4/#download/
openSUSE-Leap-15.4-DVD-aarch64-Build243.2-Media.iso
2. For i.MX 8M Quad EVK, use https://download.opensuse.org/ports/aarch64/tumbleweed/iso/openSUSE-
Tumbleweed-DVD-aarch64-Snapshot20220719-Media.iso?mirrorlist=
openSUSE-Leap 15.4 is not able to recognize eMMC on i.MX 8M Quad EVK, so use Tumbleweed.
3. Burn it to the SD card, and boot it from eMMC.
4. After the install is complete, remove the installation media.
5. Switch off/on the power on the board
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
18 Revision History
This table provides the revision history.
Revision history
Document ID Release date Description
UG10163 v.LF6.6.36_2.1.0 30 September Upgraded to the 6.6.36 kernel.
2024
IMXLUG_6.6.23_2.0.0 26 July 2024 Updated a command line in Section 10.9.1.3.
IMXLUG_6.6.23_2.0.0 28 June 2024 Upgraded to the 6.6.23 kernel, U-Boot v2024.04, TF-A
v2.10, OP-TEE 4.2.0, Yocto 5.0 Scarthgap, and added the
i.MX 91 as Alpha quality, i.MX 95 as Beta quality.
IMXLUG v.LF6.6.3_1.0.0 29 March 2024 Upgraded to the 6.6.3 kernel, removed the i.MX 91P, and
added the i.MX 95 as Alpha Quality.
IMXLUG v.LF6.1.55_2.2.0 12/2023 Updated a link in Section 10.9.1.
IMXLUG v.LF6.1.55_2.2.0 12/2023 Upgraded to the 6.1.55 kernel.
IMXLUG v.LF6.1.36_2.1.0 09/2023 Upgraded to the 6.1.36 kernel.
IMXLUG v.LF6.1.22_2.0.0 08/2023 Changed “0x9F800” to "0x9F8000" in Section Section 4.3.
IMXLUG v.LF6.1.22_2.0.0 07/2023 Updated a description in Section Section 4.3.4.
IMXLUG v.LF6.1.22_2.0.0 06/2023 Upgraded to the 6.1.22 kernel.
IMXLUG v.LF6.1.1_1.0.00 03/2023 Upgraded to the 6.1.1 kernel.
IMXLUG v.LF5.15.71_2.2.0 12/2022 Upgraded to the 5.15.71 kernel.
IMXLUG v.LF5.15.52_2.1.0 09/2022 Upgraded to the 5.15.52 kernel, and added the i.MX 93.
IMXLUG v.LF5.15.32_2.0.0 06/2022 Upgraded to the 5.15.32 kernel, U-Boot 2022.04, and
Kirkstone Yocto.
IMXLUG v.LF5.15.5_1.0.0 03/2022 Upgraded to the 5.15.5 kernel, Honister Yocto, and Qt6.
IMXLUG v.LF5.10.72_2.2.0 12/2021 Upgraded the kernel to 5.10.72 and updated the BSP.
IMXLUG v.LF5.10.52_2.1.0 10/2021 Added an appendix for Murata Wi-Fi/Bluetooth solutions.
IMXLUG v.LF5.10.52_2.1.0 09/2021 Updated for i.MX 8ULP Alpha and the kernel upgraded to
5.10.52.
IMXLUG v.LF5.10.35_2.0.0 06/2021 Upgraded Yocto Project to Hardknott and the kernel
upgraded to 5.10.35.
IMXLUG v.LF5.10.9_1.0.0 03/2021 Upgraded Yocto Project to Gatesgarth and the kernel
upgraded to 5.10.9.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Revision history...continued
Document ID Release date Description
IMXLUG v.L5.4.70_2.3.0 01/2021 Updated the command lines in Section "Running the Arm
Cortex-M4 image".
IMXLUG v.L5.4.70_2.3.0 12/2020 i.MX 5.4 consolidated GA for release i.MX boards including i.
MX 8M Plus and i.MX 8DXL.
IMXLUG v.L5.4.47_2.2.0 09/2020 i.MX 5.4 Beta2 release for i.MX 8M Plus, Beta for 8DXL, and
consolidated GA for released i.MX boards.
IMXLUG v.L5.4.24_2.1.0 06/2020 i.MX 5.4 Beta release for i.MX 8M Plus, Alpha2 for 8DXL,
and consolidated GA for released i.MX boards.
IMXLUG v.L5.4.3_2.0.0 04/2020 i.MX 5.4 Alpha release for i.MX 8M Plus and 8DXL EVK
boards.
IMXLUG v.LF5.4.3_1.0.0 03/2020 i.MX 5.4 Kernel and Yocto Project Upgrades.
IMXLUG v.L4.19.35_1.1.0 10/2019 i.MX 4.19 Kernel and Yocto Project Upgrades.
IMXLUG v.L4.19.35_1.0.0 07/2019 i.MX 4.19 Beta Kernel and Yocto Project Upgrades.
IMXLUG v.L4.14.98_2.0.0_ga 04/2019 i.MX 4.14 Kernel upgrade and board updates.
IMXLUG v.L4.14.78_1.0.0_ga 01/2019 i.MX 6, i.MX 7, i.MX 8 family GA release.
IMXLUG v.L4.14.62_1.0.0_beta 11/2018 i.MX 4.14 Kernel Upgrade, Yocto Project Sumo upgrade.
IMXLUG v.L4.9.123_2.3.0_8mm 09/2018 i.MX 8M Mini GA release.
IMXLUG v.L4.9.88_2.2.0_8qxp-beta2 07/2018 i.MX 8QuadXPlus Beta2 release.
IMXLUG v.L4.9.88_2.1.0_8mm-alpha 06/2018 i.MX 8M Mini Alpha release.
IMXLUG v.L4.9.88_2.0.0-ga 05/2018 i.MX 7ULP and i.MX 8M Quad GA release.
IMXLUG v.L4.9.51_imx8mq-ga 03/2018 Added i.MX 8M Quad GA.
IMXLUG v.L4.9.51_8qm-beta2/8qxp- 02/2018 Added i.MX 8QuadMax Beta2 and i.MX 8QuadXPlus Beta.
beta
IMXLUG v.L4.9.51_imx8mq-beta 12/2017 Added i.MX 8M Quad.
IMXLUG v.L4.9.51_imx8qm-beta1 12/2017 Added i.MX 8QuadMax.
IMXLUG v.L4.9.51_imx8qxp-alpha 11/2017 Initial release.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Legal information
Definitions Terms and conditions of commercial sale — NXP Semiconductors
products are sold subject to the general terms and conditions of commercial
sale, as published at https://www.nxp.com/profile/terms, unless otherwise
Draft — A draft status on a document indicates that the content is still agreed in a valid written individual agreement. In case an individual
under internal review and subject to formal approval, which may result agreement is concluded only the terms and conditions of the respective
in modifications or additions. NXP Semiconductors does not give any agreement shall apply. NXP Semiconductors hereby expressly objects to
representations or warranties as to the accuracy or completeness of applying the customer’s general terms and conditions with regard to the
information included in a draft version of a document and shall have no purchase of NXP Semiconductors products by customer.
liability for the consequences of use of such information.
Export control — This document as well as the item(s) described herein
may be subject to export control regulations. Export might require a prior
Disclaimers authorization from competent authorities.
Limited warranty and liability — Information in this document is believed Suitability for use in non-automotive qualified products — Unless
to be accurate and reliable. However, NXP Semiconductors does not give this document expressly states that this specific NXP Semiconductors
any representations or warranties, expressed or implied, as to the accuracy product is automotive qualified, the product is not suitable for automotive
or completeness of such information and shall have no liability for the use. It is neither qualified nor tested in accordance with automotive testing
consequences of use of such information. NXP Semiconductors takes no or application requirements. NXP Semiconductors accepts no liability for
responsibility for the content in this document if provided by an information inclusion and/or use of non-automotive qualified products in automotive
source outside of NXP Semiconductors. equipment or applications.
In no event shall NXP Semiconductors be liable for any indirect, incidental, In the event that customer uses the product for design-in and use in
punitive, special or consequential damages (including - without limitation - automotive applications to automotive specifications and standards,
lost profits, lost savings, business interruption, costs related to the removal customer (a) shall use the product without NXP Semiconductors’ warranty
or replacement of any products or rework charges) whether or not such of the product for such automotive applications, use and specifications, and
damages are based on tort (including negligence), warranty, breach of (b) whenever customer uses the product for automotive applications beyond
contract or any other legal theory. NXP Semiconductors’ specifications such use shall be solely at customer’s
own risk, and (c) customer fully indemnifies NXP Semiconductors for any
Notwithstanding any damages that customer might incur for any reason
liability, damages or failed product claims resulting from customer design and
whatsoever, NXP Semiconductors’ aggregate and cumulative liability
use of the product for automotive applications beyond NXP Semiconductors’
towards customer for the products described herein shall be limited in
standard warranty and NXP Semiconductors’ product specifications.
accordance with the Terms and conditions of commercial sale of NXP
Semiconductors.
HTML publications — An HTML version, if available, of this document is
provided as a courtesy. Definitive information is contained in the applicable
Right to make changes — NXP Semiconductors reserves the right to
document in PDF format. If there is a discrepancy between the HTML
make changes to information published in this document, including without
document and the PDF document, the PDF document has priority.
limitation specifications and product descriptions, at any time and without
notice. This document supersedes and replaces all information supplied prior
Translations — A non-English (translated) version of a document, including
to the publication hereof.
the legal information in that document, is for reference only. The English
version shall prevail in case of any discrepancy between the translated and
Suitability for use — NXP Semiconductors products are not designed,
English versions.
authorized or warranted to be suitable for use in life support, life-critical or
safety-critical systems or equipment, nor in applications where failure or
Security — Customer understands that all NXP products may be subject to
malfunction of an NXP Semiconductors product can reasonably be expected
unidentified vulnerabilities or may support established security standards or
to result in personal injury, death or severe property or environmental
specifications with known limitations. Customer is responsible for the design
damage. NXP Semiconductors and its suppliers accept no liability for
and operation of its applications and products throughout their lifecycles
inclusion and/or use of NXP Semiconductors products in such equipment or
to reduce the effect of these vulnerabilities on customer’s applications
applications and therefore such inclusion and/or use is at the customer’s own
and products. Customer’s responsibility also extends to other open and/or
risk.
proprietary technologies supported by NXP products for use in customer’s
applications. NXP accepts no liability for any vulnerability. Customer should
Applications — Applications that are described herein for any of these
regularly check security updates from NXP and follow up appropriately.
products are for illustrative purposes only. NXP Semiconductors makes no
representation or warranty that such applications will be suitable for the Customer shall select products with security features that best meet rules,
specified use without further testing or modification. regulations, and standards of the intended application and make the
ultimate design decisions regarding its products and is solely responsible
Customers are responsible for the design and operation of their
for compliance with all legal, regulatory, and security related requirements
applications and products using NXP Semiconductors products, and NXP
concerning its products, regardless of any information or support that may be
Semiconductors accepts no liability for any assistance with applications or
provided by NXP.
customer product design. It is customer’s sole responsibility to determine
whether the NXP Semiconductors product is suitable and fit for the NXP has a Product Security Incident Response Team (PSIRT) (reachable
customer’s applications and products planned, as well as for the planned at [email protected]) that manages the investigation, reporting, and solution
application and use of customer’s third party customer(s). Customers should release to security vulnerabilities of NXP products.
provide appropriate design and operating safeguards to minimize the risks
associated with their applications and products. NXP B.V. — NXP B.V. is not an operating company and it does not distribute
NXP Semiconductors does not accept any liability related to any default, or sell products.
damage, costs or problem which is based on any weakness or default
in the customer’s applications or products, or the application or use by
customer’s third party customer(s). Customer is responsible for doing all Trademarks
necessary testing for the customer’s applications and products using NXP
Semiconductors products in order to avoid a default of the applications
Notice: All referenced brands, product names, service names, and
and the products or of the application or use by customer’s third party
trademarks are the property of their respective owners.
customer(s). NXP does not accept any liability in this respect.
NXP — wordmark and logo are trademarks of NXP B.V.
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Contents
1 Overview ........................................................... 2 4.7 Running Linux OS on the target ...................... 42
1.1 Audience ............................................................ 2 4.7.1 Running the image from NAND ....................... 44
1.2 Conventions ....................................................... 2 4.7.2 Running Linux OS from Parallel NOR ............. 45
1.3 Supported hardware SoCs and boards ............. 2 4.7.3 Running the Linux OS image from QuadSPI ... 45
1.4 References .........................................................3 4.7.4 Running the Arm Cortex-M4/7/33 image ......... 45
2 Introduction ...................................................... 5 4.7.5 Linux OS login ................................................. 48
3 Basic Terminal Setup ...................................... 5 4.7.6 Running Linux OS from MMC/SD ....................48
4 Booting Linux OS ............................................ 5 4.7.7 Running the Linux image from NFS ................ 49
4.1 Software overview ............................................. 6 4.8 Arm SystemReady-IR ...................................... 50
4.1.1 Bootloader ..........................................................7 4.8.1 Arm SystemReady-IR ACS compliance test .... 50
4.1.2 Linux kernel image and device tree ...................7 4.8.2 Capsule update ............................................... 50
4.1.3 Root file system .................................................8 4.8.3 Linux distro installation .................................... 50
4.2 Universal update utility ...................................... 8 5 Enabling Solo Emulation .............................. 51
4.2.1 Downloading UUU ............................................. 8 6 Power Management ....................................... 51
4.2.2 Using UUU .........................................................8 6.1 Suspend and resume ...................................... 51
4.3 Preparing an SD/MMC card to boot .................. 9 6.2 CPU frequency scaling .................................... 52
4.3.1 Preparing the card ...........................................10 6.3 Bus frequency scaling ..................................... 52
4.3.2 Copying the full SD card image .......................10 7 Multimedia ...................................................... 54
4.3.3 Partitioning the SD/MMC card ......................... 11 7.1 i.MX multimedia packages ...............................54
4.3.4 Copying a bootloader image ............................11 7.2 Building limited access packages .................... 54
4.3.5 Copying the kernel image and DTB file ........... 12 7.3 Multimedia use cases ...................................... 54
4.3.6 Copying the root file system (rootfs) ................ 13 7.3.1 Playback use cases .........................................54
4.4 Downloading images ....................................... 13 7.3.1.1 Audio-only playback .........................................55
4.4.1 Downloading images using U-Boot ..................13 7.3.1.2 Video-only playback .........................................55
4.4.1.1 Flashing an Arm Cortex-M4 image on 7.3.1.3 Audio/Video file playback .................................55
QuadSPI .......................................................... 14 7.3.1.4 Multichannel audio playback ............................56
4.4.1.2 Downloading an image to MMC/SD .................15 7.3.1.5 Other methods for playback ............................ 56
4.4.1.3 Using eMMC ....................................................16 7.3.1.6 Video playback to multiple displays ................. 56
4.4.1.4 Flashing U-Boot on SPI-NOR from U-Boot ...... 19 7.3.2 Audio encoding ................................................57
4.4.1.5 Flashing U-Boot on Parallel NOR from U- 7.3.3 Video encoding ................................................ 57
Boot ..................................................................20 7.3.4 Transcoding ..................................................... 59
4.4.2 Using an i.MX board as the host server to 7.3.5 Audio recording ............................................... 59
create a rootfs ................................................. 21 7.3.6 Video recording ................................................60
4.5 How to boot the i.MX boards ...........................23 7.3.7 Audio/Video recording ..................................... 61
4.5.1 Booting from an SD card in slot SD1 ...............24 7.3.8 Camera preview .............................................. 61
4.5.2 Booting from an SD card in slot SD2 ...............24 7.3.9 Libcamera ........................................................ 62
4.5.3 Booting from an SD card in slot SD3 ...............26 7.3.9.1 Overview .......................................................... 62
4.5.4 Booting from an SD card in slot SD4 ...............26 7.3.9.2 Neo ISP Image Processing Algorithm ............. 63
4.5.5 Booting from eMMC ........................................ 27 7.3.9.3 Camera modules ............................................. 65
4.5.6 Booting from SATA .......................................... 29 7.3.9.4 Libcamera configuration .................................. 66
4.5.7 Booting from NAND ......................................... 29 7.3.9.5 GStreamer pipelines ........................................ 67
4.5.8 Booting from SPI-NOR .................................... 30 7.3.9.6 cam test application .........................................68
4.5.9 Booting from EIM (Parallel) NOR .................... 30 7.3.9.7 Limitations ........................................................70
4.5.10 Booting from QuadSPI or FlexSPI ................... 30 7.3.10 Recording the TV-in source .............................70
4.5.11 Serial download mode for the 7.3.11 Web camera .................................................... 70
Manufacturing Tool .......................................... 32 7.3.12 HTTP streaming .............................................. 71
4.5.12 How to build U-Boot and Kernel in 7.3.13 HTTP live streaming ........................................ 71
standalone environment .................................. 34 7.3.14 MPEG-DASH streaming .................................. 71
4.5.13 How to build imx-boot image by using imx- 7.3.15 Real Time Streaming Protocol (RTSP)
mkimage .......................................................... 37 playback ...........................................................71
4.6 Flash memory maps ........................................ 41 7.3.16 RTP/UDP MPEGTS streaming ........................ 72
4.6.1 MMC/SD/SATA memory map .......................... 41 7.3.17 RTSP streaming server ................................... 73
4.6.2 NAND flash memory map ................................41 7.3.18 Video conversion ............................................. 74
4.6.3 Parallel NOR flash memory map ..................... 41 7.3.19 Video composition ........................................... 77
4.6.4 SPI-NOR flash memory map ........................... 42 7.4 PipeWire input/output settings ......................... 78
4.6.5 QuadSPI flash memory map ........................... 42 7.4.1 PipeWire settings .............................................78
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
7.5 Installing gstreamer1.0-libav into rootfs ........... 79 10.4.7.5 Running the OPENSSL Kernel TLS test ........ 107
8 Audio ...............................................................79 10.5 Disk encryption acceleration ..........................107
8.1 DSP support .................................................... 80 10.5.1 Enabling disk encryption support in kernel
8.1.1 HiFi 4 DSP framework .....................................80 for the platform containing CAAM hardware
8.1.2 Sound Open Firmware .................................... 80 IP ....................................................................108
8.2 HDMI eARC support ........................................80 10.5.2 User space tools for disk encryption ..............109
8.3 Low power voice UI .........................................81 10.5.3 DM-Crypt using CAAM backed keys ............. 109
8.3.1 Introduction ...................................................... 81 10.5.3.1 DM-Crypt with Trusted keys backed by
8.3.2 Standard voice solution ................................... 82 CAAM .............................................................110
8.3.3 Audio Front End (AFE) .................................... 83 10.5.3.2 DM-Crypt with CAAM’s tagged key ............... 112
8.3.4 Linux drivers .................................................... 87 10.5.3.3 Usage .............................................................113
8.3.5 Cortex-M Image ............................................... 87 10.5.4 DM-Crypt using DCP's Crypto Key ................ 117
8.3.5.1 Application name ............................................. 87 10.5.5 DM-Crypt usage on i.MX Platforms without
8.3.5.2 Board setup ..................................................... 87 CAAM hardware IP ........................................118
8.3.5.3 Execution ......................................................... 89 10.6 crypto_af_alg application support .................. 120
8.3.6 Power consumption notes ............................... 89 10.6.1 Prerequisites .................................................. 120
8.3.7 Using Linux remoteproc (i.MX 93 and i.MX 10.6.2 Building the kernel ......................................... 120
95) ....................................................................89 10.6.2.1 Kernel configuration .......................................120
8.4 Conversa Integration ....................................... 90 10.6.2.2 Building a toolchain ....................................... 120
9 Graphics ......................................................... 91 10.6.2.3 Cross compiling the user space sources ....... 120
9.1 imx-gpu-sdk ..................................................... 92 10.6.3 Usage .............................................................121
9.2 G2D-imx-samples ............................................ 92 10.6.4 Use case example ......................................... 121
9.3 viv_samples ..................................................... 92 10.7 Kernel TLS offload .........................................122
9.4 Qt 6 ..................................................................93 10.7.1 Prerequisites .................................................. 122
10 Security ...........................................................93 10.7.2 Running Kernel TLS test ............................... 122
10.1 CAAM kernel driver ......................................... 93 10.8 IMA/EVM on i.MX SoCs ................................ 122
10.1.1 Introduction ...................................................... 93 10.8.1 EVM Key on user keyrings ............................ 123
10.1.2 Source files ......................................................94 10.8.2 Modes of operation in IMA EVM ....................123
10.1.3 Module loading ................................................ 95 10.8.3 Build Steps .................................................... 124
10.1.4 Kernel configuration .........................................95 10.8.4 Steps to verify IMA EVM feature ................... 124
10.1.5 How to test the drivers .................................... 96 10.8.4.1 Testing hashing ..............................................125
10.2 Crypto algorithms support ............................... 98 10.8.4.2 Testing signing ............................................... 125
10.3 CAAM Job Ring backend driver 10.9 Security reference design .............................. 126
specifications ................................................... 99 10.9.1 Automated image signing for secure boot ......126
10.3.1 Verifying driver operation and correctness .....100 10.9.1.1 NXP CST Signer ........................................... 126
10.3.2 Incrementing IRQs in /proc/interrupts ............ 100 10.9.1.2 Prerequisites for preparing a signed image ... 126
10.3.3 Verifying the 'self test' fields say 'passed' 10.9.1.3 Yocto setup for secure boot build .................. 127
in /proc/crypto ................................................ 100 10.9.1.4 Generating a signed bootloader/kernel/WIC
10.4 OpenSSL offload ........................................... 101 image in Yocto project ................................... 127
10.4.1 OpenSSL software architecture ..................... 101 10.9.1.5 Booting a signed image .................................127
10.4.2 OpenSSL's ENGINE interface ....................... 102 11 Connectivity ................................................. 128
10.4.3 NXP solution for OpenSSL hardware 11.1 Connectivity for Bluetooth wireless
offloading ....................................................... 102 technology and Wi-Fi .....................................128
10.4.4 Deploying OpenSSL into rootfs ..................... 103 11.2 Connectivity for USB type-C ..........................130
10.4.5 Running OpenSSL benchmarking tests with 11.3 NXP Bluetooth/Wi-Fi information ................... 131
cryptodev engine ........................................... 103 11.4 Hardware limitations ...................................... 132
10.4.5.1 Running OpenSSL benchmarking tests for 11.5 Certification .................................................... 133
symmetric ciphering and digest ..................... 103 11.5.1 WFA certification ............................................133
10.4.6 Running OpenSSL benchmarking tests with 11.5.2 Bluetooth controller certification .....................133
AF_ALG engine ............................................. 104 12 DDR Performance Monitor ..........................133
10.4.6.1 Running OpenSSL benchmarking tests for 12.1 Introduction .................................................... 133
symmetric ciphering and digest ..................... 104 12.2 Frequently used events ................................. 133
10.4.7 Running OpenSSL asymmetric tests with 12.3 Showing supported events ............................ 134
PKCS#11 based engine ................................ 104 12.4 Examples for monitoring transactions ............134
10.4.7.1 Running p11tool to generate key (RSA or 12.5 Performance metric ....................................... 135
EC) .................................................................105 12.5.1 Showing supported metric ............................. 135
10.4.7.2 Using OpenSSL from command line ............. 106 12.5.2 Monitoring transactions ..................................135
10.4.7.3 Running OpenSSL test for RSA .................... 106 12.6 DDR Performance usage summary ............... 136
10.4.7.4 Running OpenSSL test for EC .......................106
UG10163 All information provided in this document is subject to legal disclaimers. © 2024 NXP B.V. All rights reserved.
Please be aware that important notices concerning this document and the product(s)
described herein, have been included in section 'Legal information'.