mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 23:47:24 +00:00
55fe0e2b54
A previous commit introduced the use of binman in the SPL.
After the binman_sym call over the 'pos' symbol, the output value is
checked against BINMAN_SYM_MISSING (-1UL). According to the
documentation (tools/binman/README), when it comes to the 'pos'
attribute:
pos:
This sets the position of an entry within the image. The first
byte of the image is normally at position 0. If 'pos' is not
provided, binman sets it to the end of the previous region, or
the start of the image's entry area (normally 0) if there is no
previous region.
So instead of checking if the return value is BINMAN_SYM_MISSING, we
should also check if the value is not null.
The failure happens when using both the SPL file and the U-Boot file
independently instead of the concatenated file (SPL + padding + U-Boot).
This is because the U-Boot binary file alone does not have the U-Boot
header while it is present in the concatenation file. Not having the
header forces the SPL to discover where it should load U-Boot. The
binman_sym call is supposed to do that but fails. Because of the wrong
check, the destination address was set to 0 while it should have been
somewhere in RAM. This, obviously, stalls the board.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
spl.c | ||
spl_atf.c | ||
spl_bootrom.c | ||
spl_dfu.c | ||
spl_ext.c | ||
spl_fat.c | ||
spl_fit.c | ||
spl_mmc.c | ||
spl_nand.c | ||
spl_net.c | ||
spl_nor.c | ||
spl_onenand.c | ||
spl_ram.c | ||
spl_sata.c | ||
spl_sdp.c | ||
spl_spi.c | ||
spl_ubi.c | ||
spl_usb.c | ||
spl_xip.c | ||
spl_ymodem.c |