mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
spl: fit: Fix the number of bytes read when reading fdt from fit
sectors field is not being updated when reading fdt from fit image. Because of this size_of(u-boot.bin) is being read when reading fdt. Fixing it by updating the sectors field properly. Tested-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
This commit is contained in:
parent
53d150b141
commit
4d9d34a7f2
1 changed files with 1 additions and 0 deletions
|
@ -182,6 +182,7 @@ int spl_load_simple_fit(struct spl_load_info *info, ulong sector, void *fit)
|
|||
*/
|
||||
dst = load_ptr + data_size;
|
||||
fdt_offset += base_offset;
|
||||
sectors = (fdt_len + info->bl_len - 1) / info->bl_len;
|
||||
count = info->read(info, sector + fdt_offset / info->bl_len, sectors,
|
||||
dst);
|
||||
debug("fit read %x sectors to %x, dst %p, data_offset %x\n",
|
||||
|
|
Loading…
Reference in a new issue