Configuring u-boot bootdelay for no serial interrupt (r28.1)

I’m trying to get u-boot to stop interrupting when there’s serial data so I can use the J21 serial port for communication with another device.

According to the “U-Boot Customization” section in the 28.1 Release of the Development Guide all you have to do is set bootdelay to a negative value.

Contains the number of seconds that U-Boot pauses to determine whether the user wishes to interrupt the boot sequence.
To avoid delay, set to 0.
Note: Although this value avoids delay, if the user has requested to interrupt the boot process before the U-Boot shell is reached, that request is honored.
To avoid a delay and user interruption of the boot process, set bootdelay to a negative value.

I’ve tried to do it through the console using setenv and saveenv, but serial input still interrupts the boot. Even though printenv shows that the value is still set to -1 after power cycling.

I’ve even tried modifying common/autoboot.c to force stored_bootdelay to -1, but still no effect.

How can I make u-boot not interrupt on serial data?


hello Atrer,

looks like setting the negative value in the bootdelay field cannot disable user interruption.
we’re looking into it, will update the result later.


I wondered if it might have something to do with the function do_bootmenu in u-boot/cmd/bootmenu.c here:

int do_bootmenu(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[])
        char *delay_str = NULL;
        int delay = 10;

        delay = CONFIG_BOOTDELAY;

        if (argc >= 2)
                delay_str = argv[1];

        if (!delay_str)
                delay_str = getenv("bootmenu_delay");

        if (delay_str)
                delay = (int)simple_strtol(delay_str, NULL, 10);

        return 0;

It looks like a negative value for CONFIG_BOOTDELAY is ignored and the default (10) used instead. But it seems like that would get overwritten by getenv(“bootmenu_delay”) anyway.

I also tried just setting it to 0 because bootmenu_show seems to indicate that if the delay is zero it will just run the first entry. No luck, still interrupts.

hello Atrer,

please check the readme file from the u-boot source, u-boot/doc/README.bootmenu
the comment in our documentation is wrong, u-boot is designed as “If delay is less then 0, bootmenu will be shown and autoboot will be disabled.”

please also check the read file u-boot/doc/README.autoboot in the U-Boot source, there is a way to set a bootdelaykey or bootstopkey so that only a special key/string will stop autoboot.

Hello JerryChang,

Setting it to negative or setting bootdelaykey or bootstopkeys does not seem to work.
Did you guys figure out a solution to this?

thanks a lot,

You might find this of interest:

That URL is for using an alternate UART as serial console under R28.1. I don’t know if there are any changes for use in later releases, but probably it is the same.

We no longer have something on that UART, but one of the things I did was just to activate the retry.

diff --git a/include/configs/p2371-2180.h b/include/configs/p2371-2180.h
index c45d5fb..821f95b 100644
--- a/include/configs/p2371-2180.h
+++ b/include/configs/p2371-2180.h
@@ -12,6 +12,10 @@
 #include "tegra210-common.h"
+/* Boot retry options */
 /* High-level configuration options */
 #define CONFIG_TEGRA_BOARD_STRING      "NVIDIA P2371-2180"

thank you linuxdev and Atrer. Will take a look. I was hoping to do it all in uboot console. May have to go one of those routes. Much appreciated.