SD boot confusion

I’m a little bit confused. I set my boot mode to UART and updated the firmware images over TFTP, then powered the system down and set the boot mode back to FLASH.

I inserted an SD card with the Debian-69 image and tried to boot the system. This did not work. The console kept spitting out ‘C’ characters. I fiddled a little and apparently I left the SD card in while going back to UART mode in the hope to find something to debug.

To my astonishment the bootloader found and transferred the startup to the inserted SD image and apparently Debian booted just fine.

What happened? I thought I’d have to go back to FLASH boot mode to get the Debian system running.

Hmm, I might just have assumed that the ‘ON’ label on the bootsel switches mean ‘logic high’, when there are also ‘H’ and ‘L’ markings that seem to contradict that reasoning…

1 Like

Yes, that is the issue.

The IOs are pulled up (probably by the SoC itself), making them read high by default.

If “up” relative to the text in the switches block means “connected”, it apparently connects the pin… to ground. Which makes it low.

The “CCC” behavior you’re getting is that of setting “UART”, which waits to receive a boot program via XMODEM-CRC.

What you used to do the flashing is the default “FLASH” setting, which loads u-boot SPL from SPI flash, followed by opensbi, then u-boot.