Commit 37846d2c901cf317ca33902a67cb23ae182fd0f0

Authored by Lokesh Vutla
1 parent ca92650e6b

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.

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

common/spl/spl_fit.c
... ... @@ -193,6 +193,7 @@
193 193 */
194 194 dst = (void *)((load + data_size + align_len) & ~align_len);
195 195 fdt_offset += base_offset;
  196 + sectors = (fdt_len + info->bl_len - 1) / info->bl_len;
196 197 count = info->read(info, sector + fdt_offset / info->bl_len, sectors,
197 198 dst);
198 199 debug("fit read %x sectors to %x, dst %p, data_offset %x\n",