Skip to content
systemcoding.dev
Embedded Linux

Boot with no delay and no key check using bootdelay=-2

Setting bootdelay to -2 makes U-Boot boot at once without even checking for a key, which removes the console, on U-Boot 2025.01.

1 min read
Summarize in AI

U-Boot's bootdelay counts seconds to wait for a keypress before running bootcmd. A positive number waits, 0 boots at once but still checks for a keypress, and -1 disables autoboot. The value -2 is the odd one: boot immediately and skip the abort check. This was written for U-Boot 2025.01.

Text
=> setenv bootdelay -2
=> saveenv
Saving Environment to MMC... Writing to MMC(0)... OK

The saved value takes effect on the next reset. From then on the board cannot be interrupted from the serial console, so a bad bootcmd leaves you no prompt, and you recover only with a different boot medium or a hardware strap. It is the setting for locked-down products, together with a disabled console. Test with 0 first, and set CONFIG_BOOTDELAY=-2 in the build once it works. -1 is the safe opposite, which stops at the prompt.

Also inKernels
Taggedu boot
Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.