u-boot-brain/common
Miquel Raynal 55fe0e2b54
spl: fix binman_sym output check
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: 8bee2d251a ("binman: Add binman symbol support to SPL")
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
2018-04-03 12:10:24 +02:00
..
eeprom cmd: eeprom: add support for layout aware commands 2016-05-20 17:02:07 -04:00
init spl: make SPL and normal u-boot stage use independent SYS_MALLOC_F_LEN 2017-07-27 14:59:03 +02:00
spl spl: fix binman_sym output check 2018-04-03 12:10:24 +02:00
autoboot.c Initialize SHA buffer size var in passwd_abort 2018-01-28 09:36:28 -05:00
bedbug.c Consolidate bool type 2013-04-01 16:33:52 -04:00
board_f.c common: move init_helpers.h prototypes in init.h 2018-03-16 14:56:59 -04:00
board_info.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
board_r.c common: move init_helpers.h prototypes in init.h 2018-03-16 14:56:59 -04:00
boot_fit.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bootm_os.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bootm.c fpga: allow programming fpga from FIT image for all FPGA drivers 2017-12-14 16:09:39 +01:00
bootretry.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
bootstage.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
bouncebuf.c Fix a few printf argument verification warnings 2014-09-15 13:32:55 -04:00
cli_hush.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cli_readline.c common: cli_readline: Improve command line editing 2016-08-20 14:03:24 -04:00
cli_simple.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
cli.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
command.c common: command: tempory buffer should have size of command line buf 2017-11-29 22:30:50 -05:00
common_fit.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
console.c Revert "sandbox: Drop special case console code for sandbox" 2017-12-07 15:17:00 -05:00
cros_ec.c cros_ec: Remove unused cros_ec_board_init() function 2015-04-18 11:11:16 -06:00
ddr_spd.c Add more SPDX-License-Identifier tags 2016-01-19 08:31:21 -05:00
dfu.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
dlmalloc.c malloc: don't compare pointers to 0 2017-11-20 20:18:39 -05:00
dlmalloc.src Consolidate bool type 2013-04-01 16:33:52 -04:00
edid.c edid: Use sizeof() in cea_is_hdmi_vsdb_present() 2017-06-12 08:38:06 -04:00
exports.c board/ls2085rdb: Export functions for standalone AQ FW load apps 2015-07-20 11:44:37 -07:00
fb_mmc.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
fb_nand.c treewide: replace with error() with pr_err() 2017-10-04 11:59:44 -04:00
fdt_support.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
flash.c flash: Fix spelling of "ERR_TIMOUT" 2018-01-29 07:48:59 +01:00
hash.c crypto/fsl: Fix HW accelerated hash commands 2018-01-23 11:21:20 -08:00
hwconfig.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
image-android.c parse the second area of android image 2018-02-07 21:58:26 -05:00
image-fdt.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
image-fit.c fix incorrect usage of DT node unit address in comments 2018-01-15 18:29:21 -07:00
image-sig.c fix incorrect usage of DT node unit address in comments 2018-01-15 18:29:21 -07:00
image-sparse.c fastboot: sparse: improve CHUNK_TYPE_FILL write performance 2016-06-27 16:37:39 -04:00
image.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
iomux.c console: Don't enable CONFIG-CONSOLE_MUX, etc. in SPL 2017-02-06 11:38:46 +08:00
iotrace.c common: Make sure arch-specific map_sysmem() is defined 2015-04-18 11:11:09 -06:00
kallsyms.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
Kconfig Convert CONFIG_BOOTP_BOOTPATH et al to Kconfig 2018-02-23 21:41:49 -05:00
kgdb_stubs.c Use correct spelling of "U-Boot" 2016-02-06 12:00:59 +01:00
kgdb.c Fix spelling of "occurred". 2016-05-02 18:37:09 -04:00
lcd_console_rotation.c common/lcd_console: introduce display/framebuffer rotation 2015-04-18 17:40:37 +02:00
lcd_console.c common/lcd_console: introduce display/framebuffer rotation 2015-04-18 17:40:37 +02:00
lcd_simplefb.c libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h> 2018-03-05 10:16:28 -05:00
lcd.c lcd: avoid possible NULL dereference 2017-08-19 20:42:20 +02:00
log_console.c log: Update log_console to honour the log format 2018-02-03 10:09:27 -07:00
log.c log: add category LOGC_EFI 2018-02-03 10:09:28 -07:00
lynxkdi.c powerpc: remove 4xx support 2017-07-03 17:35:28 -04:00
main.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
Makefile dfu: Rename _FUNCTION_DFU to DFU_OVER_ 2018-02-21 20:28:15 +01:00
malloc_simple.c malloc_simple: Add debug statements to memalign_simple 2017-01-28 14:04:34 -05:00
memsize.c common/memsize.c: restore content of the base address 2018-03-13 21:59:30 -04:00
menu.c Fix typo choosen in comments and printf logs 2016-03-27 09:12:23 -04:00
miiphyutil.c common: miiphyutil: Add helper function for mdio bus name 2016-12-20 07:40:04 +01:00
s_record.c Add GPL-2.0+ SPDX-License-Identifier to source files 2013-07-24 09:44:38 -04:00
splash_source.c splash_source: Verify FIT magic 2017-09-04 23:53:47 +02:00
splash.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
stdio.c Drop the log buffer 2017-12-07 15:17:00 -05:00
system_map.c Add support for Linux-like kallsysms 2009-06-12 20:45:48 +02:00
update.c tftp: update: Include missing cfi_flash.h header 2018-02-13 20:34:07 -05:00
usb_hub.c usb: Correct use of debug() 2017-12-07 15:17:00 -05:00
usb_kbd.c env: Rename getenv/_f() to env_get() 2017-08-16 08:30:24 -04:00
usb_storage.c usb: storage: Fix overwritten in usb_stor_set_max_xfer_blk() 2017-10-01 16:32:55 +02:00
usb.c usb: Read device descriptor after device is addressed for xHCI 2017-10-01 16:32:53 +02:00
xyzModem.c common/xyzModem.c: Do not use hard-coded address for debug buffer 2017-04-08 09:26:55 -04:00