The U-Boot banner keeps repeating: finding a boot loop
U-Boot prints its version banner once each time it starts, and so does SPL before it. A second banner without a power cycle means the board went back through reset, and what was printed just before it tells you who did it.
The line
U-Boot SPL 2024.01 (Jan 08 2024 - 12:00:00 +0000)
Trying to boot from MMC1
U-Boot 2024.01 (Jan 08 2024 - 12:00:00 +0000)A normal start prints the SPL banner and then the U-Boot banner once each. The version and build date are illustrative.
What it means
The banner carries the release (2024.01), and the build date and time in the parentheses. That makes it the quickest check that the bootloader on the board is the one you built: a date from last month after you flashed a new image means the board is still booting the old one, or booting from a different device than you wrote to.
As evidence of a reset, the banner is neutral. Everything between two banners is one boot attempt, and the last lines of that attempt are where to look: a U-Boot error, Starting kernel ... followed by silence, a kernel panic, or a clean reboot: Restarting system.
Common causes
bootcmd fails and the board is reset
After the bootdelay countdown U-Boot runs the commands stored in bootcmd. When loading the kernel or device tree fails (a missing file, a wrong partition, a bad address) and the script or the board configuration ends in reset, the board restarts and tries the same thing again. The error is printed, briefly, right before the next banner.
Sources: U-Boot docs: Environment Variables (bootcmd, bootdelay, bootargs) · U-Boot docs: reset command
A watchdog that nobody services
A watchdog started by U-Boot, by the ROM or by a power management chip keeps counting while the kernel starts. If the kernel has no driver for it, or hangs before the driver loads, the board is reset in the middle of the kernel’s start-up. At the U-Boot prompt, wdt list shows the watchdog devices U-Boot knows about and wdt stop halts one for a test.
Source: U-Boot docs: wdt command
The boot count limit switched to the alternate boot
With CONFIG_BOOTCOUNT_LIMIT, U-Boot increments bootcount on every reset and, once it exceeds bootlimit, runs altbootcmd instead of bootcmd. Userspace is expected to reset the counter after a good boot. If nothing does, a healthy system starts taking the alternate path after a few restarts, which looks like a boot loop that changed its behaviour by itself.
Source: U-Boot docs: Boot Count Limit
SPL cannot load U-Boot proper
When only the U-Boot SPL banner repeats and the full U-Boot banner never appears, SPL is failing to load the next stage from every device it tries. It prints SPL: failed to boot from all boot devices and stops, and a watchdog or a manual reset then starts it again. The usual reasons are an image written to the wrong offset or a boot device SPL was not built to use.
Sources: U-Boot docs: Generic xPL framework (SPL) · U-Boot: common/spl/spl.c (v2025.01), the code that prints the message
What to check first
- Find the last line before the repeated banner. It decides the branch: a U-Boot error message,
Starting kernel ...and then nothing, kernel output that ends in a panic, or a kernel that saidreboot: Restarting system. - Note which banners repeat. SPL only means the loop is before U-Boot proper; both means the loop goes through U-Boot and usually into the kernel.
- Press a key during
Hit any key to stop autobootand leave the board at the prompt. If it still resets after a fixed time, a watchdog is running and it is not the boot script. - At the prompt, print what U-Boot is going to do:
printenv bootcmd bootargs bootdelay bootcount bootlimit. Then run the steps ofbootcmdby hand, one at a time, and read the first error. - If the kernel starts but prints nothing, check the
console=argument inbootargsand the device tree before assuming a crash: a kernel that is running silently looks the same as one that died, until the watchdog fires. - Compare the banner’s build date with your build. If it is older, fix where and how you flash before debugging anything else.
In NeuroTerm
On a serial tab with pattern markers on, NeuroTerm recognises this line as “Board reset: U-Boot”. A coding agent connected through Terminal Use gets that name in its list of tabs and among the markers of the output it reads, with a cursor for reading the lines around it. Setup is in Terminal Use (MCP).