提交 4d9d34a7 编写于 作者: L Lokesh Vutla 提交者: Tom Rini

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: NMichal Simek <michal.simek@xilinx.com>
Reviewed-by: NSimon Glass <sjg@chromium.org>
Reviewed-by: NTom Rini <trini@konsulko.com>
Signed-off-by: NLokesh Vutla <lokeshvutla@ti.com>
上级 53d150b1
......@@ -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",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册