0

I already have a working config for a compute module 3+. As I need the same setup on a raspberry Pi Model 3 B I tried bringing the config over.

Everything is compiled in a buildroot environment. U-Boot v2020.10 is used.

After some small changes regarding the device tree and dtoverlays I managed to get U-Boot to print on the serial console(as expected), but it ignores all keyboard input. The following output is produced by U-Boot on serial console.

EDIT I used the term serial very loosely here. I'm connected to the serial console with a serial-USB adapter and picocom. I applied the miniuart-bt overlay to restore /dev/ttyAMA0 respectively UART0 on gpio pins 14/15. Lastely I configured U-Boot with PL011. I left out support for mini-uart as this would break the output too. This configuration works just fine on the compute module, but doen't register input on the model 3B.

EDIT I moved the working u-boot.bin from the cm 3 to the model B to see what happens. It seemingly works as both are close enough. But the same problem occurs. The other way around though it does not work. So it is potential not a problem with U-Boot but with the Model B configuration.

  1 Isa-Boot>·                                                                     
  2                                                                                
  3 U-Boot 2020.10 (Mar 24 2022 - 12:18:38 +0000)                                  
  4                                                                                
  5 DRAM:  924 MiB                                                                 
  6 RPI 3 Model B (0xa02082)                                                       
  7 MMC:   mmc@7e202000: 0, sdhci@7e300000: 1                                      
  8 In:    serial                                                                  
  9 Out:   vidconsole                                                              
 10 Err:   vidconsole                                                              
 11 Hit any key to stop autoboot:  0·

Neither can I stop autoboot nor can I use the shell to complete the boot script.

I tried what feels like a million configurations and I'm out of ideas what could be the reason for this behavior. I also never experienced this with the cm module.

RPi setup config.txt:

enable_uart=1
start_file=start.elf
fixup_file=fixup.dat
kernel=u-boot.bin
gpu_mem=100
dtoverlay=miniuart-bt
dtparam=spi=on
device_tree=bcm2710-rpi-3-b.dtb
dtoverlay=sc16is750-spi0-ce0

U-Boot defconfig:

CONFIG_ARM=y
CONFIG_ARCH_CPU_INIT=y
CONFIG_ARCH_BCM283X=y
CONFIG_SYS_TEXT_BASE=0x00008000
CONFIG_TARGET_RPI_3_32B=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_SIZE=0x4000
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_STDIO_DEREGISTER=y
CONFIG_MISC_INIT_R=y
# CONFIG_DISPLAY_CPUINFO is not set
# CONFIG_DISPLAY_BOARDINFO is not set
CONFIG_SYS_PROMPT="Isa-Boot> "
CONFIG_CMD_GPIO=y
CONFIG_CMD_MMC=y
CONFIG_CMD_USB=y
CONFIG_CMD_FS_UUID=y
CONFIG_OF_EMBED=y
# CONFIG_ENV_IS_IN_FAT is not set
CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
# CONFIG_NET is not set
CONFIG_DM_MMC=y
# CONFIG_MMC_HW_PARTITIONING is not set
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_BCM2835=y
CONFIG_DM_ETH=y
CONFIG_PINCTRL=y
# CONFIG_PINCTRL_GENERIC is not set
# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
# CONFIG_BCM283X_MU_SERIAL is not set
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_DM_VIDEO=y
# CONFIG_VIDEO_BPP8 is not set
# CONFIG_VIDEO_BPP16 is not set
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
obvg
  • 129
  • 12
  • *"I managed to get U-Boot to print on the serial console ... The following output is produced by U-Boot on serial console."* -- Seems like you use words without understanding what they mean. When U-Boot has a *serial* console, all console input & output is through a UART. You would be expected to execute a terminal emulation program on a host PC that is at the other end of the serial link. But your U-Boot is reporting that console output is directed to a video display, and console input is expected from a serial port (i.e. not a keyboard). – sawdust Mar 24 '22 at 17:03
  • You are right, I used the terms very loosely. I connect to the gpio pins with a FT232. So you right not a keyboard directly(picocom). I used the `miniuart-bt` overlay to free `/dev/ttyAMA0` and configured u-boot to use `PL011` UART. I did the same with the cm module. It made it possible for me to see u-boots output. But u-boot ignores my input through the serial. I'll update my question tomorrow. – obvg Mar 24 '22 at 21:37
  • I kinda read over your comment about the video display. I found it odd and looked into the cm module. It's the same there. `In: serial Out: vidconsole Err: vidconsole` It works though. Any thoughts on that? – obvg Mar 25 '22 at 13:34

1 Answers1

0

From U-boot documentation, "U-boot Environment Variables":

bootdelay: After reset, U-Boot will wait this number of seconds before it executes the contents of the bootcmd variable. During this time a countdown is printed, which can be interrupted by pressing any key.

Set this variable to 0 boot without delay. Be careful: depending on the contents of your bootcmd variable, this can prevent you from entering interactive commands again forever!

Is this value 0 in your case?

nemesis
  • 150
  • 9