

One more little thing left, set silent boot environmental variable.

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.

The first line removes the boot delay, so autoboot will not be interrupted by messages sent on UART interface. Add the following lines to the end of the file CONFIG_BOOTDELAY=-2 rpi_3_defconfig for Raspberry Pi 3, rpi_4_defconfig for Raspberry Pi 4 and so on. git clone -depth 1 git:///u-boot.gitįind your board config files - they depend on the model, e.g. 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 the official u-boot repository. Install the dependencies sudo apt install git make gcc gcc-aarch64-linux-gnu bison flex I know links only answers are frowned upon, so here' s a quick breakdown of a solution: You will however need to find the right config files for your board in u-boot source folder.

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 on Raspberry Pi - it should work similarly for other boards, provided they use U-boot. If you are looking for board_early_init_f of Orange Pi 4B it is in /build/cache/sources/u-boot/v2020.10/board/rockchip/evb_rk3399/evb-rk3399.c Gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE) My board did not have one, so I had to add the whole function int board_early_init_f(void) It actually modifies board's global data variable to have these flags: gd->flags |= (GD_FLG_SILENT | GD_FLG_DISABLE_CONSOLE) To disable the serial console I had to do the following:Īdd the following defines to the board's config header(located in include/configs/board.h): #define CONFIG_DISABLE_CONSOLEĬheck if your board has early_init_f enabled in the same file: #define CONFIG_BOARD_EARLY_INIT_F 1įind the arch file(Something like arch/x86/cpu/architecture/architecture.c) and add this call to its early_init_f function. The board I was working on had a reasonably new u-boot in its BSP. I'm getting back to this issue almost a year later, now I've managed to find a proper solution.
