Commit Graph

6 Commits

Author SHA1 Message Date
Joseph Chen acd4329027 common: fit: unify fit image align size
Set 512 as default align size in order to access any image
by block unit.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I372ca7ff567816cb8369aff9d1fbe9865fa6d933
2020-03-16 11:42:38 +08:00
Masahiro Yamada 0e00a84cde UPSTREAM: libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
Thomas reported U-Boot failed to build host tools if libfdt-devel
package is installed because tools include libfdt headers from
/usr/include/ instead of using internal ones.

This commit moves the header code:
  include/libfdt.h         -> include/linux/libfdt.h
  include/libfdt_env.h     -> include/linux/libfdt_env.h

and replaces include directives:
  #include <libfdt.h>      -> #include <linux/libfdt.h>
  #include <libfdt_env.h>  -> #include <linux/libfdt_env.h>

Change-Id: I6c0f7e50e8b571106627f25ddac008a62bd2994e
Reported-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
2018-12-24 17:20:37 +08:00
Jean-Jacques Hiblot 1481d9f176 UPSTREAM: fit: fixed bug in locate_dtb_in_fit()
If the dtb is the first data of the FIT, the its offset is 0x0. Change the
test to '<' instead of '<='

Change-Id: Ie6dd1734049f642511db0fc1b19f2af0bec8de04
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit d56b86eec32a700cdc16170ad8365ee7c6522f0e)
2018-01-17 15:27:28 +08:00
Jean-Jacques Hiblot ea5b64c6e7 UPSTREAM: fit: use 'const' for the input of fdt_offset() and locate_dtb_in_fit()
Those 2 functions don't modify their input, we can mark it const.
This prevents compilation warnings when they are provided const input.

Change-Id: I9583751451cfc26a99ee94f87447dd6337d0cc67
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 906a9dbbcba85e8b02414c960c75103cc4755102)
2018-01-17 15:27:28 +08:00
Nobuhiro Iwamatsu 160cfc4b5a boot_fit: Change return value from FDT_ERROR to -EINVAL in fdt_offset()
FDT_ERROR is defined as unsigned long. However, since the return value of
fdt_offset() is int, a warning will occur when compiling. Also, it is better
to use -EINVAL than FDT_ERROR.
This fixes this problem by change return value from FDT_ERROR to -EINVAL.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
CC: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Franklin S Cooper Jr <fcooper@ti.com>
2017-08-13 15:17:34 -04:00
Cooper Jr., Franklin 92926bc80c boot_fit: Create helper functions that can be used to select DTB out of FIT
Some platforms may append a FIT image to the U-boot image. This function
aids in parsing the FIT image and selecting the correct DTB at runtime.

Signed-off-by: Franklin S Cooper Jr <fcooper@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-10 14:25:50 -04:00