]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix FIT and FDT support to have CONFIG_OF_LIBFDT and CONFIG_FIT independent
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Mon, 24 Nov 2008 12:33:51 +0000 (13:33 +0100)
committerWolfgang Denk <wd@denx.de>
Sat, 13 Dec 2008 22:31:49 +0000 (23:31 +0100)
FDT support is used for both FIT style images and for architectures
that can pass a fdt blob to an OS (ppc, m68k, sparc).

For other architectures and boards which do not pass a fdt blob to an
OS but want to use the new uImage format, we just need FIT support.

Now we can have the 4 following configurations :

1) FIT only             CONFIG_FIT
2) fdt blob only        CONFIG_OF_LIBFDT
3) both                 CONFIG_OF_LIBFDT & CONFIG_FIT
4) none                 none

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
common/image.c
include/image.h
libfdt/Makefile

index 866edf619df4a0ada25c4d623aad5ef5c30a4d99..daa68bc2ddeb8f9c4c0dabe0a072f4f18f94ca9f 100644 (file)
@@ -1071,6 +1071,7 @@ 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
 static void fdt_error (const char *msg)
@@ -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
index 54335559af3b1ca4bac01038af46117625bf88ab..4609200b854b263bd6336f297c71e830bb7732c2 100644 (file)
 
 #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)
index ca2ad76c887f7c9d1d59ae8adb6fb04d5c0099a6..d6e283045f6bbeb430c8d41a2b4072816b6875c1 100644 (file)
@@ -27,9 +27,13 @@ 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  := $(COBJS-y)
+COBJS-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
+COBJS-$(CONFIG_FIT) += $(COBJS-libfdt)
+
+
+COBJS  := $(sort $(COBJS-y))
 SRCS   := $(SOBJS:.o=.S) $(COBJS:.o=.c)
 OBJS   := $(addprefix $(obj),$(SOBJS) $(COBJS))