[U-Boot] [PATCH v2] atmel_df_pow2: standalone to convert dataflashes to pow2

Mike Frysinger vapier at gentoo.org
Wed Jul 22 07:25:45 CEST 2009


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:
>
> ptyser at ptyser-laptop u-boot $ make mrproper
> ptyser at ptyser-laptop u-boot $ make XPEDITE5370_config
> Configuring for XPEDITE5370 board...
> ptyser at 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: ptyser at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090722/1d6ad5da/attachment.pgp 


More information about the U-Boot mailing list