I am using UART sensors that do not allow the RPI to finish the boot when the serial console and the bluetooth are on. I did disable them using the dtoverlay=pi3-disable-bt in /boot/config.txt and deleted the serial console parameters from the /boot/cmdline.txt, but the problem is that they are still on during the boot and they only get disabled after, which does not allow my pi to boot when I have my UART sensors plugged in. Does anyone know how this could be fixed?

EDIT: It might be that my pi does not boot because the sensors connected send garbage to the board, which cause my u-boot to stop at hit any key to stop u-boot, hence I am thinking that setting that key to something pre-defined instead of "any key" could solve my problem. However, I don't know how to do that, could anyone help?

Thank you

  • sensors connected send garbage .... the "garbage" could still contain the predefined key press
    – jsotola
    May 22, 2018 at 17:33

3 Answers 3


You can solve this by setting the bootdelay of u-boot to -2 using the u-boot console:

setenv bootdelay=-2

Another solution is adding these lines of code to include/configs/rpi.h:

#define CONFIG_AUTOBOOT_PROMPT "\nRPi booting... Stop with ENTER\n"

See also here.

  • This works for me. May 16, 2020 at 5:44

I managed to solve the problem. I modified the u-boot variable setenv stdin nulldev, setting a pre-defined u-boot stop key or setting bootdelay = 0 did not solve my problem.

Hope this helps.

  • Please mark the answer as the accepted one with a click on the tick on its left side. That prevents your Question from being shown as a unsolved Post to the community and saves them/us a lot of work.
    – Ingo
    Oct 29, 2020 at 10:39

Here is the video where it is explained step by step how to prevent U-boot console from interrupting autoboot and sending debug messages on UART. I know links only answers are frowned upon, so here' s a quick breakdown of a solution:

Install the dependencies

sudo apt install git make gcc gcc-aarch64-linux-gnu

Git clone the official u-boot repository. Alternatively you can git clone my fork of repository, where I already have the necessary changes for silent autoboot - but if you need the latest version, then you need to clone the official repository and make changes yourself.

git clone --depth 1 git://git.denx.de/u-boot.git

cd u-boot

Find the raspberry pi config files - they depend on the model, rpi_3_defconfig for Raspberry Pi 3, rpi_4_defconfig for Raspberry Pi 4 and so on. Add the following lines to the end of the file


The first line removes the boot delay, so autoboot will not be interrupted by messages sent on UART interface. Next four lines enable silent boot, so U-boot will not send any messages on UART itself, because the messages might in turn confuse your device. One more little thing left, set silent boot environmental variable.Change include/configs/rpi.h file

    "dhcpuboot=usb start; dhcp u-boot.uimg; bootm\0" \
    "silent=1\0" \

Now configure with

make rpi_3_defconfig

from repository main folder And build with

make CROSS_COMPILE=aarch64-linux-gnu-

When build process finishes you will have a u-boot.bin file, which you need to rename and copy to Raspberry Pi SD card. Now you Raspberry Pi will not be disturbed by any messages on UART during boot. The UART functionality after boot will not be affected.

Relevant docs: https://gitlab.denx.de/u-boot/u-boot/blob/HEAD/doc/README.autoboot https://gitlab.denx.de/u-boot/u-boot/blob/HEAD/doc/README.silent https://wiki.ubuntu.com/ARM/RaspberryPi

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.