Skip to content
Snippets Groups Projects
  1. Sep 20, 2010
  2. Jul 24, 2010
  3. Jul 04, 2010
    • Wolfgang Denk's avatar
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk authored
      
      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: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      54841ab5
  4. May 21, 2010
  5. Jul 19, 2009
  6. Jul 18, 2009
  7. Jun 12, 2009
    • Wolfgang Denk's avatar
      General help message cleanup · a89c33db
      Wolfgang Denk authored
      
      Many of the help messages were not really helpful; for example, many
      commands that take no arguments would not print a correct synopsis
      line, but "No additional help available." which is not exactly wrong,
      but not helpful either.
      
      Commit ``Make "usage" messages more helpful.'' changed this
      partially. But it also became clear that lots of "Usage" and "Help"
      messages (fields "usage" and "help" in struct cmd_tbl_s respective)
      were actually redundant.
      
      This patch cleans this up - for example:
      
      Before:
      	=> help dtt
      	dtt - Digital Thermometer and Thermostat
      
      	Usage:
      	dtt         - Read temperature from digital thermometer and thermostat.
      
      After:
      	=> help dtt
      	dtt - Read temperature from Digital Thermometer and Thermostat
      
      	Usage:
      	dtt
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      a89c33db
  8. Mar 20, 2009
  9. Jan 28, 2009
  10. Oct 18, 2008
  11. Aug 06, 2008
  12. Jul 29, 2008
  13. Jul 14, 2008
  14. Jul 13, 2008
  15. Jul 10, 2008
  16. Mar 30, 2008
    • Stelian Pop's avatar
      Fix CFG_NO_FLASH compilation. · 880cc438
      Stelian Pop authored
      
      Many Atmel boards have no "real" (NOR) flash on board, and rely only
      on DataFlash and NAND memories. This patch enables CFG_NO_FLASH to
      be present in a board configuration file, while still enabling flash
      commands like 'flinfo', 'protect', etc.
      
      Signed-off-by: default avatarStelian Pop <stelian@popies.net>
      880cc438
  17. Nov 21, 2007
  18. Jul 11, 2007
  19. Jul 10, 2007
  20. Jul 08, 2007
  21. Jul 03, 2007
  22. Jun 12, 2007
  23. Apr 11, 2006
    • Heiko Schocher's avatar
      Fixes common/cmd_flash.c: · bb74140d
      Heiko Schocher authored
         - fix some compiler/parser error, if using m68k tool chain
         - optical fix for protect on/off all messages, if using more
           then one bank
        Patch by Jens Scharsig, 28 July 2005
      bb74140d
  24. Apr 01, 2006
    • Stefan Roese's avatar
      * Changes/fixes for drivers/cfi_flash.c: · 2662b40c
      Stefan Roese authored
        - Add Intel legacy lock/unlock support to common CFI driver
      
          On some Intel flash's (e.g. Intel J3) legacy unlocking is
          supported, meaning that unlocking of one sector will unlock
          all sectors of this bank. Using this feature, unlocking
          of all sectors upon startup (via env var "unlock=yes") will
          get much faster.
      
        - Fixed problem with multiple reads of envronment variable
          "unlock" as pointed out by Reinhard Arlt & Anders Larsen.
      
        - Removed unwanted linefeeds from "protect" command when
          CFG_FLASH_PROTECTION is enabled.
      
        - Changed p3p400 board to use CFG_FLASH_PROTECTION
      
        Patch by Stefan Roese, 01 Apr 2006
      
      * Changes/fixes for drivers/cfi_flash.c:
        - Correctly handle the cases where CFG_HZ != 1000 (several
          XScale-based boards)
        - Fix the timeout calculation of buffered writes (off by a
          factor of 1000)
        Patch by Anders Larsen, 31 Mar 2006
      2662b40c
  25. Oct 11, 2005
  26. Aug 10, 2005
  27. Aug 09, 2005
  28. Aug 07, 2005
  29. Aug 05, 2005
  30. Aug 02, 2005
  31. Aug 01, 2005
  32. Jul 21, 2005
  33. Dec 31, 2004
    • Wolfgang Denk's avatar
      * Code cleanup, mostly for GCC-3.3.x · e2ffd59b
      Wolfgang Denk authored
      * Cleanup confusing use of CONFIG_ETH*ADDR - ust his only to
        pre-define a MAC address; use CONFIG_HAS_ETH* to enable support for
        additional ethernet addresses.
      
      * Cleanup drivers/i82365.c - avoid duplication of code
      
      * Fix bogus "cannot span across banks" flash error message
      
      * Add support for CompactFlash for the CPC45 Board.
      e2ffd59b
  34. Mar 23, 2004
    • Wolfgang Denk's avatar
      * Patches by Thomas Viehweger, 16 Mar 2004: · 4b9206ed
      Wolfgang Denk authored
        - show PCI clock frequency on MPC8260 systems
        - add FCC_PSMR_RMII flag for HiP7 processors
        - in do_jffs2_fsload(), take load address from load_addr if not set
          explicit, update load_addr otherwise
        - replaced printf by putc/puts when no formatting is needed
          (smaller code size, faster execution)
      4b9206ed
  35. Jan 02, 2004
    • Wolfgang Denk's avatar
      * Cleanup lowboot code for MPC5200 · d4ca31c4
      Wolfgang Denk authored
      * Minor code cleanup (coding style)
      
      * Patch by Reinhard Meyer, 30 Dec 2003:
        - cpu/mpc5xxx/fec.c: added CONFIG_PHY_ADDR, added CONFIG_PHY_TYPE,
        - added CONFIG_PHY_ADDR to include/configs/IceCube.h,
        - turned debug print of PHY registers into a function (called in two places)
        - added support for EMK MPC5200 based modules
      
      * Fix MPC8xx PLPRCR_MFD_SHIFT typo
      
      * Add support for TQM866M modules
      
      * Fixes for TQM855M with 4 MB flash (Am29DL163 = _no_ mirror bit flash)
      
      * Fix a few compiler warnings
      d4ca31c4
  36. Dec 09, 2003
  37. Dec 06, 2003
    • Wolfgang Denk's avatar
      * Patch by Nicolas Lacressonnire, 12 Nov 2003: · 5779d8d9
      Wolfgang Denk authored
        update for for Atmel AT91RM9200DK development kit:
        - support for environment variables in DataFlash
        - Atmel DataFlash AT45DB1282 support
      
      * Patch by Jeff Carr, 11 Nov 2003:
        add support for new version of 8270 processors
      
      * Patches by George G. Davis, 05 Nov 2003:
        - only pass the ARM linux initrd tag to the kernel when an initrd
          is actually present
        - update omap1510inn configuration file
      5779d8d9
Loading