Installing U-Boot and Linux Images to the QSPI Flash on IMXRT1170-EVK(B) Boards

Installing U-Boot and Linux Images to the QSPI Flash on IMXRT1170-EVK(B) Boards

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 6.1 BSP for the i.MX RT1170 Targets.

2. Hardware Setup

  1. Set the jumper J38 to position 1-2 and connect DC 5 V external power supply to J43 power jack.

  2. Connect the microUSB cable to the J11 connector 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

  3. Connect microUSB cable to the SDP port (J20) on the IMXRT1170-EVK board and to the development host.

  4. Make sure the SD card slot is empty to prevent potential SoC damage if R136 resistor is populated. This primarily applies to MIMXRT1170-EVKB on which this resistor is populated by default.

3. Software Setup

  1. On the development host download and install the MCUXpresso Secure Provisioning Tool provided by NXP. Refer to MCUXpresso Secure Provisioning Tool

  2. Make sure the blhost binary 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

  1. On the Linux development host, activate the cross-build environment as described in https://emcraft.com/imxrt1170-evk-board/installing-activating-cde :

    $ . ACTIVATE.sh
  2. Change to the U-Boot top directory:

    $ cd u-boot
  3. Configure U-Boot for the NXP i.MX RT1170 EVK board, use the dome configuration for QSPI Flash boot:

    $ make mrproper $ make imxrt1170-evk-demo_defconfig
  4. Run make to create the U-Boot binaries (SPL.flexspi and u-boot.img):

    $ make $ ls SPL.flexspi u-boot.img SPL.flexspi u-boot.img
  5. Set up the Boot switch on for SDP: set SW1 as 0001 and re-enable the power supply.

  6. Run the following command to install U-Boot to the QSPI Flash (correct path to the blhost if version of Secure Provisioning Tool does not match):

    $ imxrt1170_install_uboot.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

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" after building the rootfs project to re-create the the bootable U-Boot images for QSPI Flash if plan to re-install U-Boot to the QSPI Flash.

  1. Go to to projects/rootfs directory and run the make command:

    $ make $ ls rootfs.uImage rootfs.uImage
  2. Set up the Boot switch on the IMXRT1170-EVK board for SDP: set SW1 as 0001 and re-enable the power supply.

  3. Run the following command to install the uCLinux image to the QSPI Flash (correct path to the blhost if version of Secure Provisioning Tool does not match):

    $ imxrt1170_install_uboot.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

  1. Set boot switches to boot from QSPI Flash: set SW1 as 0010, SW2 as 0000000000. 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 / #