Installing U-Boot and Linux Images to the QSPI Flash / HyperFlash on IMXRT1170-EVK(B) or MaaXBoard-RT Boards
- 1 1. Issues with Booting U-Boot from SD card on the NXP i.MX RT1170 EVK and EVKB Boards
- 2 2. Hardware Setup
- 3 3. Software Setup
- 4 4. Building and Installing the U-Boot images to the QSPI Flash / HyperFlash
- 5 5. Building and Installing Linux image to QSPI Flash / HyperFlash
- 6 6. Running Linux from the QSPI Flash / HyperFlash
1. Issues with Booting U-Boot from SD card on the NXP i.MX RT1170 EVK and EVKB Boards
The usual method of booting the uCLinux system, supported in the EmCraft BSPs for MIMXRT1XXX-EVK boards, is booting from a SD card.
But for the MIMXRT1170-EVK boards it turned out that the ability to boot from the SD card is very sensitive to the choice of the card manufacturer. The board boots well from the Samsung EVO Plus cards, but failed to boot from Kingston, SanDisc and possible some other card manufacturers. This behavior is apparently due to the Boot ROM code failed to detect the card inserted.
By design the card DETECT pin is connected to the GPIO_AD_32 PAD on the IMXRT1170-EVK board but this line is broken because resistor R136 is not installed (refer to the board schematics SCH-32171). Installing R136 helps in some cases to boot from the problem cards, but this opens up another problem, that the ENET_MDIO signal is connected to the same GPIO_AD_32 PAD, which means the ENET function will be broken if R136 is populated and there is a card attached into the SD card slot, and in general this does not guarantee successful booting, and even can potentially damage the SoC if software will work with both peripherals simultaneously.
On the MIMXRT1170-EVKB the resistor R136 is populated by default, but we continue to see booting issues from SD card.
For cases where you cannot find a bootable SD card for the MIMXRT1170-EVK board or are using the MIMXRT1170-EVKB board, we suggest installing U-Boot and Linux images to the QSPI Flash. This Application Note provides instructions on how to build the U-Boot images and a uCLinux image and install them completely to the QSPI Flash, without using SD card.
Please note, that basic BSP do not provide an interface to the QSPI Flash, i.e. it provides ability to boot from the QSPI Flash, but not provide ability to store data in the QSPI flash. Full support for QSPI Flash, including saving U-Boot ENV to QSPI Flash, U-Boot self-update command and update command for Linux and file systems, support for the Flash-specific file systems on QSPI Flash in Linux, is provided in separate add-on, refer to Support Booting from QSPI Flash in Linux BSP for the i.MX RT1170 Targets.
2. Hardware Setup
2.1. Hardware Setup for NXP i.MX RT1170 EVK:
Set the jumper
J38to position 1-2 and connect DC 5 V external power supply toJ43power jack.Connect the microUSB cable to the
J11connector on the MIMXRT1170-EVK board and to the development host to provide the serial console access. The serial console operates in U-Boot and uCLinux with the following parameters:Baud rate - 115200
Data bits - 8
Stop bits - 1
Parity - none
Connect microUSB cable to the SDP port (
J20) on the IMXRT1170-EVK board and to the development host.Make sure the SD card slot is empty to prevent potential SoC damage if
R136resistor is populated. This primarily applies to MIMXRT1170-EVKB on which this resistor is populated by default.
2.2. Hardware Setup for MaaXBoard-RT:
Connect the USB-C cable to the
J10connector on the MaaXBoard-RT board and to the development host to provide the serial console access and power. The serial console operates in U-Boot and uCLinux with the following parameters:Baud rate - 115200
Data bits - 8
Stop bits - 1
Parity - none
3. Software Setup
On the development host download and install the
MCUXpresso Secure Provisioning Toolprovided byNXP. Refer to https://www.nxp.com/design/design-center/software/development-software/mcuxpresso-software-and-tools-/mcuxpresso-secure-provisioning-tool:MCUXPRESSO-SECURE-PROVISIONINGMake sure the
blhostbinary is available on the development host:$ ls /opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost /opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost
4. Building and Installing the U-Boot images to the QSPI Flash / HyperFlash
On the Linux development host, activate the cross-build environment as described in https://emcraft.com/imxrt1170-evk-board/installing-activating-cde :
$ . ACTIVATE.shChange to the U-Boot top directory:
$ cd u-bootFor NXP i.MX RT1170 EVK: Configure U-Boot for the NXP i.MX RT1170 EVK board, use the
democonfiguration for QSPI Flash boot:$ make mrproper $ make imxrt1170-evk-demo_defconfigFor MaaXBoard-RT: Configure U-Boot for the MaaXBoard-RT board:
$ make mrproper $ make maaxboard-rt_defconfigRun
maketo create the U-Boot binaries (SPL.flexspiandu-boot.img):$ make $ ls SPL.flexspi u-boot.img SPL.flexspi u-boot.imgFor NXP i.MX RT1170 EVK: Set up the Boot switch on for SDP: set
SW1as0001and re-enable the power supply.For MaaXBoard-RT: Set up the Boot Mode Configuration Jumper (J19) in the 2-3 position (Serial Downloader).
Run the following command to install U-Boot to the QSPI Flash / HyperFlash (correct path to the
blhostif version ofSecure Provisioning Tooldoes not match):$ imxrt_install.sh -S -U -b /opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost starting flashloader ... Loading image [####################################] 100% Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. erasing 0x30000000+0x10000 ... Response status = 0 (0x0) Success. Writing memory [####################################] 100% Response status = 0 (0x0) Success. Response word 1 = 55064 (0xd718) erasing 0x30010000+0x50000 ... Response status = 0 (0x0) Success. Writing memory [####################################] 100% Response status = 0 (0x0) Success. Response word 1 = 272276 (0x42794) $
5. Building and Installing Linux image to QSPI Flash / HyperFlash
This Application Note reuses the common rootfs project. Since the project was originally developed to be used on SD card, its build procedure includes steps to rebuild U-Boot in the SD card configuration. So the instructions below will result in the U-Boot images being rebuilt for SD card. Repeat the steps from Section "Building and Installing the U-Boot images to the QSPI Flash / HyperFlash" after building the rootfs project to re-create the the bootable U-Boot images for QSPI Flash / HyperFlash if plan to re-install U-Boot to the QSPI Flash / HyperFlash.
Go to to
projects/rootfsdirectory and run themakecommand:$ make $ ls rootfs.uImage rootfs.uImageFor NXP i.MX RT1170 EVK: Set up the Boot switch on the IMXRT1170-EVK board for SDP: set
SW1as0001and re-enable the power supply.For MaaXBoard-RT: Set up the Boot Mode Configuration Jumper (J19) in the 2-3 position (Serial Downloader).
Run the following command to install the uCLinux image to the QSPI Flash / HyperFlash (correct path to the
blhostif version ofSecure Provisioning Tooldoes not match):$ imxrt_install.sh -I -b /opt/nxp/MCUX_Provi_v10/bin/_internal/tools/spsdk/blhost starting flashloader ... Loading image [####################################] 100% Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. Response status = 0 (0x0) Success. erasing 0x30080000+0x7ef000 ... Response status = 0 (0x0) Success. Writing memory [####################################] 100% Response status = 0 (0x0) Success. Response word 1 = 8315758 (0x7ee36e) $
6. Running Linux from the QSPI Flash / HyperFlash
For NXP i.MX RT1170 EVK: Set boot switches to boot from QSPI Flash: set
SW1as0010,SW2as0000000000.For MaaXBoard-RT: Set up the Boot Mode Configuration Jumper (J19) in the 1-2 position (Internal Boot).
After reset, the board should boot up to the Linux console:
U-Boot SPL 2023.04 (Mar 24 2025 - 11:07:41 +0000) Trying to boot from NOR U-Boot 2023.04 (Mar 24 2025 - 11:07:41 +0000) Model: NXP imxrt1170-evk board DRAM: 64 MiB Core: 72 devices, 15 uclasses, devicetree: separate MMC: FSL_SDHC: 0 Loading Environment from nowhere... OK In: serial@4007c000 Out: serial@4007c000 Err: serial@4007c000 Net: eth0: ethernet@40424000 Hit any key to stop autoboot: 0 ## Booting kernel from Legacy Image at 30080000 ... Image Name: Linux-6.1.22 Image Type: ARM Linux Multi-File Image (uncompressed) Data Size: 8315694 Bytes = 7.9 MiB Load Address: 80008000 Entry Point: 80008001 Contents: Image 0: 8301696 Bytes = 7.9 MiB Image 1: 13986 Bytes = 13.7 KiB Verifying Checksum ... OK ## Flattened Device Tree from multi component Image at 30080000 Booting using the fdt at 0x3086accc Working FDT set to 3086accc Loading Multi-File Image Loading Device Tree to 83982000, end 839886a1 ... OK Working FDT set to 83982000 Starting kernel ... ... / # / # uname -a / # uname -a Linux (none) 6.1.22 #2 PREEMPT Mon Mar 24 11:20:09 UTC 2025 armv7ml GNU/Linux / #