Skip to content
Snippets Groups Projects
  1. Sep 19, 2010
    • Heiko Schocher's avatar
      relocation: fixup cmdtable · 620f1f6a
      Heiko Schocher authored
      
      fixup_cmdtable() did all work for fixing up the cmdtable,
      if CONFIG_RELOC_FIXUP_WORKS is not defined.
      
      CONFIG_RELOC_FIXUP_WORKS is missing for i386! I talked
      with Graeme Russ, and he will fix this soon.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      620f1f6a
    • Wolfgang Denk's avatar
      New implementation for internal handling of environment variables. · ea882baf
      Wolfgang Denk authored
      
      Motivation:
      
      * Old environment code used a pessimizing implementation:
        - variable lookup used linear search => slow
        - changed/added variables were added at the end, i. e. most
          frequently used variables had the slowest access times => slow
        - each setenv() would calculate the CRC32 checksum over the whole
          environment block => slow
      * "redundant" envrionment was locked down to two copies
      * No easy way to implement features like "reset to factory defaults",
        or to select one out of several pre-defined (previously saved) sets
        of environment settings ("profiles")
      * No easy way to import or export environment settings
      
      ======================================================================
      
      API Changes:
      
      - Variable names starting with '#' are no longer allowed
      
        I didn't find any such variable names being used; it is highly
        recommended to follow standard conventions and start variable names
        with an alphanumeric character
      
      - "printenv" will now print a backslash at the end of all but the last
        lines of a multi-line variable value.
      
        Multi-line variables have never been formally defined, allthough
        there is no reason not to use them. Now we define rules how to deal
        with them, allowing for import and export.
      
      - Function forceenv() and the related code in saveenv() was removed.
        At the moment this is causing build problems for the only user of
        this code (schmoogie - which has no entry in MAINTAINERS); may be
        fixed later by implementing the "env set -f" feature.
      
      Inconsistencies:
      
      - "printenv" will '\\'-escape the '\n' in multi-line variables, while
        "printenv var" will not do that.
      
      ======================================================================
      
      Advantages:
      
      - "printenv" output much better readable (sorted)
      - faster!
      - extendable (additional variable properties can be added)
      - new, powerful features like "factory reset" or easy switching
        between several different environment settings ("profiles")
      
      Disadvantages:
      
      - Image size grows by typically 5...7 KiB (might shrink a bit again on
        systems with redundant environment with a following patch series)
      
      ======================================================================
      
      Implemented:
      
      - env command with subcommands:
      
        - env print [arg ...]
      
          same as "printenv": print environment
      
        - env set [-f] name [arg ...]
      
          same as "setenv": set (and delete) environment variables
      
          ["-f" - force setting even for read-only variables - not
          implemented yet.]
      
        - end delete [-f] name
      
          not implemented yet
      
          ["-f" - force delete even for read-only variables]
      
        - env save
      
          same as "saveenv": save environment
      
        - env export [-t | -b | -c] addr [size]
      
          export internal representation (hash table) in formats usable for
          persistent storage or processing:
      
      	-t:	export as text format; if size is given, data will be
      		padded with '\0' bytes; if not, one terminating '\0'
      		will be added (which is included in the "filesize"
      		setting so you can for exmple copy this to flash and
      		keep the termination).
      	-b:	export as binary format (name=value pairs separated by
      		'\0', list end marked by double "\0\0")
      	-c:	export as checksum protected environment format as
      		used for example by "saveenv" command
      	addr:	memory address where environment gets stored
      	size:	size of output buffer
      
      	With "-c" and size is NOT given, then the export command will
      	format the data as currently used for the persistent storage,
      	i. e. it will use CONFIG_ENV_SECT_SIZE as output block size and
      	prepend a valid CRC32 checksum and, in case of resundant
      	environment, a "current" redundancy flag. If size is given, this
      	value will be used instead of CONFIG_ENV_SECT_SIZE; again, CRC32
      	checksum and redundancy flag will be inserted.
      
      	With "-b" and "-t", always only the real data (including a
      	terminating '\0' byte) will be written; here the optional size
      	argument will be used to make sure not to overflow the user
      	provided buffer; the command will abort if the size is not
      	sufficient. Any remainign space will be '\0' padded.
      
              On successful return, the variable "filesize" will be set.
              Note that filesize includes the trailing/terminating '\0'
              byte(s).
      
              Usage szenario: create a text snapshot/backup of the current
      	settings:
      
      		=> env export -t 100000
      		=> era ${backup_addr} +${filesize}
      		=> cp.b 100000 ${backup_addr} ${filesize}
      
      	Re-import this snapshot, deleting all other settings:
      
      		=> env import -d -t ${backup_addr}
      
        - env import [-d] [-t | -b | -c] addr [size]
      
          import external format (text or binary) into hash table,
          optionally deleting existing values:
      
      	-d:	delete existing environment before importing;
      		otherwise overwrite / append to existion definitions
      	-t:	assume text format; either "size" must be given or the
      		text data must be '\0' terminated
      	-b:	assume binary format ('\0' separated, "\0\0" terminated)
      	-c:	assume checksum protected environment format
      	addr:	memory address to read from
      	size:	length of input data; if missing, proper '\0'
      		termination is mandatory
      
        - env default -f
      
          reset default environment: drop all environment settings and load
          default environment
      
        - env ask name [message] [size]
      
          same as "askenv": ask for environment variable
      
        - env edit name
      
          same as "editenv": edit environment variable
      
        - env run
      
          same as "run": run commands in an environment variable
      
      ======================================================================
      
      TODO:
      
      - drop default env as implemented now; provide a text file based
        initialization instead (eventually using several text files to
        incrementally build it from common blocks) and a tool to convert it
        into a binary blob / object file.
      
      - It would be nice if we could add wildcard support for environment
        variables; this is needed for variable name auto-completion,
        but it would also be nice to be able to say "printenv ip*" or
        "printenv *addr*"
      
      - Some boards don't link any more due to the grown code size:
        DU405, canyonlands, sequoia, socrates.
      
      	=> cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>,
      	       Stefan Roese <sr@denx.de>,
      	       Heiko Schocher <hs@denx.de>
      
      - Dropping forceenv() causes build problems on schmoogie
      
      	=> cc: Sergey Kubushyn <ksi@koi8.net>
      
      - Build tested on PPC and ARM only; runtime tested with NOR and NAND
        flash only => needs testing!!
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>,
      Cc: Stefan Roese <sr@denx.de>,
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Sergey Kubushyn <ksi@koi8.net>
      ea882baf
  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 05, 2010
  5. Nov 22, 2009
  6. 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
    • Wolfgang Denk's avatar
      Make "usage" messages more helpful. · 94796d85
      Wolfgang Denk authored
      
      In case of incorrect command invocations U-Boot used to print pretty
      useless "usage" messages, for example:
      
      	=> nand markbad
      	Usage:
      	nand - NAND sub-system
      
      In the result, the user would have to run the "help" command to get
      the (available) information about correct command usage. Change this,
      so that this information gets always printed.
      
      Note that this changes the user interface of all commands, but
      hopefully to the better.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      94796d85
  7. Mar 27, 2009
  8. Jan 28, 2009
  9. Oct 18, 2008
  10. Sep 10, 2008
  11. May 20, 2008
    • Wolfgang Denk's avatar
      Big white-space cleanup. · 53677ef1
      Wolfgang Denk authored
      
      This commit gets rid of a huge amount of silly white-space issues.
      Especially, all sequences of SPACEs followed by TAB characters get
      removed (unless they appear in print statements).
      
      Also remove all embedded "vim:" and "vi:" statements which hide
      indentation problems.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      53677ef1
  12. Jul 10, 2007
  13. Jul 08, 2007
  14. Jul 03, 2007
  15. Mar 12, 2006
  16. Apr 06, 2005
    • Wolfgang Denk's avatar
      * Patches by Robert Whaley, 29 Nov 2004: · 20787e23
      Wolfgang Denk authored
        - update the pxa-regs.h file for PXA27x chips
        - add PXA27x based ADSVIX board
        - add support for MMC on PXA27x processors
      
      * Patch by Andrew E. Mileski, 28 Nov 2004:
        Fix PPC4xx SPD SDRAM detection bug
      
      * Patch by Hiroshi Ito, 26 Nov 2004:
        Fix logic of "test -z" and "test -n" commands
      20787e23
  17. Apr 18, 2004
    • Wolfgang Denk's avatar
      * Cleanup, minor fixes · 6e592385
      Wolfgang Denk authored
      * Patch by Rune Torgersen, 16 Apr 2004:
        LBA48 fixes
      
      * Patches by Pantelis Antoniou, 16 Apr 2004:
        - Fix some compile problems;
          add "once" functionality for the netretry variable
      6e592385
    • Wolfgang Denk's avatar
      Patches by Pantelis Antoniou, 16 Apr 2004: · c26e454d
      Wolfgang Denk authored
      - add support for a new version of an Intracom board and fix
        various other things on others.
      - add verify support to the crc32 command (define
        CONFIG_CRC32_VERIFY to enable it)
      - fix FEC driver for MPC8xx systems:
        1. fix compilation problems for boards that use dynamic
           allocation of DPRAM
        2. shut down FEC after network transfers
      - HUSH parser fixes:
        1. A new test command was added. This is a simplified version of
           the one in the bourne shell.
        2. A new exit command was added which terminates the current
           executing script.
        3. Fixed handing of $? (exit code of last executed command)
      c26e454d
  18. Apr 15, 2004
    • Wolfgang Denk's avatar
      * Patches by Pantelis Antoniou, 30 Mar 2004: · 04a85b3b
      Wolfgang Denk authored
        - add auto-complete support to the U-Boot CLI
        - add support for NETTA and NETPHONE boards; fix NETVIA board
      
      * Patch by Yuli Barcohen, 28 Mar 2004:
        - Add support for MPC8272 family including MPC8247/8248/8271/8272
        - Add support for MPC8272ADS evaluation board (another flavour of MPC8260ADS)
        - Change configuration method for MPC8260ADS family
      04a85b3b
  19. Jul 01, 2003
  20. Jun 29, 2003
  21. Jun 28, 2003
  22. Jun 27, 2003
  23. Jun 15, 2003
  24. Jun 05, 2003
    • Wolfgang Denk's avatar
      * Add support for RMU board · 73a8b27c
      Wolfgang Denk authored
      * Add support for TQM862L at 100/50 MHz
      
      * Patch by Pantelis Antoniou, 02 Jun 2003:
        major reconstruction of networking code;
        add "ping" support (outgoing only!)
      73a8b27c
  25. May 31, 2003
    • Wolfgang Denk's avatar
      * Patch by Marc Singer, 29 May 2003: · 7a8e9bed
      Wolfgang Denk authored
        Fixed rarp boot method for IA32 and other little-endian CPUs.
      
      * Patch by Marc Singer, 28 May 2003:
        Added port I/O commands.
      
      * Patch by Matthew McClintock, 28 May 2003
        - cpu/mpc824x/start.S: fix relocation code when booting from RAM
        - minor patches for utx8245
      
      * Patch by Daniel Engström, 28 May 2003:
        x86 update
      
      * Patch by Dave Ellis, 9 May 2003 + 27 May 2003:
        add nand flash support to SXNI855T configuration
        fix/extend nand flash support:
        - fix 'nand erase' command so does not erase bad blocks
        - fix 'nand write' command so does not write to bad blocks
        - fix nand_probe() so handles no flash detected properly
        - add doc/README.nand
        - add .jffs2 and .oob options to nand read/write
        - add 'nand bad' command to list bad blocks
        - add 'clean' option to 'nand erase' to write JFFS2 clean markers
        - make NAND read/write faster
      
      * Patch by Rune Torgersen, 23 May 2003:
        Update for MPC8266ADS board
  26. Apr 20, 2003
    • Wolfgang Denk's avatar
      * Make sure Block Lock Bits get cleared in R360MPI flash driver · d791b1dc
      Wolfgang Denk authored
      * MPC823 LCD driver: Fill color map backwards, to allow for steady
        display when Linux takes over
      
      * Patch by Erwin Rol, 27 Feb 2003:
        Add support for RTEMS (this time for real).
      
      * Add support for "bmp info" and "bmp display" commands to load
        bitmap images; this can be used (for example in a "preboot"
        command) to display a splash screen very quickly after poweron.
      
      * Add support for 133 MHz clock on INCA-IP board
      d791b1dc
  27. Mar 26, 2003
    • Wolfgang Denk's avatar
      * Patch by Rick Bronson, 16 Mar 2003: · dc7c9a1a
      Wolfgang Denk authored
        Add support for Atmel AT91RM9200DK w/NAND
      
      * Patches by Robert Schwebel, 19 Mar 2003:
        - use arm-linux-gcc as default compiler for ARM
        - fix i2c fixup code
        - fix missing baudrate setting
        - added $loadaddr / CFG_LOAD_ADDR support to loadb
        - moved "ignoring trailing characters" _before_ u-boot wants to
          print out diagnostics messages; removes bogus characters at the
          end of transmission
      
      * Patch by John Zhan, 18 Mar 2003:
        Add support for SinoVee Microsystems SC8xx boards
      
      * Patch by Rolf Offermanns, 21 Mar 2003:
        ported the dnp1110 related changes from the current armboot cvs to
        current u-boot cvs. smc91111 does not work. problem marked in
        smc91111.c, grep for "FIXME".
      
      * Patch by Brian Auld, 25 Mar 2003:
        Add support for STM flash chips on ebony board
      
       * Add PCI support for MPC8250 Boards (PM825 module)
      
       * Patch by Stefan Roese, 25 Mar 2003:
      dc7c9a1a
  28. Nov 19, 2002
    • Wolfgang Denk's avatar
      * Patch by Thomas Frieden, 13 Nov 2002: · c7de829c
      Wolfgang Denk authored
        Add code for AmigaOne board
        (preliminary merge to U-Boot, still WIP)
      
      * Patch by Jon Diekema, 12 Nov 2002:
        - Adding URL for IEEE OUI lookup
        - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED
          being defined.
        - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and
          root-on-nfs macros are designed to switch how the default boot
          method gets defined.
      c7de829c
  29. Nov 18, 2002
  30. Nov 11, 2002
    • Wolfgang Denk's avatar
      * Patch by Andreas Oberritter, 09 Nov 2002: · eb9401e3
      Wolfgang Denk authored
        Change behaviour of NetLoop(): return -1 for errors, filesize
        otherwise; return code 0 is valid an means no file loaded - in this
        case the environment still gets updated!
      
      * Patches by Jon Diekema, 9 Nov 2002:
        - improve ADC/DAC clocking on the SACSng board to align
          the failing edges of LRCLK and SCLK
        - sbc8260 configuration tweaks
        - add status LED support for 82xx systems
        - wire sspi/sspo commands into command handler; improved error
          handlering
        - add timestamp support and alternate memory test to the
          SACSng configuration
      eb9401e3
  31. Nov 05, 2002
  32. Oct 19, 2002
Loading