u-boot-brain/common/spl
Andreas Dannenberg 9d6ee3e235 spl: ymodem: Fix FIT loading termination handling
During FIT reading through ymodem_read_fit() the function
xyzModem_stream_read() is being used which returns zero once the end
of a stream has been reached. This could lead to an premature exit from
ymodem_read_fit() with certain-sized FIT images reporting that zero
bytes overall were read. Such a premature exit would then result in an
-EIO failure being triggered within the spl_load_simple_fit() caller
function and ultimately lead to a boot failure.

Fix this logic by simply aborting the stream read loops and continuing
with the regular code flow which ultimately would lead to returning
the number of bytes to be read ('size') as expected by the callers of
ymodem_read_fit().

Fixes: fa715193c0 ("spl: Add an option to load a FIT containing U-Boot from UART")
Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2019-10-11 10:07:33 -04:00
..
Kconfig Xilinx/FPGA changes for v2020.01 2019-10-09 16:22:03 -04:00
Makefile spl: support booting via RISC-V OpenSBI 2019-08-26 16:07:42 +08:00
spl_atf.c spl: atf: Fix uninitialized pointer to bl31_image_info 2019-07-02 10:30:02 +08:00
spl_bootrom.c spl: pass args to board_return_to_bootrom 2019-10-08 16:35:16 +02:00
spl_dfu.c env: Drop environment.h header file where not needed 2019-08-11 16:43:41 -04:00
spl_ext.c env: Move env_get() to env.h 2019-08-11 16:43:41 -04:00
spl_fat.c env: Move env_get() to env.h 2019-08-11 16:43:41 -04:00
spl_fit.c imx: replace CONFIG_SECURE_BOOT with CONFIG_IMX_HAB 2019-10-08 16:36:37 +02:00
spl_mmc.c spl: mmc: introduce spl_mmc_get_uboot_raw_sector 2019-10-08 16:36:36 +02:00
spl_nand.c spl: nand: support loading i.MX container format file 2019-10-08 16:36:36 +02:00
spl_net.c env: Move env_init() to env.h 2019-08-11 16:43:41 -04:00
spl_nor.c spl: nor: support loading i.MX container format file 2019-10-08 16:36:36 +02:00
spl_onenand.c spl: Weed out CONFIG_SYS_TEXT_BASE usage 2018-09-25 21:48:43 -04:00
spl_opensbi.c spl: support booting via RISC-V OpenSBI 2019-08-26 16:07:42 +08:00
spl_optee.S Rockchip-focused changes for v2018.11-rc2: 2018-10-05 13:40:42 -04:00
spl_ram.c spl: Kconfig: Drop the _SUPPORT postfix from SPL_DFU 2019-01-26 08:13:54 -05:00
spl_sata.c spl: sata: support U-Boot load from raw sata disk 2019-07-24 14:15:36 -04:00
spl_sdp.c Fixes for 2019.07 2019-06-28 08:00:22 -04:00
spl_spi.c spl: spi: support loading i.MX container format file 2019-10-08 16:36:36 +02:00
spl_ubi.c ubispl: add support for loading volumes by name 2019-07-09 07:00:25 +02:00
spl_usb.c usb: Rename SPL_USB_SUPPORT to SPL_USB_STORAGE 2019-02-15 22:01:15 +01:00
spl_xip.c SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl_ymodem.c spl: ymodem: Fix FIT loading termination handling 2019-10-11 10:07:33 -04:00
spl.c spl: Set up the bloblist in board_init_r() 2019-10-08 13:51:03 +08:00