1. 20 9月, 2010 40 次提交
    • W
      Remove smmaco4 board support · 9ddc3af8
      Wolfgang Denk 提交于
      Recent changes caused that the smmaco4 board now is included in the
      boards built by MAKEALL, which revealed that compilation for this
      board has been broken for a long time:
      
      mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.
      
      The board is orphaned.  Drop support for it.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      9ddc3af8
    • W
      Remove HMI10 board support · 77efe35f
      Wolfgang Denk 提交于
      Recent changes caused that the HMI10 board now is included in the
      boards built by MAKEALL, which revealed that compilation for this
      board has been broken for a long time:
      
      ps2ser.c: In function 'ps2ser_init':
      ps2ser.c:155: error: 'UART_LCR' undeclared (first use in this function)
      ps2ser.c:155: error: (Each undeclared identifier is reported only once
      ps2ser.c:155: error: for each function it appears in.)
      ps2ser.c:156: error: 'UART_DLL' undeclared (first use in this function)
      ps2ser.c:157: error: 'UART_DLM' undeclared (first use in this function)
      ps2ser.c:159: error: 'UART_IER' undeclared (first use in this function)
      ps2ser.c:160: error: 'UART_MCR' undeclared (first use in this function)
      ps2ser.c:161: error: 'UART_FCR' undeclared (first use in this function)
      ps2ser.c:162: error: 'UART_FCR_ENABLE_FIFO' undeclared (first use in this function)
      ps2ser.c:166: error: 'UART_LSR' undeclared (first use in this function)
      ps2ser.c: In function 'ps2ser_putc':
      ps2ser.c:198: error: 'UART_LSR' undeclared (first use in this function)
      ps2ser.c:200: error: 'UART_TX' undeclared (first use in this function)
      ps2ser.c: In function 'ps2ser_getc_hw':
      ps2ser.c:224: error: 'UART_LSR' undeclared (first use in this function)
      ps2ser.c:225: error: 'UART_RX' undeclared (first use in this function)
      ps2ser.c: In function 'ps2ser_interrupt':
      ps2ser.c:293: error: 'UART_IIR' undeclared (first use in this function)
      
      The board is orphaned, and AFAICT has reached EOL.
      Drop support for it.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      77efe35f
    • W
      canmb board: Fix compiler warnings · ff377b1c
      Wolfgang Denk 提交于
      Recent changes caused thatthe aev board now is included in the boards
      built by MAKEALL, which revealed that compilation for this board
      has been broken for a long time:
      
      canmb.c: In function 'initdram':
      canmb.c:109: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
      canmb.c:111: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
      canmb.c:137: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
      canmb.c:140: warning: pointer targets in passing argument 1 of 'get_ram_size' differ in signedness
      
      Fix these.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      ff377b1c
    • W
      aev board: Fix compile problems · 90964353
      Wolfgang Denk 提交于
      Recent changes caused thatthe aev board now is included in the boards
      built by MAKEALL, which revealed that compilation for this board has
      been broken for a long time:
      
      mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.
      mpc5xxx_fec.c:899:2: error: #error fec->xcv_type not initialized.
      
      Fix it.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      90964353
    • B
      da8xx: fixup ARM relocation support · 97003756
      Ben Gardiner 提交于
      Split the existing dram_init for da8xx when ARM reloc is enabled, like the
      changes to arch/arm/cpu/arm926ejs/orion5x/dram.c in
      0f234d263b17ccf1b8fd776eb8c15b7cdb27a887 by Heiko Schocher <hs@denx.de>.
      
      Without these changes gd->ram_size is '0' which leads to incorrect relocation
      when CONFIG_SYS_ARM_WITHOUT_RELOC is defined and the board does not boot.
      
      We use get_ram_size to dynamically calculate the available RAM because it runs
      on different board version with different ram, as suggested by Heiko in private
      communication.
      
      Tested on a da850evm with 128M of DDR2 installed; with both
      CONFIG_SYS_ARM_WITHOUT_RELOC defined and undefined.
      Signed-off-by: NBen Gardiner <bengardiner@nanometrics.ca>
      Reviewed-by: NSudhakar Rajashekhara <sudhakar.raj@ti.com>
      CC: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
      CC: Heiko Schocher <hs@denx.de>
      97003756
    • H
      ARM: implement relocation for arm1176 · a51dd67a
      Heiko Schocher 提交于
      Change the implementation for arm1176 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      a51dd67a
    • H
      ARM: implement relocation for arm720t · abef7b85
      Heiko Schocher 提交于
      Change the implementation for arm720t to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      abef7b85
    • H
      ARM: implement relocation for arm_intcm · c6c2ceb1
      Heiko Schocher 提交于
      Change the implementation for arm_intcm to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      c6c2ceb1
    • H
      ARM: implement relocation for lh7a40x · ec985e94
      Heiko Schocher 提交于
      Change the implementation for lh7a40x to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      ec985e94
    • H
      ARM: implement relocation for s3c44b0 · 0110955a
      Heiko Schocher 提交于
      Change the implementation for s3c44b0 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      0110955a
    • H
      ARM: implement relocation for sa1100 · e30ceca2
      Heiko Schocher 提交于
      Change the implementation for sa1100 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      e30ceca2
    • H
      ARM: implement relocation for ixp · 2af0a099
      Heiko Schocher 提交于
      Change the implementation for ixp to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      2af0a099
    • H
      ARM: implement relocation for pxa · 5347f68c
      Heiko Schocher 提交于
      Change the implementation for pxa to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      5347f68c
    • H
      ARM: implement relocation for ARM946 · 5a8a87ed
      Heiko Schocher 提交于
      Change the implementation for arm946 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      5a8a87ed
    • H
      ARM: implement relocation for ARM925 · 405d023b
      Heiko Schocher 提交于
      Change the implementation for arm925 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      405d023b
    • H
      ARM: implement relocation for ARM920 · cc7cdcbd
      Heiko Schocher 提交于
      Change the implementation for arm920 to relocate the code to
      an arbitrary address in RAM.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      cc7cdcbd
    • H
      ARM: implement relocation for ARM926 · ab86f72c
      Heiko Schocher 提交于
      Change the implementation for arm926 to relocate the code to
      an arbitrary address in RAM.
      
      Adapt the TX25 (i.MX25), magnesium board to test the changes.
      
      On the tx25 board TEXT_BASE is set to the final relocation
      address to prevent one more copying of u-boot code
      when relocating. More info see:
      doc/README.arm-relocation
      
      da850 board:
      Tested-by: NBen Gardiner <bengardiner@nanometrics.ca>
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Cc: Ben Gardiner <bengardiner@nanometrics.ca>
      ab86f72c
    • H
      ARM: implement relocation for ARM V7 (OMAP) · 561142af
      Heiko Schocher 提交于
      Change the implementation for ARM V7 to relocate the code to an
      arbitrary address in RAM.
      
      Adapt the Beagle board (Cortex A8) to test the changes.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      561142af
    • H
      ARM: implement relocation for ARM11 · e48b7c0a
      Heiko Schocher 提交于
      Change the implementation for ARM11 to relocate the code to an
      arbitrary address in RAM.
      
      Tested on the qong board.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      e48b7c0a
    • H
      ARM: add relocation support · f1d2b313
      Heiko Schocher 提交于
      !! This breaks support for all arm boards !!
      
      To compile in old style, you must define
      CONFIG_SYS_ARM_WITHOUT_RELOC or you can compile
      with "CONFIG_SYS_ARM_WITHOUT_RELOC=1 ./MAKEALL board"
      
      !! This define will be removed soon, so convert your
      board to use relocation support
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      
      Fix boot from NAND for non-ARM systems
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      f1d2b313
    • H
      nand_boot_fsl_nfc.c: make "nfc" a "static const" pointer · 4fff329d
      Heiko Schocher 提交于
      With -fPIC enabled, this variable needs an entry in the GOT, which
      causes the image size to exceed 2 KiB which is the maximum allowed for
      some systems. Making it a "static const" avoids the GOT entry and thus
      reduces the image size to < 2 KiB.
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Acked-by: NScott Wood <scottwood@freescale.com>
      4fff329d
    • H
      i2c, omap24xx: set bus_initialized only after relocation. · 1724fe9a
      Heiko Schocher 提交于
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      1724fe9a
    • H
      disk/part.c: fix relocation fixup · 23090dac
      Heiko Schocher 提交于
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      23090dac
    • H
      i2c: fix command usage help · 4444b221
      Heiko Schocher 提交于
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      4444b221
    • H
      common: move TOTAL_MALLOC_LEN to include/common.h · 3fbeeea6
      Heiko Schocher 提交于
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      3fbeeea6
    • H
      relocation: fixup cmdtable · 620f1f6a
      Heiko Schocher 提交于
      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: NHeiko Schocher <hs@denx.de>
      620f1f6a
    • H
      ARM (ARM11): add data cache support, test on Qong board · 7e4a9e6d
      Heiko Schocher 提交于
      Add data cache support for arm1136 systems.
      
      Enable "cache" command on Qong board and test performance.
      
          Test 1: Loading 127 MB of data from NAND flash into RAM:
      
          Instr. Cache	off	on	on
            Data Cache	off	off	on
          --------------------------------------------------
          QONG (ARM11)	177s	95s	43s	= x 4.1
      
          Test 2: uncompressing a gzipped image from RAM to RAM
                  (size compressed: 6.5 MiB, uncompressed: 35 MiB):
      
          Instr. Cache	off	on	on
            Data Cache	off	off	on
          --------------------------------------------------
          QONG (ARM11)	1.54s	0.95s	0.18s	= x 8.6
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      7e4a9e6d
    • H
      ARM V7 (OMAP): add data cache support, test on Beagle board · 95c6f6d3
      Heiko Schocher 提交于
      Add data cache support for ARM V7 systems. Used cache flush
      functions from linux:arch/arm/mm/cache-v7.S developed from
      Catalin Marinas.
      
      Enable "cache" command on Beagle board and test performance.
      
          Test 1: Loading 127 MB of data from NAND flash into RAM:
      
          Instr. Cache	off	on	on
            Data Cache	off	off	on
          --------------------------------------------------
          Beagle (Cortex A8)	116s	106s	30.3s	= x 3.8
      
          Test 2: uncompressing a gzipped image from RAM to RAM
                  (size compressed: 6.5 MiB, uncompressed: 35 MiB):
      
          Instr. Cache	off	on	on
            Data Cache	off	off	on
          --------------------------------------------------
          Beagle (Cortex A8)	1.84s	1.64s	0.12s	= x 15.3
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Reviewed-by: Ben Gardiner<bengardiner@nanometrics.ca>
      95c6f6d3
    • H
      ARM (ARM926ejs): add data cache support, tested on magnesium and tx25 board · c3330e9d
      Heiko Schocher 提交于
      Enable "cache" command on tx25 and magnesium board and test performance.
      
          Test 1: Loading 127 MB of data from NAND flash into RAM:
      
          Instr. Cache        off     on      on
            Data Cache        off     off     on
          --------------------------------------------------
          magnesium           32,6s   22,5s   30s     = x 1,09
          tx25 (29MB only)    9,69s   5,05s   8,16s   = x 1,19
      
          Test 2: uncompressing a gzipped image from RAM to RAM
                  (size compressed: 6.5 MiB, uncompressed: 35 MiB):
      
          Instr. Cache        off     on      on
            Data Cache        off     off     on
          --------------------------------------------------
          magnesium           4,25s   2,08s   1,72s   = x 2,47
          tx25                4,82s   2,04s   1,84s   = x 2,62
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NAlessandro Rubini <rubini@gnudd.com>
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      Cc: Alessandro Rubini <rubini@gnudd.com>
      c3330e9d
    • H
      ARM: cp15: setup mmu and enable dcache · 880eff5c
      Heiko Schocher 提交于
      This has been tested on at91sam9263 and STN8815.
      Again, I didn't check if it has bad effects
      on non-arm926 cores.
      
      Initially I had a "done" bit to only set up page tables
      at the beginning. However, since the aligmnent requirement
      was for the whole object file, this extra integer tool 16kB
      in BSS, so I chose to remove it.
      
      Also, note not all boards use PHYS_SDRAM, but it looks like
      it's the most used name (more than CONFIG_SYS_DRAM_BASE for
      example).
      
      Portions of this work were supported by funding from
      the CE Linux Forum.
      Signed-off-by: NAlessandro Rubini <rubini@gnudd.com>
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      880eff5c
    • H
      arm: get rid of bi_env · 55e97429
      Heiko Schocher 提交于
      bi_env is nowhere used, so delete it!
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      
      similar patch posted from Dirk Behme Tue Jul 27 18:36:09 CEST 2010
      http://lists.denx.de/pipermail/u-boot/2010-July/074542.html
      55e97429
    • H
      mpc52xx: Cleanup use of CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE · d1831c5e
      Heiko Schocher 提交于
      cleanup for the uc101 and the mucmc52 board.
      Signed-off-by: NHeiko Schocher <hs@denx.de>
      d1831c5e
    • M
      tools: enable img2srec for "tools-all" target · 570d7d50
      Mike Frysinger 提交于
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      570d7d50
    • M
      tools/env: use host build flags · abd315a1
      Mike Frysinger 提交于
      Convert the tools/env/Makefile to use the same host tool syntax as the
      other tool subdirs.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      abd315a1
    • M
      unify toplevel tools targets · 0358df42
      Mike Frysinger 提交于
      Most tool subdirs do not rely on a configured tree, so move those targets
      out of the config checks and unify them in the process.
      
      Also add an easylogo target so people can easily build that.
      
      Also add these new tool targets to the 'tools-all' target.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      0358df42
    • M
      tools: update .gitignore · 8e0ec82e
      Mike Frysinger 提交于
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      8e0ec82e
    • M
      MAKEALL: cut down on duplication of targets · 9ec49f8f
      Mike Frysinger 提交于
      Merge the other significant source of board name duplication with the new
      boards.cfg file.  I cleaned up most targets, but the ARM and MIPS trees
      are such a mess than I didn't bother.  If those maintainers care, they can
      take are of it.
      
      While we're at it, we can be a bit more clever in the LIST_xxx handling
      and avoid duplicating the list names too.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Reviewed-by: NBen Gardiner <bengardiner@nanometrics.ca>
      Tested-by: NThomas Chou <thomas@wytron.com.tw>
      9ec49f8f
    • M
      Makefile: restore support for board shortcut targets · 727ebd9f
      Mike Frysinger 提交于
      The helpful shortcut for doing a board config + make was dropped recently
      as it conflicted with some new build code.  However, the reason for using
      pattern targets originally was to avoid managing a duplicate list of
      boards.  Since we now have one centralized place for a list of boards (the
      new boards.cfg), we don't need a pattern target -- we can generate the
      exact list of boards on the fly.  So do just that.
      
      When cleaning things up, the top level gitignore file ignores all things
      that end with ".depend", but the clean target only deletes files that are
      named exactly ".depend".  Keep these in sync by having the clean target
      punt all files that match the pattern that gitignore is using.
      Signed-off-by: NMike Frysinger <vapier@gentoo.org>
      Acked-by: NDetlev Zundel <dzu@denx.de>
      727ebd9f
    • W
      New implementation for internal handling of environment variables. · ea882baf
      Wolfgang Denk 提交于
      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: NWolfgang 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
    • W
      Make getenv() work before relocation. · 91a76751
      Wolfgang Denk 提交于
      So far, getenv() would work before relocation is most cases, even
      though it was not intended to be used that way.  When switching to a
      hash table based implementation, this would break a number of boards.
      
      For convenience, we make getenv() check if it's running before
      relocation and, if so, use getenv_f() internally.
      
      Note that this is limited to simple cases, as we use a small static
      buffer (32 bytes) in the global data for this purpose.
      
      For this reason, it is also not a good idea to convert all current
      uses of getenv_f() into getenv() - some of the existing use cases need
      to be able to deal with longer variable values, so getenv_f() is still
      needed and recommended for use before relocation.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      91a76751