NXP i.MXRT10XX: Running Linux on i.MX RT10xx in 5 Minutes

NXP i.MXRT10XX: Running Linux on i.MX RT10xx in 5 Minutes

1. Hardware Setup

Prepare hardware as described below:

  1. Connect the microUSB cable to the J23 connector on the MIMXRT1024-EVK board or to the J28 connector on the MIMXRT1050-EVKB board or to the J1 connector on the MIMXRT1060-EVKB board and the development host to provide the power and serial console access, which is required to run Linux (uClinux) on the i.MX RT10xx. The serial console operates in U-Boot and uCLinux with the following parameters:

    • Baud rate - 115200

    • Data bits - 8

    • Stop bits - 1

    • Parity - none

  2. Connect Ethernet cable to the J14 connector on the MIMXRT1024-EVK board or to the J19 connector on the MIMXRT1050-EVKB board or to the J43 connector on the MIMXRT1060-EVKB board.

  3. The microUSB SD Card used to boot the system on the IMXRT10XX board.
    Since U-Boot (SPL+TPL) + U-Boot environment are located at the 0x400..0x100000 range of the raw SD Card address-space, the SD Card must be partitioned properly, so that U-Boot does not overwrite the file system on the partition. The SD Card must contain at least one partition started at a at least 1MB raw offset. The partition must be FATFS-formatted. Usually, a new SD Card satisfies these requirements by default so most likely no special preparations are required unless the card has been reformatted in some other way in other projects.

2. Installing Linux to NXP i.MX RT1024 EVK or RT1050/1060 EVKB Board

  1. Download the bootable U-Boot and Linux images from the Emcraft web site:

  2. Plug in the MicroSD card to the cross-development host.

  3. Find out a /dev/sdX device the system has assigned to your SD Card:

    $ dmesg | tail [ 456.470775] usbcore: registered new interface driver usb-storage [ 456.482079] usbcore: registered new interface driver uas [ 457.501716] scsi 3:0:0:0: Direct-Access Generic STORAGE DEVICE 0821 PQ: 0 ANSI: 6 [ 457.508132] sd 3:0:0:0: Attached scsi generic sg2 type 0 [ 457.715113] sd 3:0:0:0: [sdb] 15446016 512-byte logical blocks: (7.91 GB/7.37 GiB) [ 457.733992] sd 3:0:0:0: [sdb] Write Protect is off [ 457.733999] sd 3:0:0:0: [sdb] Mode Sense: 23 00 00 00 [ 457.753808] sd 3:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA [ 457.840489] sdb: sdb1 [ 457.840845] sd 3:0:0:0: [sdb] Attached SCSI removable disk
  4. Install U-Boot to the microSD card:

    $ sudo dd if=SPL of=/dev/sdX bs=1k seek=1 conv=notrunc; sync $ sudo dd if=u-boot.img of=/dev/sdX bs=1k seek=128 conv=notrunc; sync
  5. Install the rootfs project to the microSD card:

    $ sudo mount /dev/sdX1 /mnt $ cp rootfs.uImage /mnt $ sudo umount /mnt $ sync
  6. Unplug the microSD card from the development host. Set Boot SWBas 0110 on the i.MX RT1024 EVK board or Boot SW.7 as 1010 on the i.MX RT1050/1060 EVKB board, insert the micro SD card into the microSD slot on the target board and power the board. The system should boot up on the board:

    U-Boot SPL 2025.04 (Dec 05 2025 - 05:11:04 +0000) Trying to boot from MMC1 U-Boot 2025.04 (Dec 05 2025 - 05:11:04 +0000) DRAM: 32 MiB Core: 79 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 0 Loading Environment from MMC... Reading from MMC(0)... OK In: serial@40184000 Out: serial Err: serial Net: eth0: ethernet@402d8000 Hit any key to stop autoboot: 0 8823579 bytes read in 4860 ms (1.7 MiB/s) ## Booting kernel from Legacy Image at 80007fc0 ... Image Name: Linux-6.12.20 Image Type: ARM Linux Multi-File Image (uncompressed) Data Size: 8823515 Bytes = 8.4 MiB Load Address: 80008000 Entry Point: 80008001 Contents: Image 0: 8811684 Bytes = 8.4 MiB Image 1: 11819 Bytes = 11.5 KiB Verifying Checksum ... OK ## Flattened Device Tree from multi component Image at 80007FC0 Booting using the fdt at 0x8086f4b0 Working FDT set to 8086f4b0 Loading Multi-File Image to 80008000 Loading Device Tree to 81c71000, end 81c76e2a ... OK Working FDT set to 81c71000 Starting kernel ... Booting Linux on physical CPU 0x0 Linux version 6.12.20 (sasha@workbench.emcraft.com) (arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release), GNU ld (GNU Arm Embedded Toolchain 10.3-2021.10) 2.36.1.20210621) #2 PREEMPT Fri Dec 5 05:05:12 UTC 2025 CPU: ARMv7-M [411fc271] revision 1 (ARMv7M), cr=00000000 CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache OF: fdt: Machine model: NXP IMXRT1050-evk board Zone ranges: Normal [mem 0x0000000080000000-0x0000000081ffffff] Movable zone start for each node Early memory node ranges node 0: [mem 0x0000000080000000-0x0000000081dfffff] node 0: [mem 0x0000000081e00000-0x0000000081ffffff] Initmem setup node 0 [mem 0x0000000080000000-0x0000000081ffffff] Reserved memory: created DMA memory pool at 0x81e00000, size 1 MiB OF: reserved mem: initialized node dmapool@81e00000, compatible id shared-dma-pool OF: reserved mem: 0x81e00000..0x81efffff (1024 KiB) nomap non-reusable dmapool@81e00000 OF: reserved mem: 0x81f00000..0x81ffffff (1024 KiB) nomap non-reusable memory@81f00000 Kernel command line: ip=192.168.1.82:192.168.1.86:192.168.1.254:255.255.255.0::eth0:off ... Freeing unused kernel image (initmem) memory: 3260K This architecture does not have kernel memory protection. Run /init as init process [53] Jan 01 16:38:40 Running in background / # Micrel KSZ8081 or KSZ8091 402d8000.ethernet-1:02: attached PHY driver (mii_bus:phy_addr=402d8000.ethernet-1:02, irq=POLL) fec 402d8000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off random: crng init done / #

3. 3. Ethernet Driver Support

  1. Power cycle the board. While U-Boot is coming up, press any key on the serial console to enter the U-Boot command line interface:

    U-Boot SPL 2025.04 (Dec 05 2025 - 05:11:04 +0000) Trying to boot from MMC1 U-Boot 2025.04 (Dec 05 2025 - 05:11:04 +0000) DRAM: 32 MiB Core: 79 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 0 Loading Environment from MMC... Reading from MMC(0)... OK In: serial@40184000 Out: serial@40184000 Err: serial@40184000 Net: eth0: ethernet@402d8000 Hit any key to stop autoboot: 0 =>
  2. From the U-Boot command line interface, reset to the default environment:

    => env default -a ## Resetting to default environment =>
  3. Set the ipaddr, serverip, gatewayip and netmask U-Boot environment variables:

    => setenv ipaddr 192.168.1.82 => setenv serverip 192.168.1.86 => setenv gatewayip 192.168.1.254 => setenv netmask 255.255.255.0 => saveenv Saving Environment to MMC... Writing to MMC(0)... OK =>
  4. ping the development host from the target board:

    => ping 192.168.1.86 Using ethernet@402d8000 device host 192.168.1.86 is alive =>
  5. Load rootfs.uImage using the U-Boot tftp command:

    => tftp imxrt1050/rootfs.uImage Using ethernet@402d8000 device TFTP from server 192.168.1.86; our IP address is 192.168.1.82 Filename 'imxrt1050/rootfs.uImage'. Load address: 0x80007fc0 Loading: ################################################################# ################################################################# ################################################################# ... ################################################################# ################################## 2.7 MiB/s done Bytes transferred = 8823579 (86a31b hex) =>
  6. Reset the board and let it boot up to the Linux shell:

    => reset resetting ... U-Boot SPL 2025.04 (Dec 05 2025 - 05:11:04 +0000) Trying to boot from MMC1 U-Boot 2025.04 (Dec 05 2025 - 05:11:04 +0000) DRAM: 32 MiB Core: 79 devices, 18 uclasses, devicetree: separate MMC: FSL_SDHC: 0 Loading Environment from MMC... Reading from MMC(0)... OK In: serial@40184000 Out: serial@40184000 Err: serial@40184000 Net: eth0: ethernet@402d8000 Hit any key to stop autoboot: 0 8823579 bytes read in 4860 ms (1.7 MiB/s) ## Booting kernel from Legacy Image at 80007fc0 ... Image Name: Linux-6.12.20 Image Type: ARM Linux Multi-File Image (uncompressed) Data Size: 8823515 Bytes = 8.4 MiB Load Address: 80008000 Entry Point: 80008001 Contents: Image 0: 8811684 Bytes = 8.4 MiB Image 1: 11819 Bytes = 11.5 KiB Verifying Checksum ... OK ## Flattened Device Tree from multi component Image at 80007FC0 Booting using the fdt at 0x8086f4b0 Working FDT set to 8086f4b0 Loading Multi-File Image to 80008000 Loading Device Tree to 81c71000, end 81c76e2a ... OK Working FDT set to 81c71000 ... / # Micrel KSZ8081 or KSZ8091 402d8000.ethernet-1:02: attached PHY driver (mii_bus:phy_addr=402d8000.ethernet-1:02, irq=POLL) fec 402d8000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off random: crng init done
  7. From the development host validate that the target board is visible using ping:

    $ ping -c 5 192.168.1.82 PING 192.168.1.82 (192.168.1.82) 56(84) bytes of data. 64 bytes from 192.168.1.82: icmp_seq=1 ttl=64 time=0.744 ms 64 bytes from 192.168.1.82: icmp_seq=2 ttl=64 time=0.390 ms 64 bytes from 192.168.1.82: icmp_seq=3 ttl=64 time=0.415 ms 64 bytes from 192.168.1.82: icmp_seq=4 ttl=64 time=0.410 ms 64 bytes from 192.168.1.82: icmp_seq=5 ttl=64 time=0.421 ms --- 192.168.1.82 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4135ms rtt min/avg/max/mdev = 0.390/0.476/0.744/0.134 ms
  8. From the target board, validate that the development host is visible using ping:

    / # ping -c 5 192.168.1.86 PING 192.168.1.86 (192.168.1.86): 56 data bytes 64 bytes from 192.168.1.86: seq=0 ttl=64 time=0.867 ms 64 bytes from 192.168.1.86: seq=1 ttl=64 time=0.921 ms 64 bytes from 192.168.1.86: seq=2 ttl=64 time=0.908 ms 64 bytes from 192.168.1.86: seq=3 ttl=64 time=1.020 ms 64 bytes from 192.168.1.86: seq=4 ttl=64 time=0.998 ms --- 192.168.1.86 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0.867/0.942/1.020 ms

4. TCP/IP Stack Support

With uClinux running on the i.MX RT10xx, you get the full Linux TCP/IP stack (kernel version 5.15.71). Userspace POSIX APIs are provided by the uClibc library. Key user-space networking tools and utilities are available from the multi-call busybox. Additional tools and packages, such as for instance the SSH dropbear server, can be built specifically for uClinux. All in all, you have the powerful Linux TCP/IP stack at your disposal.

  1. From the development host validate that the target board is visible using ping:

    $ ping -c 5 192.168.1.82 PING 192.168.1.82 (192.168.1.82) 56(84) bytes of data. 64 bytes from 192.168.1.82: icmp_seq=1 ttl=64 time=0.744 ms 64 bytes from 192.168.1.82: icmp_seq=2 ttl=64 time=0.390 ms 64 bytes from 192.168.1.82: icmp_seq=3 ttl=64 time=0.415 ms 64 bytes from 192.168.1.82: icmp_seq=4 ttl=64 time=0.410 ms 64 bytes from 192.168.1.82: icmp_seq=5 ttl=64 time=0.421 ms --- 192.168.1.82 ping statistics --- 5 packets transmitted, 5 received, 0% packet loss, time 4135ms rtt min/avg/max/mdev = 0.390/0.476/0.744/0.134 ms
  2. ping the development host from the target board:

    / # ping -c 5 192.168.1.86 PING 192.168.1.86 (192.168.1.86): 56 data bytes 64 bytes from 192.168.1.86: seq=0 ttl=64 time=0.867 ms 64 bytes from 192.168.1.86: seq=1 ttl=64 time=0.921 ms 64 bytes from 192.168.1.86: seq=2 ttl=64 time=0.908 ms 64 bytes from 192.168.1.86: seq=3 ttl=64 time=1.020 ms 64 bytes from 192.168.1.86: seq=4 ttl=64 time=0.998 ms --- 192.168.1.86 ping statistics --- 5 packets transmitted, 5 packets received, 0% packet loss round-trip min/avg/max = 0.867/0.942/1.020 ms
  3. On the target, start the telnetd daemon to allow connections to the target board:

    / # telnetd / # ps | grep telnetd 79 root 864 S telnetd 81 root 864 S grep telnetd / #
  4. Connect to the target from the development host using telnet. The target is configured to accept the 123 password for root:

    $ telnet 192.168.1.82 Trying 192.168.1.82... Connected to 192.168.1.82. Escape character is '^]'. (none) login: root Password: / # ls bin etc httpd lib mnt root sbin tmp var dev hello.ko init linuxrc proc run sys usr / # exit Connection closed by foreign host.
  5. The dropbear SSH daemon starts automatically on the target. Verify that dropbear allows secure connections to the target:

    / # ps | grep dropbear 50 root 728 S dropbear -R 85 root 864 S grep dropbear
  6. Connect to the target from the development host using ssh. The first connection takes several seconds to establish as the target runs computation-extensive key calculations. Again, enter 123 on the password prompt:

    $ ssh root@192.168.1.82 The authenticity of host '192.168.1.82 (192.168.1.82)' can't be established. ED25519 key fingerprint is SHA256:8TzmNcQzVySq8ISFcDF9+UBjvtL/yKNZ75qH9dVfZpM. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '192.168.1.82' (ED25519) to the list of known hosts. root@192.168.1.82's password: / # ls bin etc httpd lib mnt root sbin tmp var dev hello.ko init linuxrc proc run sys usr / # exit Connection to 192.168.1.82 closed.
  7. On the target, enable access to the Internet by configuring a default gateway. Note also that the system makes use of the public name server provided by Google:

    / # cat /etc/resolv.conf # This configuration makes use of the Google public DNS server. # If you would like to use something else, replace with the IP # of your DNS server nameserver 8.8.8.8
  8. Use ntpd to synchronize the time on the target with the time provided by a public server:

    / # date Thu Jan 1 00:00:24 UTC 1970 / # ntpd -p 0.fedora.pool.ntp.org / # sleep 10; date Mon Dec 15 12:56:18 UTC 2025 / #
  9. Use wget to download a file from a remote server:

    / # wget ftp://ftp.gnu.org/README Connecting to ftp.gnu.org (209.51.188.20:21) saving to 'README' README 100% |********************************| 2748 0:00:00 ETA 'README' saved / # cat README This is ftp.gnu.org, the FTP server of the the GNU project. ...
  10. Mount a directory exported by a development host over NFS:

    / # mount -o nolock,rsize=1024 192.168.1.86:/srv/homes /mnt/nfs / # ls /mnt/nfs/ 512kB.host busybox eclipse-workspace SimpleClass c-example linux-dp app check_float_soft test app.c check_float_softfp / # cp /bin/busybox /mnt/nfs / # cp /mnt/nfs/busybox /tmp / # md5sum /bin/busybox /tmp/busybox aa40e58bd2e79cfd23692c58088e3386 /bin/busybox aa40e58bd2e79cfd23692c58088e3386 /tmp/busybox
  11. Start the HTTP daemon:

    / # httpd -h /httpd/html / #
  12. From a local host, open a Web browser to the target and watch the demo web page provided by the target. The target shows the current time and date as well as the list of the currently running processes:

    image-20250119-083345.png

5. Support USB Host Stack Interface

  1. Attach a USB Flash device to the J9 connector for the imxrt1024-evk or imxrt1050-evkb board or to the J48 connector for the imxrt1060-evkb board. Verify that it is automatically detected and can be mounted:

    ci_hdrc ci_hdrc.0: EHCI Host Controller ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 2 ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00 hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb 2-1: new high-speed USB device number 2 using ci_hdrc usb-storage 2-1:1.0: USB Mass Storage device detected scsi host0: usb-storage 2-1:1.0 scsi 0:0:0:0: Direct-Access Generic Flash Disk 8.07 PQ: 0 ANSI: 2 sd 0:0:0:0: [sda] 8228864 512-byte logical blocks: (4.21 GB/3.92 GiB) sd 0:0:0:0: [sda] Write Protect is off sd 0:0:0:0: [sda] No Caching mode page found sd 0:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd 0:0:0:0: [sda] Attached SCSI removable disk / # mount /dev/sda1 /mnt/usbflash / # ls -1 /mnt/usbflash/ System Volume Information data.log / #
  2. Unmount the USB Flash device:

    / # umount /mnt/usbflash / #

6. Support Loading / Unloading Kernel Modules

  1. From the Linux shell, load the demo kernel module:

    / # insmod hello.ko Hello, world / #
  2. Show the status of the loaded kernel modules:

    / # lsmod Module Size Used by Not tainted hello 12288 0 / #
  3. Unload the module from the Linux kernel:

    / # rmmod hello Goodbye, world / #

7. Running Emcraft Ebike Demo

The Emcraft ebike demo is not supported for the imxrt1024 BSP.

Step through the following procedure to run the Emcraft Ebike demo:

  1. LCD backlight power on:

    / # echo 0 > /sys/class/backlight/backlight/bl_power
  2. From the Linux shell, type the ebike_gui_demo command to run the ebike demo:

    / # ebike_gui_demo
  3. Click to the padlock icon in the bottom right corner of the screen to switch to the Unlock Your Bike group.

    image-20250119-083447.png
  4. Click 4 any digits and then v. Make sure the correct PIN-code in printed out to the Linux shell terminal:

    / # ebike_gui_demo entered pin: 4 7 1 2
  5. Click to the bike icon to switch back to the Driving Information group.

  6. Press and hold the SW8 button, which resides on the opposite side of the target board to LCD. Make sure that the Speed, Trip, Odometer and other values are increasing on the corresponding widgets on the LCD. If release the SW8 button the Speed reading is decreasing.

    image-20250119-083508.png