mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
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>
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user