On Wednesday 22 July 2009 00:52:51 Peter Tyser wrote:
> > > > --- a/examples/standalone/Makefile
> > > > +++ b/examples/standalone/Makefile
> > > > @@ -86,6 +86,10 @@ ELF  = hello_world
> > > >  SREC   = hello_world.srec
> > > >  BIN    = hello_world.bin
> > > >
> > > > +ELF    += atmel_df_pow2
> > > > +SREC   += atmel_df_pow2.srec
> > > > +BIN    += atmel_df_pow2.bin
> > >
> > > These new files aren't going to compile for a lot of boards as is, some
> > > conditional compilation will be necessary.
> >
> > you'll have to be a little more specific.  this driver only uses common
> > spi functions, so no, there shouldnt be any build failures.
>
> The majority of boards don't have SPI functionality.

which is irrelevant as the export code takes care of always providing the 
symbols used.

> I just tried applying this patch, moving atmel_df_pow2 into
> examples/standalone, and I get:
>
> pty...@ptyser-laptop u-boot $ make mrproper
> pty...@ptyser-laptop u-boot $ make XPEDITE5370_config
> Configuring for XPEDITE5370 board...
> pty...@ptyser-laptop u-boot $ make -s
> atmel_df_pow2.c:16: warning: 'struct spi_slave' declared inside parameter
> list atmel_df_pow2.c:16: warning: its scope is only this definition or
> declaration, which is probably not what you want atmel_df_pow2.c: In
> function 'flash_cmd':
> atmel_df_pow2.c:19: warning: implicit declaration of function 'spi_xfer'
> atmel_df_pow2.c:19: error: 'SPI_XFER_BEGIN' undeclared (first use in this
> function) ... and so on ...
>
> Adding #include <spi.h> gets rid of some warnings

well if you dont apply the patch properly, that's an error on your part, not 
mine.

> but there's still a
> number of undefined references: pty...@ptyser-laptop u-boot $ make -s
> atmel_df_pow2.o: In function `atmel_df_pow2':
> /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:129: undefined
> reference to `spi_init'
> /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:163: undefined
> reference to `spi_setup_slave'
> /home/ptyser/u-boot/examples/standalone/atmel_df_pow2.c:169: undefined
> reference to `spi_claim_bus' ... and so on ...

looks like you still didnt do it right.  stubs.o will always end up with stub 
symbols which are always provided for standalone applications.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to