1. 20 9月, 2010 16 次提交
    • 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
    • W
      Remove support for CONFIG_HAS_UID and "forceenv" command · 6d014adf
      Wolfgang Denk 提交于
      This (undocumented) concept was only in use for the MVSMR and
      davinci_schmoogie Sergey Kubushyn <ksi@koi8.net> boards.
      Drop it for now.  If really needed, it should be reimplemented
      later in the context of the new environment command set.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Cc: Andre Schwarz <andre.schwarz@matrix-vision.de>
      Cc: Sergey Kubushyn <ksi@koi8.net>
      Acked-by: NSergey Kubushyn <ksi@koi8.net>
      6d014adf
    • W
      Add hash table support as base for new environment code · a6826fbc
      Wolfgang Denk 提交于
      This implementation is based on code from uClibc-0.9.30.3 but was
      modified and extended for use within U-Boot.
      
      Major modifications and extensions:
      
      * hsearch() [modified / extended]:
        - While the standard version does not make any assumptions about
          the type of the stored data objects at all, this implementation
          works with NUL terminated strings only.
        - Instead of storing just pointers to the original objects, we
          create local copies so the caller does not need to care about the
          data any more.
        - The standard implementation does not provide a way to update an
          existing entry.  This version will create a new entry or update an
          existing one when both "action == ENTER" and "item.data != NULL".
        - hsearch_r(): Instead of returning 1 on success, we return the
          index into the internal hash table, which is also guaranteed to be
          positive.  This allows us direct access to the found hash table
          slot for example for functions like hdelete().
      * hdelete() [added]:
        - The standard implementation of hsearch(3) does not provide any way
          to delete any entries from the hash table.  We extend the code to
          do that.
      * hexport() [added]:
        - Export the data stored in the hash table in linearized form:
          Entries are exported as "name=value" strings, separated by an
          arbitrary (non-NUL, of course) separator character. This allows to
          use this function both when formatting the U-Boot environment for
          external storage (using '\0' as separator), but also when using it
          for the "printenv" command to print all variables, simply by using
          as '\n" as separator. This can also be used for new features like
          exporting the environment data as text file, including the option
          for later re-import.
        - The entries in the result list will be sorted by ascending key
          values.
      * himport() [added]:
        - Import linearized data into hash table.  This is the inverse
          function to hexport(): it takes a linear list of "name=value"
          pairs and creates hash table entries from it.
        - Entries without "value", i. e. consisting of only "name" or
          "name=", will cause this entry to be deleted from the hash table.
        - The "flag" argument can be used to control the behaviour: when
          the H_NOCLEAR bit is set, then an existing hash table will kept,
          i. e. new data will be added to an existing hash table;
          otherwise, old data will be discarded and a new hash table will
          be created.
        - The separator character for the "name=value" pairs can be
          selected, so we both support importing from externally stored
          environment data (separated by NUL characters) and from plain text
          files (entries separated by newline characters).
        - To allow for nicely formatted text input, leading white space
          (sequences of SPACE and TAB chars) is ignored, and entries
          starting (after removal of any leading white space) with a '#'
          character are considered comments and ignored.
        - NOTE: this means that a variable name cannot start with a '#'
          character.
        - When using a non-NUL separator character, backslash is used as
          escape character in the value part, allowing for example fo
          multi-line values.
        - In theory, arbitrary separator characters can be used, but only
          '\0' and '\n' have really been tested.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      a6826fbc
    • W
      Add qsort - add support for sorting data arrays · 54c6977e
      Wolfgang Denk 提交于
      Code adapted from uClibc-0.9.30.3
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      54c6977e
    • W
      Add basic errno support. · 65cd3fa8
      Wolfgang Denk 提交于
      Needed for hash table support; probably useful in a lot of other
      places as well.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      65cd3fa8
    • W
      4xx: adjust TEXT_BASE to increase U-Boot image size · a2a649d7
      Wolfgang Denk 提交于
      On some boards (canyonlands, luan, sequoia) we need more room for the
      U-Boot image to allow for new features like the new environment code.
      Shift TEXT_BASE as needed.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Acked-by: NStefan Roese <sr@denx.de>
      a2a649d7
    • W
      IceCube.h: update configuration · d2e22731
      Wolfgang Denk 提交于
      Increase malloc size,
      enable command line editing and history,
      enable hush shell.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      d2e22731
    • W
      Cleanup use of CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE · 36116650
      Wolfgang Denk 提交于
      Traditionally many boards used local definitions for SRAM base address
      and size (like SRAM_BASE, SRAM_LEN and/or SRAM_SIZE), while the (now)
      "official" names are CONFIG_SYS_SRAM_BASE and CONFIG_SYS_SRAM_SIZE.
      
      The corresponding code in arch/powerpc/lib/board.c was board specific,
      and has never actually been maintained well. Replace this by feature-
      specific code and adapt the boards that actually use this.
      
      NOTE: there is still a ton of boards using the old #defines, which
      therefor contain incorrect values in bi_sramstart and bi_sramsize.
      
      All respective board maintainers are requested to clean up their
      respective configurations.  Thanks.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Cc: Josef Wagner <Wagner@Microsys.de>
      Cc: Stefan Roese <sr@denx.de>
      Cc: Heiko Schocher <hs@denx.de>
      Cc: Wolfgang Denk <wd@denx.de>
      36116650
    • W
      4xx: add missing CONFIG_SYS_SRAM_SIZE definition · bf560807
      Wolfgang Denk 提交于
      A number of boards define CONFIG_SYS_SRAM_BASE but fail to define
      CONFIG_SYS_SRAM_SIZE which is needed when cleaning up the code that
      prints this information with the bdinfo command.
      
      Add the missing deinitions.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      Cc: Stefan Roese <sr@denx.de>
      Acked-by: NStefan Roese <sr@denx.de>
      bf560807
  2. 19 9月, 2010 9 次提交
  3. 16 9月, 2010 2 次提交
  4. 14 9月, 2010 1 次提交
  5. 13 9月, 2010 5 次提交
    • R
      display_buffer: fix misaligned buffer · 150f7236
      Reinhard Meyer 提交于
      use a union to cause necessary alignment per architecture
      Signed-off-by: NReinhard Meyer <u-boot@emk-elektronik.de>
      150f7236
    • G
      x86: Remove Unmaintained Boards · 215e1cb3
      Graeme Russ 提交于
      The SC520 CDP boards originally implemented by Daniel Engström are now
      very broken. Attempts to contact Daniel via the email address on the
      copyright notice have failed. Remove these boards from mainline
      215e1cb3
    • G
      x86: Fix x86 Cold Boot · 797960fd
      Graeme Russ 提交于
      Commit 077e1958 broke the ability of the
      x86 port to boot from a cold-reset by removing the initial IDT. Re-
      instate the initial IDT to allow cold-booting of x86 boards
      797960fd
    • G
      x86: Add do_bdinfo() · a806ee6f
      Graeme Russ 提交于
      x86 failed to compile with a message "a case for this architecture does
      not exist!" - Add do_bdinfo() for this arch
      a806ee6f
    • G
      x86: Fix do_go_exec() - const argv[] · e69c0cba
      Graeme Russ 提交于
      Commit 54841ab5 made the argv parameter
      to do_go_exec() const but did not allow for the fact that argv[-1] is
      set to point to the global data structure and relies on argv being non-
      const.
      
      With this patch, do_go_exec() creates a new copy of the argv array with
      an extra element to store global data pointer rather than simply
      clobbering an arbitrary memory location.
      e69c0cba
  6. 11 9月, 2010 2 次提交
  7. 10 9月, 2010 4 次提交
  8. 09 9月, 2010 1 次提交
    • W
      bedbug_860.c, bedbug_603e.c: Fix return type to silence compile warnings. · 40e74c85
      Wolfgang Denk 提交于
      commit 47e26b1b "cmd_usage(): simplify return code handling" caused
      the following compile warnings:
      
      bedbug_860.c: In function 'bedbug860_do_break':
      bedbug_860.c:73: warning: 'return' with a value, in function returning void
      bedbug_860.c:121: warning: 'return' with a value, in function returning void
      
      Fix the return type.
      
      Actually these files could need some cleanup - commands should
      return proper error codes, and there are coding style issues.
      => To be fixed later.
      Signed-off-by: NWolfgang Denk <wd@denx.de>
      40e74c85