[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 13:10:16 CET 2008


On 12:44 Wed 19 Nov     , Wolfgang Denk wrote:
> 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?
I've put the wrong comment please see the last 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?
no this function is only use on PPC and M68K bootm
> 
> > 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
> 
> ?
no because we may do not have the CONFIG_OF_LIBFDT and CONFIG_FIT at the same
time
> 
> 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.
I've it in the last patch

please ignore this one

Best Regards,
J.


More information about the U-Boot mailing list