[U-Boot] [PATCH] Fix FDT support to use fdt blob and FIT together or not
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Wed Nov 19 01:09:19 CET 2008
FDT support is used for both FIT style images and architectures
(ppc, m68k, sparc) that can pass a fdt blob to an OS..
The BOOTM_STATE_FDT support should only exist for the case that we are passing
a blob to an OS.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
replace my precedent patch
[PATCH 1/2] bootm: fix BOOTM_STATE_FDT subcommand usage
Best Regards,
J.
common/image.c | 4 +++-
include/image.h | 4 ----
libfdt/Makefile | 6 +++++-
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/common/image.c b/common/image.c
index 866edf6..3504c2a 100644
--- a/common/image.c
+++ b/common/image.c
@@ -1071,8 +1071,9 @@ int boot_ramdisk_high (struct lmb *lmb, ulong rd_data, ulong rd_len,
error:
return -1;
}
+#endif /* defined(CONFIG_PPC) || defined(CONFIG_M68K) || defined(CONFIG_SPARC) */
-#ifdef CONFIG_OF_LIBFDT
+#if defined(CONFIG_OF_LIBFDT)
static void fdt_error (const char *msg)
{
puts ("ERROR: ");
@@ -1575,6 +1576,7 @@ error:
}
#endif /* CONFIG_OF_LIBFDT */
+#if defined(CONFIG_PPC) || defined(CONFIG_M68K)
/**
* boot_get_cmdline - allocate and initialize kernel cmdline
* @lmb: pointer to lmb handle, will be used for memory mgmt
diff --git a/include/image.h b/include/image.h
index 5433555..4609200 100644
--- a/include/image.h
+++ b/include/image.h
@@ -50,10 +50,6 @@
#endif /* USE_HOSTCC */
-#if defined(CONFIG_FIT) && !defined(CONFIG_OF_LIBFDT)
-#error "CONFIG_OF_LIBFDT not enabled, required by CONFIG_FIT!"
-#endif
-
#include <command.h>
#if defined(CONFIG_FIT)
diff --git a/libfdt/Makefile b/libfdt/Makefile
index ca2ad76..5999bac 100644
--- a/libfdt/Makefile
+++ b/libfdt/Makefile
@@ -27,7 +27,11 @@ LIB = $(obj)libfdt.a
SOBJS =
-COBJS-$(CONFIG_OF_LIBFDT) += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o
+COBJS-libfdt += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o
+
+COBJS-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
+COBJS-$(CONFIG_FIT) += $(COBJS-libfdt)
+
COBJS := $(COBJS-y)
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c)
--
1.5.6.5
More information about the U-Boot
mailing list