summaryrefslogtreecommitdiff
path: root/common/image.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-02-23 05:55:45 (GMT)
committerTom Rini <trini@konsulko.com>2016-03-14 23:18:26 (GMT)
commitaa34fbc087f246cbd83223bed499ca62694787d8 (patch)
tree2702c73e51f50fc822d347b629582f7232873f4d /common/image.c
parent70d41093c5d6d378a8e750d1829063890a3c7ca5 (diff)
downloadu-boot-aa34fbc087f246cbd83223bed499ca62694787d8.tar.xz
fdt: Allow libfdt to be used in SPL
Add an option to enable libfdt in SPL. This can be useful when decoding FIT files in SPL. We need to make sure this option is not enabled in SPL by this change. Also this option needs to be enabled in host builds. Si add a new IMAGE_USE_LIBFDT #define which can be used in files that are built on the host but must also build for U-Boot and SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/image.c')
-rw-r--r--common/image.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/image.c b/common/image.c
index 12102ab..7d3a543 100644
--- a/common/image.c
+++ b/common/image.c
@@ -29,7 +29,7 @@
#include <image.h>
#include <mapmem.h>
-#if IMAGE_ENABLE_FIT || defined(CONFIG_OF_LIBFDT)
+#if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT
#include <libfdt.h>
#include <fdt_support.h>
#endif
@@ -762,7 +762,7 @@ int genimg_get_format(const void *img_addr)
if (image_check_magic(hdr))
return IMAGE_FORMAT_LEGACY;
#endif
-#if IMAGE_ENABLE_FIT || defined(CONFIG_OF_LIBFDT)
+#if IMAGE_ENABLE_FIT || IMAGE_ENABLE_OF_LIBFDT
if (fdt_check_header(img_addr) == 0)
return IMAGE_FORMAT_FIT;
#endif