Skip to content
Snippets Groups Projects
  1. Sep 19, 2010
  2. Aug 03, 2010
    • Wolfgang Denk's avatar
      Rename getenv_r() into getenv_f() · cdb74977
      Wolfgang Denk authored
      
      While running from flash, i. e. before relocation, we have only a
      limited C runtime environment without writable data segment. In this
      phase, some configurations (for example with environment in EEPROM)
      must not use the normal getenv(), but a special function.  This
      function had been called getenv_r(), with the idea that the "_r"
      suffix would mean the same as in the _r_eentrant versions of some of
      the C library functions (for example getdate vs. getdate_r, getgrent
      vs. getgrent_r, etc.).
      
      Unfortunately this was a misleading name, as in U-Boot the "_r"
      generally means "running from RAM", i. e. _after_ relocation.
      
      To avoid confusion, rename into getenv_f() [as "running from flash"]
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Acked-by: default avatarDetlev Zundel <dzu@denx.de>
      cdb74977
  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
    • Wolfgang Denk's avatar
      Make *printf() return "int" instead of "void" · d9c27253
      Wolfgang Denk authored
      
      Change the return type of the *printf() functions to the standard
      "int"; no changes are needed but returning the already available
      length count.
      
      This will save a few additional strlen() calls later...
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      d9c27253
  4. May 06, 2010
  5. May 05, 2010
  6. Apr 13, 2010
  7. Feb 12, 2010
  8. Feb 05, 2010
  9. Feb 01, 2010
  10. Jan 27, 2010
  11. Jan 17, 2010
    • Heiko Schocher's avatar
      cmd_eeprom: I2C updates · 548738b4
      Heiko Schocher authored
      
      - CONFIG_ENV_EEPROM_IS_ON_I2C
        define this, if you have I2C and SPI activated, and your
        EEPROM, which holds the environment, is on the I2C bus.
      
      - CONFIG_I2C_ENV_EEPROM_BUS
        if you have an Environment on an EEPROM reached over
        I2C muxes, you can now define, how to reach this
        EEPROM.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      548738b4
    • Dirk Behme's avatar
      Make getenv_IPaddr() global · 6a45e384
      Dirk Behme authored
      
      There are boards out there that do not have network support in
      U-Boot (CONFIG_CMD_NET not set), but they do so in Linux. This
      makes it desirable to be able to port network configuration (like
      the IP address) to the Linux kernel.
      
      We should not make the passing of the IP configuration to Linux
      dependent on U-Boot features / settings.
      
      For this, make getenv_IPaddr() global. This fixes build error
      
      u-boot/lib_xxx/board.c:360: undefined reference to `getenv_IPaddr'
      
      on various architectures.
      
      Signed-off-by: default avatarDirk Behme <dirk.behme@googlemail.com>
      Acked-by: default avatarBen Warren <biggerbadderben@gmail.com>
      6a45e384
  12. Dec 21, 2009
  13. Dec 08, 2009
  14. Dec 05, 2009
    • Ingo van Lil's avatar
      Generic udelay() with watchdog support · 3eb90bad
      Ingo van Lil authored
      
      According to the PPC reference implementation the udelay() function is
      responsible for resetting the watchdog timer as frequently as needed.
      Most other architectures do not meet that requirement, so long-running
      operations might result in a watchdog reset.
      
      This patch adds a generic udelay() function which takes care of
      resetting the watchdog before calling an architecture-specific
      __udelay().
      
      Signed-off-by: default avatarIngo van Lil <inguin@gmx.de>
      3eb90bad
  15. Nov 27, 2009
  16. Nov 20, 2009
  17. Oct 27, 2009
  18. Oct 18, 2009
    • Mike Frysinger's avatar
      env: only build env_embedded and envcrc when needed · 6dab6add
      Mike Frysinger authored
      
      The env code is protected by the ENV_IS_EMBEDDED define, so attempting to
      compile the code when this isn't defined is pointless.  Now that the env
      headers have unified around CONFIG_ENV_IS_EMBEDDED, convert the build
      system to only build the env objects when this is enabled.  And now that
      the env code is conditionally compiled, we can drop the source code checks.
      
      For people who want to extract the environment manually, add a new option
      CONFIG_BUILD_ENVCRC that only enables the envcrc utility.
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      6dab6add
  19. Oct 03, 2009
  20. Sep 10, 2009
  21. Aug 28, 2009
  22. Jul 27, 2009
  23. Jul 26, 2009
    • Wolfgang Denk's avatar
      Make include/common.h usable by assembler code · fcd3c87e
      Wolfgang Denk authored
      
      Commit 70ebf316 factored out the ROUND() macro into include/common.h,
      not realizing that the primary use of this macro on AT91 systems was
      in start.S where common.h was not included, and could not be included
      because it contains a lot of C code which the assembler doesn't
      understand.
      
      This patch wraps such code in common.h in a "#ifndef __ASSEMBLY__"
      construct, and then adds an include to cpu/arm926ejs/start.S thus
      solving the problem.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      fcd3c87e
  24. Jul 22, 2009
  25. Jul 10, 2009
  26. Jul 08, 2009
  27. Jul 06, 2009
  28. Jun 12, 2009
    • Peter Tyser's avatar
      83xx: Replace CONFIG_MPC83XX with CONFIG_MPC83xx · 0f898604
      Peter Tyser authored
      
      Use the standard lowercase "xx" capitalization that other Freescale
      architectures use for CPU defines to prevent confusion and errors
      
      Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
      0f898604
    • Wolfgang Denk's avatar
      MPC512x: remove include/mpc512x.h · 3b74e7ec
      Wolfgang Denk authored
      
      Move needed definitions (register descriptions etc.) from
      include/mpc512x.h  into  include/asm-ppc/immap_512x.h.
      
      Instead of using a #define'd register offset, use a function that
      provides the PATA controller's base address.
      
      All the rest of include/mpc512x.h are register offset definitions
      which can be eliminated by proper use of C structures.
      
      There are only a few register offsets remaining that are needed in
      cpu/mpc512x/start.S; for these we provide cpu/mpc512x/asm-offsets.h
      which is intended as a temporary workaround only. In a later patch
      this file will be removed, too, and then auto-generated from the
      respective C structs.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: John Rigby <jcrigby@gmail.com>
      3b74e7ec
    • Mike Frysinger's avatar
      Add support for Linux-like kallsysms · ecb1dc89
      Mike Frysinger authored
      
      The kernel stores address<->symbol names in it so things can be decoded at
      runtime.  Do it in U-Boot, and we get nice symbol decoding when crashing.
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      ecb1dc89
  29. Apr 04, 2009
  30. Apr 03, 2009
    • Wolfgang Denk's avatar
      Add "source" command; prepare removal of "autoscr" command · 74de7aef
      Wolfgang Denk authored
      
      According to the doc/feature-removal-schedule.txt, the "autoscr"
      command will be replaced by the "source" command in approximately 6
      months from now.
      
      This patch prepares this change and starts a 6 month transition
      period as follows:
      
      - The new "source" command has been added, which implements exactly
        the same functionlaity as the old "autoscr" command before
      - The old "autoscr" command name is kept as an alias for compatibility
      - Command sequences, script files atc. have been adapted to use the
        new "source" command
      - Related environment variables ("autoscript", "autoscript_uname")
        have *not* been adapted yet; these will be renamed resp. removed in
        a separate patch when the support for the "autoscr" command get's
        finally dropped.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      74de7aef
  31. Mar 20, 2009
    • Mike Frysinger's avatar
      boards: get mac address from env and move load_sernum_ethaddr() to board init · 9c150102
      Mike Frysinger authored
      
      The environment is the canonical storage location of the mac address, so
      we're killing off the global data location and moving everything to
      querying the env directly.
      
      Rather than have common ppc code call a board-specific function like
      load_sernum_ethaddr(), have each board call it in its own board-specific
      misc_init_r() function.
      
      The boards that get converted here are:
      	- kup4k/kup4x
      	- pcs440ep
      	- tqm8xx
      
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
      CC: Ben Warren <biggerbadderben@gmail.com>
      CC: Stefan Roese <sr@denx.de>
      9c150102
Loading