[U-Boot] [PATCH] Fix breakage in SMC EEPROM standalone applications

Ben Warren biggerbadderben at gmail.com
Tue Jan 19 00:15:32 CET 2010


Hi Tom,

Tom wrote:
> Ben Warren wrote:
>> Commit 6a45e384955262882375a2785426dc65aeb636c4 (Make getenv_IPaddr() 
>> global)
>> inadvertently added ' #include "net.h" ' to the standalone programs, 
>> creating
>> duplicate definitions of 'struct eth_device'.  This patch removes the 
>> local
>> definitions and removes other code that breaks due to the change in 
>> definition.
>
> This patch may need refining.
> I see warnings in a number of arm targets
>
> Old :
> err/versatile.ERR
>
> smc91111_eeprom.c:33: error: redefinition of 'struct eth_device'
> make[1]: *** [.../build/examples/standalone/smc91111_eeprom.o] Error 1
>
> New
>
> err/versatile.ERR
> .../build/examples/standalone/smc91111_eeprom.o: In function 
> `smc91111_eeprom':
> .../u-boot/src/u-boot-arm/examples/standalone/smc91111_eeprom.c:58: 
> undefined reference to `memset'
> make[1]: *** [.../build/examples/standalone/smc91111_eeprom] Error 1
>
> Tom
>
This builds cleanly for me.  I am, however, using an old toolchain (gcc 
4.0.0 from ELDK 4.1).  Do struct member assignments use memset()?  Line 
58 is the closing brace and semicolon in the following:

        struct eth_device dev = {
                .iobase = CONFIG_SMC91111_BASE
        };

regards,
Ben




More information about the U-Boot mailing list