Skip to content
Snippets Groups Projects
  1. Sep 09, 2011
    • Simon Glass's avatar
      Add assert() for debug assertions · 21726a7a
      Simon Glass authored
      
      assert() is like BUG_ON() but compiles to nothing unless DEBUG is defined.
      This is useful when a condition is an error but a board reset is unlikely
      to fix it, so it is better to soldier on in hope. Assertion failures should
      be caught during development/test.
      
      It turns out that assert() is defined separately in a few places in U-Boot
      with various meanings. This patch cleans up some of these.
      
      Build errors exposed by this change (and defining DEBUG) are also fixed in
      this patch.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      21726a7a
  2. Jul 28, 2011
    • Heiko Schocher's avatar
      panic: remove warning "'noreturn' function does return" · 40e01881
      Heiko Schocher authored
      
      since commit
      
      commit d2e8b911
      Author: Mike Frysinger <vapier@gentoo.org>
      Date:   Wed Jun 29 11:58:04 2011 +0000
      
          panic: add noreturn attribute
      
      I see the following warnings:
      
      vsprintf.c: In function 'panic':
      vsprintf.c:730: warning: 'noreturn' function does return
      
      for nearly all boards. This patch fixes this warning.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      cc: Mike Frysinger <vapier@gentoo.org>
      40e01881
  3. May 12, 2011
  4. Nov 28, 2010
  5. 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
  6. Apr 13, 2010
  7. Dec 08, 2009
  8. Jul 26, 2009
  9. Apr 04, 2009
  10. Mar 20, 2009
    • Mike Frysinger's avatar
      vsprintf: pull updates from Linux kernel · 6c6166f5
      Mike Frysinger authored
      
      This brings in support for the %p modifier which allows us to easily print
      out things like ip addresses, mac addresses, and pointers.
      
      It also converts the rarely used 'q' length modifier to the common 'L'
      modifier when dealing with quad types.
      
      While this new code is a bit larger (~1k .text), most of it should be made
      up by converting the existing ip/mac address code to use format modifiers.
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      6c6166f5
  11. Nov 19, 2008
    • Kyungmin Park's avatar
      UBI: Add basic UBI support to U-Boot (Part 6/8) · 7e6ee7ad
      Kyungmin Park authored
      
      This patch adds basic UBI (Unsorted Block Image) support to U-Boot.
      It's based on the Linux UBI version and basically has a "OS"
      translation wrapper that defines most Linux specific calls
      (spin_lock() etc.) into no-ops. Some source code parts have been
      uncommented by "#ifdef UBI_LINUX". This makes it easier to compare
      this version with the Linux version and simplifies future UBI
      ports/bug-fixes from the Linux version.
      
      Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      7e6ee7ad
  12. Oct 18, 2008
  13. Jul 14, 2008
  14. Jan 11, 2008
  15. Mar 14, 2004
  16. Mar 13, 2004
    • Wolfgang Denk's avatar
      * Patch by Rune Torgersen, 27 Feb 2004: · c40b2956
      Wolfgang Denk authored
        - Added LBA48 support (CONFIG_LBA48 & CFG_64BIT_LBA)
        - Added support for 64bit printing in vsprintf (CFG_64BIT_VSPRINTF)
        - Added support for 64bit strtoul (CFG_64BIT_STRTOUL)
      
      * Patch by Masami Komiya, 27 Feb 2004:
        Fix rarpboot: add autoload by NFS
      
      * Patch by Dan Eisenhut, 26 Feb 2004:
        fix flash_write return value in saveenv
      
      * Patch by Stephan Linz, 11 Dec 2003
        expand config.mk to avoid trigraph warnings on NIOS
      
      * Rename "BMS2003" board into "HMI10"
      c40b2956
  17. Jun 27, 2003
    • Wolfgang Denk's avatar
      * Code cleanup: · 8bde7f77
      Wolfgang Denk authored
        - remove trailing white space, trailing empty lines, C++ comments, etc.
        - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
      
      * Patches by Kenneth Johansson, 25 Jun 2003:
        - major rework of command structure
          (work done mostly by Michal Cendrowski and Joakim Kristiansen)
      8bde7f77
  18. Jun 19, 2003
    • Wolfgang Denk's avatar
      Patches by Murray Jensen, 17 Jun 2003: · 6dd652fa
      Wolfgang Denk authored
      - Hymod board database mods: add "who" field and new xilinx chip types
      - provide new "init_cmd_timeout()" function so code external to
        "common/main.c" can use the "reset_cmd_timeout()" function before
        entering the main loop
      - add DTT support for adm1021 (new file dtt/adm1021.c; config
        slightly different. see include/configs/hymod.h for an example
        (requires CONFIG_DTT_ADM1021, CONFIG_DTT_SENSORS, and
        CFG_DTT_ADM1021 defined)
      - add new "eeprom_probe()" function which has similar args and
        behaves in a similar way to "eeprom_read()" etc.
      - add 8260 FCC ethernet loopback code (new "eth_loopback_test()"
        function which is enabled by defining CONFIG_ETHER_LOOPBACK_TEST)
      - gdbtools copyright update
      - ensure that set_msr() executes the "sync" and "isync" instructions
        after the "mtmsr" instruction in cpu/mpc8260/interrupts.c
      - 8260 I/O ports fix: Open Drain should be set last when configuring
      - add SIU IRQ defines for 8260
      - allow LDSCRIPT override and OBJCFLAGS initialization: change to
        config.mk to allow board configurations to override the GNU
        linker script, selected via the LDSCRIPT, make variable, and to
        give an initial value to the OBJCFLAGS make variable
      - 8260 i2c enhancement:
        o correctly extends the timeout depending on the size of all
          queued messages for both transmit and receive
        o will not continue with receive if transmit times out
        o ensures that the error callback is done for all queued tx
          and rx messages
        o correctly detects both tx and rx timeouts, only delivers one to
          the callback, and does not overwrite an earlier error
        o logic in i2c_probe now correct
      - add "vprintf()" function so that "panic()" function can be
        technically correct
      - many Hymod board changes
      6dd652fa
  19. Aug 30, 2002
Loading