u-boot/common
Anshul Dalal fd2bccec19 spl: return header size to spl_load in os boot
During linux build process the header size is computed including the BSS
whereas it's removed when creating the uncompressed image. Therefore the
size of the uncompressed image on filesystem will be smaller than the
size specified in the header.

This causes issues when loading the kernel image from the SPL (as in
falcon boot) with spl_load since it compares the read file size from the
FS to the header size form the image. Which leads to the following check
in `include/spl_load.h` failing to -EIO when loading kernel image:

  return read < spl_image->size ? -EIO : 0;

Therefore we should return the header size back to spl_load instead of
the file size in falcon boot when not loading a FIT image.

Bug report:
https://lore.kernel.org/u-boot/20250214111656.2358748-1-anshuld@ti.com/

Fixes: 775074165d ("spl: Add generic spl_load function")
Reported-by: Anshul Dalal <anshuld@ti.com>
Reviewed-by: Sean Anderson <seanga2@gmail.com>
Signed-off-by: Anshul Dalal <anshuld@ti.com>
2025-03-30 09:15:34 -06:00
..
eeprom Merge patch series "'eeprom' command improvements" 2024-06-07 10:48:41 -06:00
init Revert "global_data: Drop spl_handoff" 2024-12-02 07:40:39 -06:00
spl spl: return header size to spl_load in os boot 2025-03-30 09:15:34 -06:00
autoboot.c common: Add NULL checks for malloc_cache_aligned in autoboot.c 2025-02-11 08:17:23 -06:00
avb_verify.c common: avb_verify: add str_avb_io_error/str_avb_slot_error 2024-02-15 10:38:34 +01:00
bloblist.c Merge patch series "bloblist: refactor xferlist and bloblist" 2025-02-19 18:49:47 -06:00
board_f.c Prepare v2025.04-rc4 2025-03-10 20:18:51 -06:00
board_info.c dm: sysinfo: Shorten the SYSINFO_ID prefix 2024-11-17 13:12:54 -06:00
board_r.c arm64: Enable RW, RX and RO mappings for the relocated binary 2025-03-14 13:37:54 +02:00
bootstage.c bootstage: Do not sort records 2024-11-03 21:27:12 -06:00
bouncebuf.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
button_cmd.c include: Move snprintf to stdio.h 2024-05-22 08:55:29 -06:00
cli_getch.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cli_hush_modern.c cli: modern_hush: Add upstream commits up to 13 July 2024 2024-09-13 13:43:56 -06:00
cli_hush_upstream.c cli: modern_hush: Add upstream commits up to 13 July 2024 2024-09-13 13:43:56 -06:00
cli_hush.c common: Add NULL checks for xrealloc in make_string cli_hush.c 2025-02-11 08:17:23 -06:00
cli_readline.c global: Use CONFIG_XPL_BUILD instead of CONFIG_SPL_BUILD 2024-10-11 11:44:48 -06:00
cli_simple.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cli.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
command.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
console.c common: console: Delete obsolete VIDCONSOLE_AS_{LCD, NAME} options 2025-03-14 14:35:56 -06:00
cros_ec.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
cyclic.c cyclic: Fix rollover every 72 min on 32 bits platforms 2025-01-22 10:22:34 +01:00
ddr_spd.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
dfu.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
dlmalloc.c common: Tidy up how malloc() is inited 2024-10-25 14:22:24 -06:00
dlmalloc.src
edid.c video: edid: guard standard timings EDID expansion behind kconfig 2025-03-19 10:59:23 +02:00
event.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
exports.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
flash.c Merge patch series "Miscellaneous fixes" 2024-09-24 13:41:21 -06:00
hash.c lib: Allow crc16 code to be dropped 2025-02-03 16:00:42 -06:00
hwconfig.c global_data: Remove environment members if not used 2024-08-26 14:06:08 -06:00
iomux.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
iotrace.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
kallsyms.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
Kconfig arm64: Enable RW, RX and RO mappings for the relocated binary 2025-03-14 13:37:54 +02:00
kgdb_stubs.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
kgdb.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
log_console.c log: Avoid including function names by default 2024-08-23 15:58:41 -06:00
log_syslog.c log: Avoid including function names by default 2024-08-23 15:58:41 -06:00
log.c log: enable filtering on functions 2025-01-26 11:06:56 +01:00
main.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
Makefile common: memtop: add logic to detect ram_top 2024-11-15 14:32:02 +01:00
malloc_simple.c malloc: Show amount of used space when memory runs out 2024-12-27 15:16:10 -06:00
mcheck_core.inc.h mcheck: let mcheck_abortfunc_t print the pointer 2024-04-12 16:23:06 -06:00
memsize.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
memtop.c common: memtop: Fix the return type for find_ram_top 2024-12-20 09:17:43 +01:00
menu.c menu: add support to check if menu needs to be reprinted 2024-11-04 16:41:38 -06:00
miiphyutil.c net: miiphybb: Drop mdio_init() 2025-03-11 23:06:18 +01:00
qfw.c qemu: Move qfw kernel setup into a common file 2023-02-06 13:04:53 -05:00
s_record.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
scp03.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
splash_source.c boot: Use fit_image_get_data() to get data 2025-01-22 15:58:04 -06:00
splash.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
stackprot.c Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet" 2024-05-20 13:35:03 -06:00
stdio.c usb: gadget: Remove the legacy usbtty driver 2025-03-10 09:22:35 +01:00
system_map.c
update.c boot: Use fit_image_get_data() to get data 2025-01-22 15:58:04 -06:00
usb_hub.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
usb_kbd.c net: lwip: add DHCP support and dhcp commmand 2024-10-16 11:11:56 -06:00
usb_onboard_hub.c usb: onboard-hub: Update the bind function based on peer-hub property 2024-12-11 08:22:17 +01:00
usb_storage.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
usb.c common: Remove duplicate newlines 2024-07-15 12:12:17 -06:00
version.c version: Separate our version string from the version command 2023-11-07 14:48:19 -05:00
xyzModem.c xyz-modem: Add missing fallthrough annotation 2024-11-14 18:14:05 -06:00