summaryrefslogtreecommitdiff
path: root/board/voiceblue/eeprom.c
Commit message (Collapse)AuthorAgeLines
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* VoiceBlue: fix linker errorsLadislav Michl2010-03-07-47/+50
| | | | | | | | | | | | | | | | | | linking eeprom with libgeneric.a is not really needed and causes following error: ../../lib_generic/libgeneric.a(string.o): In function `strcmp': /home/ladis/src/u-boot-ti/lib_generic/string.c:152: multiple definition of `strcmp' ../../examples/standalone/libstubs.a(stubs.o):include/_exports.h:24: first defined here make[1]: *** [eeprom.srec] Error 1 Fix undefined reference to memset generated by some versions of gcc to zero out initialized structure on the stack: eeprom.o: In function `eeprom': board/voiceblue/eeprom.c:152: undefined reference to `memset' make[1]: *** [eeprom] Error 1 Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
* Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI APIBen Warren2009-10-04-27/+30
| | | | | | | | | | | | | | All in-tree boards that use this controller have CONFIG_NET_MULTI added Also: - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111 - cleaned up line lengths - modified all boards that override weak function in this driver - modified all eeprom standalone apps to work with new driver - updated blackfin standalone EEPROM app after testing Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Update U-Boot's build timestamp on every compilePeter Tyser2008-12-06-1/+2
| | | | | | | Use the GNU 'date' command to auto-generate a new U-Boot timestamp on every compile. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* drivers/net : move net drivers to drivers/netJean-Christophe PLAGNIOL-VILLARD2007-11-25-1/+1
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Minor code cleanupWolfgang Denk2005-08-12-2/+1
|
* VoiceBlue update: eeprom tool can also store firmware version now.Wolfgang Denk2005-08-12-36/+108
| | | | | eeprom.bin is runable by jumping at load address. Patch by Ladislav Michl, 23 May 2005
* * Patch by Ladislav Michl, 05 Apr 2005:wdenk2005-04-05-0/+140
Add support for VoiceBlue board. * Patch by Ladislav Michl, 05 Apr 2005: Fix netboot_common() prototypes. * Cleanup.