This article explains how to load images to the target over UART in U-Boot. Keep in mind that loading via a serial port will take quite a long time (minutes per file!) due to the low speeds (limited to 115.2 Kps). That said, for embedded designs that do not provide an Ethernet port it may be the only reasonable development and software manufacturing option using U-Boot and uClinux.
Using the NXP i.MX RT1170 RT EVK board, you connect to the target serial console available on the J23 corresponding connector on the baseboard. Assuming you connect to a Linux PC host, on the Linux host the i.MX RT1170 RT serial console will be visible as a /dev/ttyACMx
device. The U-Boot and Linux software configures the console for 115.2 Kps operation.
...
If you do not specify a baud rate, then the speed the console is currently running at will be used (set to a default value of 115200 on the NXP i.MX RT1170 RT EVK).
Once the transmission using loadb
finishes, the file will be in memory at the specified load address. The loadaddr environment variable will automatically be set to the address the loadb
command used. The filesize
environment variable will automatically be set to the number of bytes transferred during the load operation.
...
Code Block |
---|
run addip; bootm ## Booting kernel from Legacy Image at 80007fc0 ... Image Name: Linux-6.1.22 Image Type: ARM Linux Multi-File Image (uncompressed) Data Size: 8489810 Bytes = 8.1 MiB Load Address: 80008000 Entry Point: 80008001 Contents: Image 0: 8480224 Bytes = 8.1 MiB Image 1: 9574 Bytes = 9.3 KiB Verifying Checksum ... OK ## Flattened Device Tree from multi component Image at 80007FC0 Booting using the fdt at 0x8081e5ec Working FDT set to 8081e5ec Loading Multi-File Image Loading Device Tree to 2032a000, end 2032f565 ... OK Working FDT set to 2032a000 Starting kernel ... Booting Linux on physical CPU 0x0 Linux version 6.1.22 (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 Fri Sep 1 14:20:49 UTC 2023 CPU: ARMv7-M [411fc272] revision 2 (ARMv7M), cr=00000000 CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache OF: fdt: Machine model: NXP IMXRT1170 EVK board ... Run /init as init process [72] Jan 01 00:00:01 Running in background / # mmc0: host does not support reading read-only switch, assuming write-enable mmc0: new high speed SDHC card at address 59b4 mmcblk0: mmc0:59b4 USD 7.39 GiB mmcblk0: p1 Micrel KSZ8081 or KSZ8091 40424000.ethernet-1:02: attached PHY driver (mii_bus:phy_addr=40424000.ethernet-1:02, irq=POLL) fec 40424000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off / # ls bin hello.ko lib proc sys var dev httpd linuxrc root tmp etc init mnt sbin usr / # |