This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: Loading U-Boot via UART fails after successfully loading the SPL image

Part Number: AM3358

Tool/software: Linux

I'm trying to load Linux via TFTP and NFS using U-Boot via UART without using any of the BeagleBone Black's persistent storage options like SD-Card or hard wired eMMC.

I built U-Boot with Yocto using the u-boot-ti-staging.bb recipe from the meta-ti layer. This creates the u-boot-spl.bin and the u-boot.img. u-boot-spl.bin according to the manual found here is used to load the actual U-Boot image into ram and execute it. I'm using picocom to see the output on the UART and for being able to start xmodem and ymodem transfers at the same time.

This is what happens:

picocom v3.1

port is        : /dev/ttyS2
flowcontrol    : none
baudrate is    : 115200
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sx -vv
receive_cmd is : rz -vv -E
imap is        : 
omap is        : 
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : no

Type [C-a] [C-h] to see available commands
Terminal ready
CCCCC
*** file: files/u-boot-spl.bin
$ sx -vv files/u-boot-spl.bin
Sende files/u-boot-spl.bin, 591 Blöcke:Starten Sie nun Ihr XMODEM-Empfangsprogramm.
Ymodem Sektoren/Kilobytes gesendet:   0/ 0kWiederholungsversuch 0: Sektor nicht bestätigt
Wiederholungsversuch 0: Sektor nicht bestätigt
Wiederholungsversuch 0: Sektor nicht bestätigt
Bytes gesendet:  75776   BPS:8725                           

Übertragung abgeschlossen

*** exit status: 0 ***

U-Boot SPL 2018.01-g313dcd69c2 (Jan 26 2019 - 11:34:20)
Trying to boot from UART
C
*** file: files/u-boot.img
$ sx -vv files/u-boot.img
Sende files/u-boot.img, 3022 Blöcke:Starten Sie nun Ihr XMODEM-Empfangsprogramm.
Ymodem Sektoren/Kilobytes gesendet:   0/ 0kWiederholungsversuch 0: Sektor nicht bestätigt
Wiederholungsversuch 0: Sektor nicht bestätigt
Bytes gesendet: 386944   BPS:8680                           

Übertragung abgeschlossen

*** exit status: 0 ***
xyzModem - CRC mode, 3024(SOH)/0(STX)/0(CAN) packets, 4 retries
Loaded 386912 bytes
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC

After sending the SPL everything is fine. The SPL prints its line and starts waiting for the U-Boot image. Then I transfer the U-Boot image using sx, which automatically detects that the SPL requires a ymodem transmission. After the transmission of u-boot.img sx tells me that the transmission was successful. However after about 4 Seconds I get this message about xyzModem - RCR mode you can see in the listing above. Right after the message I know I'm back running the boot rom since the boot rom emits the "C" characters at a higher frequency than the SPL. I tried this more than once with the same result.

So I wonder whether the problem lies with the SPL not being happy about the u-boot.img I'm sending or with the u-boot.img crashing after start. Do I have to compile U-Boot with special options to be able to load it via UART using the UART SPL?

Any help is appreciated!