| #
47e26b1b |
| 16-Jul-2010 |
Wolfgang Denk <wd@denx.de> |
cmd_usage(): simplify return code handling
Lots of code use this construct:
cmd_usage(cmdtp); return 1;
Change cmd_usage() let it return 1 - then we can replace all these ocurrances by
return
cmd_usage(): simplify return code handling
Lots of code use this construct:
cmd_usage(cmdtp); return 1;
Change cmd_usage() let it return 1 - then we can replace all these ocurrances by
return cmd_usage(cmdtp);
This fixes a few places with incorrect return code handling, too.
Signed-off-by: Wolfgang Denk <wd@denx.de>
show more ...
|
| #
2271d3dd |
| 06-Jul-2010 |
Minkyu Kang <mk7.kang@samsung.com> |
Merge branch 'master' of git://git.denx.de/u-boot
|
| #
54841ab5 |
| 28-Jun-2010 |
Wolfgang Denk <wd@denx.de> |
Make sure that argv[] argument pointers are not modified.
The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to comm
Make sure that argv[] argument pointers are not modified.
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>
show more ...
|
| #
ae3565aa |
| 01-Sep-2009 |
Anton Vorontsov <avorontsov@ru.mvista.com> |
fsl: sys_eeprom: Fix 'may be used uninitialized' warning
The warning is bogus, so silence it by initializing the 'ret' variable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by:
fsl: sys_eeprom: Fix 'may be used uninitialized' warning
The warning is bogus, so silence it by initializing the 'ret' variable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
show more ...
|
| #
9c671e70 |
| 01-Sep-2009 |
Anton Vorontsov <avorontsov@ru.mvista.com> |
fsl: sys_eeprom: Fix 'may be used uninitialized' warning
The warning is bogus, so silence it by initializing the 'ret' variable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by:
fsl: sys_eeprom: Fix 'may be used uninitialized' warning
The warning is bogus, so silence it by initializing the 'ret' variable.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
show more ...
|
| #
3aa8b68d |
| 31-Aug-2009 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'next' of ../next
|
| #
2d04db08 |
| 28-Aug-2009 |
Timur Tabi <timur@freescale.com> |
fsl: simplify the "mac id" command, improve boot-time informational message
The "mac id" command took a 4-character parameter as the identifier string. However, for any given board, only one kind of
fsl: simplify the "mac id" command, improve boot-time informational message
The "mac id" command took a 4-character parameter as the identifier string. However, for any given board, only one kind of identifier is acceptable, so it makes no sense to ask the user to type it in. Instead, if the user enters "mac id", the identifier (and also the version, if it's NXID) will automatically be set to the correct value.
Improve the message that is displayed when EEPROM is read during boot. It now displays "EEPROM:" and then either an error message or the EEPROM identifier if successful.
If the identifier in EEPROM is valid, then always reject a bad CRC, even if the CRC field has not been initialized.
Don't force the MAC address count to MAX_NUM_PORTS or less. Forcing the value to be changed resulting in an in-memory copy that does not match what's in hardware, even though the user did not request that change.
Finally, always update the CRC value in the in-memory copy after any field is changed, so that the CRC is always correct.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
show more ...
|
| #
73e1140b |
| 07-Jul-2009 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
|
| #
afb0b131 |
| 03-Jul-2009 |
Kumar Gala <galak@kernel.crashing.org> |
fsl: Fix compiler warnings from gcc-4.4 in sys_eeprom code
sys_eeprom.c: In function 'do_mac': sys_eeprom.c:323: warning: dereferencing type-punned pointer will break strict-aliasing rules sys_eepro
fsl: Fix compiler warnings from gcc-4.4 in sys_eeprom code
sys_eeprom.c: In function 'do_mac': sys_eeprom.c:323: warning: dereferencing type-punned pointer will break strict-aliasing rules sys_eeprom.c: In function 'mac_read_from_eeprom': sys_eeprom.c:395: warning: dereferencing type-punned pointer will break strict-aliasing rules
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
show more ...
|
| #
92afd368 |
| 14-Jun-2009 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'next' of ../master
|
| #
9a611089 |
| 04-Jun-2009 |
Haiying Wang <Haiying.Wang@freescale.com> |
fsl: Update the number of ethxaddr in reading system eeprom
We support up to 8 mac addresses in system eeprom, so we define the macro MAX_NUM_PORTS to limit the mac_count to 8, and update the number
fsl: Update the number of ethxaddr in reading system eeprom
We support up to 8 mac addresses in system eeprom, so we define the macro MAX_NUM_PORTS to limit the mac_count to 8, and update the number of ethxaddr according to mac_count.
Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
show more ...
|
| #
62c3ae7c |
| 28-Jan-2009 |
Peter Tyser <ptyser@xes-inc.com> |
Standardize command usage messages with cmd_usage()
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
|
| #
cb547320 |
| 17-Dec-2008 |
Haavard Skinnemoen <haavard.skinnemoen@atmel.com> |
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c board/atmel/atstk1000/atstk1000.c cpu/at32ap/at32ap700x/gpio.c include/asm-avr32/arch-at32ap700x/clk.h include/con
Merge branch 'fixes' into cleanups
Conflicts:
board/atmel/atngw100/atngw100.c board/atmel/atstk1000/atstk1000.c cpu/at32ap/at32ap700x/gpio.c include/asm-avr32/arch-at32ap700x/clk.h include/configs/atngw100.h include/configs/atstk1002.h include/configs/atstk1003.h include/configs/atstk1004.h include/configs/atstk1006.h include/configs/favr-32-ezkit.h include/configs/hammerhead.h include/configs/mimc200.h
show more ...
|
| #
f61f1e15 |
| 21-Oct-2008 |
Stefan Roese <sr@denx.de> |
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
|
| #
50bd0057 |
| 21-Oct-2008 |
Markus Klotzbuecher <mk@denx.de> |
Merge git://git.denx.de/u-boot into x1
Conflicts:
drivers/usb/usb_ohci.c
|
| #
f82642e3 |
| 18-Oct-2008 |
Wolfgang Denk <wd@denx.de> |
Merge 'next' branch
Conflicts:
board/freescale/mpc8536ds/mpc8536ds.c include/configs/mgcoge.h
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
| #
6d0f6bcf |
| 16-Oct-2008 |
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
rename CFG_ macros to CONFIG_SYS
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
|
| #
1f6aa622 |
| 13-Oct-2008 |
Stefan Roese <sr@denx.de> |
Merge branch 'master' of /home/stefan/git/u-boot/u-boot
|
| #
1e841086 |
| 12-Oct-2008 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'master' of ssh://10.10.0.7/home/wd/git/u-boot/master
|
| #
1f7bab08 |
| 12-Oct-2008 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
|
| #
e46c7bfb |
| 08-Oct-2008 |
Rafal Czubak <rcz@semihalf.com> |
FSL: Fix get_cpu_board_revision() return value.
get_cpu_board_revision() returned board revision based on information stored in global static struct eeprom. It should instead use one from local stru
FSL: Fix get_cpu_board_revision() return value.
get_cpu_board_revision() returned board revision based on information stored in global static struct eeprom. It should instead use one from local struct board_eeprom, to which the data is actually read from EEPROM. The bug led to system hang after printing L1 cache information on U-Boot startup. The problem was observed on MPC8555CDS system and possibly affects other Freescale MPC85xx boards using CFG_I2C_EEPROM_CCID.
The change has been successfully tested on MPC8555CDS system.
Signed-off-by: Rafal Czubak <rcz@semihalf.com>
show more ...
|
| #
ab06bddb |
| 21-Jul-2008 |
Markus Klotzbuecher <mk@denx.de> |
Merge branch 'master' of git://www.denx.de/git/u-boot
|
| #
42246dac |
| 17-Jul-2008 |
Stefan Roese <sr@denx.de> |
Merge branch 'master' of /home/stefan/git/u-boot/u-boot into next
|
| #
699f0512 |
| 15-Jul-2008 |
Wolfgang Denk <wd@denx.de> |
Prepare v1.3.4-rc1: Code cleanup, update CHANGELOG, sort Makefile
Signed-off-by: Wolfgang Denk <wd@denx.de>
|
| #
50854837 |
| 15-Jul-2008 |
Wolfgang Denk <wd@denx.de> |
Merge branch 'master' of git://git.denx.de/u-boot-mpc86xx
|