[U-Boot] [PATCH] Fix FDT support to use fdt blob and FIT together or not
Wolfgang Denk
wd at denx.de
Wed Nov 19 12:44:17 CET 2008
Dear Jean-Christophe PLAGNIOL-VILLARD,
In message <1227053359-8452-1-git-send-email-plagnioj at jcrosoft.com> you wrote:
> FDT support is used for both FIT style images and architectures
> (ppc, m68k, sparc) that can pass a fdt blob to an OS..
We should not fix this on any architectures. They have nothing to do
with this.
Please write instead something like this:
FDT support is needed both for passing a FDT blob to an OS
and for FIT style images.
> The BOOTM_STATE_FDT support should only exist for the case that we are passing
> a blob to an OS.
I don't see how this statement is related to your patch?
> 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)
This is a NO-OP and could be omitted.
> 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)
Maybe "|| defined(CONFIG_SPARC)" is missing here?
> 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)
> +
Would it not be easier to just add a line
COBJS-$(CONFIG_FIT) += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o
?
This would also allow to omit files that are not needed for FIT images
(if there are any).
Note: You must also change the Makefile to use
COBJS := $(sort $(COBJS-y))
or we will get errors because of duplicated opjects.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Just about every computer on the market today runs Unix, except the
Mac (and nobody cares about it). - Bill Joy 6/21/85
More information about the U-Boot
mailing list