1. 04 Jul, 2010 1 commit
    • 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
  2. 13 Apr, 2010 1 commit
  3. 04 Apr, 2009 1 commit
  4. 23 Feb, 2009 1 commit
  5. 08 Dec, 2008 1 commit
  6. 28 Oct, 2008 1 commit
    • Kumar Gala's avatar
      bootm: Add subcommands · 49c3a861
      Kumar Gala authored
      Add the ability to break the steps of the bootm command into several
      subcommands: start, loados, ramdisk, fdt, bdt, cmdline, prep, go.
      
      This allows us to do things like manipulate device trees before
      they are passed to a booting kernel or setup memory for a secondary
      core in multicore situations.
      
      Not all OS types support all subcommands (currently only start, loados,
      ramdisk, fdt, and go are supported).
      Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
      49c3a861
  7. 10 Sep, 2008 1 commit
  8. 26 Aug, 2008 3 commits
  9. 11 Aug, 2008 1 commit
  10. 18 Apr, 2008 1 commit
    • Marian Balakowicz's avatar
      Restore the ability to continue booting after legacy image overwrite · cb1c4896
      Marian Balakowicz authored
      Before new uImage code was merged, bootm code allowed for the kernel image to
      get overwritten during decompresion. new uImage introduced a check for image
      overwrites and refused to boot the image that got overwritten. This patch
      restores the old behavior. It also adds a warning when the image overwriten is
      a multi-image file, because in such case accessing componentes other than the
      first one will fail.
      Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
      cb1c4896
  11. 12 Mar, 2008 2 commits
  12. 29 Feb, 2008 2 commits
  13. 27 Feb, 2008 1 commit
  14. 25 Feb, 2008 1 commit
    • Marian Balakowicz's avatar
      [new uImage] Add dual format uImage support framework · d5934ad7
      Marian Balakowicz authored
      This patch adds framework for dual format images. Format detection is added
      and the bootm controll flow is updated to include cases for new FIT format
      uImages.
      
      When the legacy (image_header based) format is detected appropriate
      legacy specific handling is invoked. For the new (FIT based) format uImages
      dual boot framework has a minial support, that will only print out a
      corresponding debug messages. Implementation of the FIT specific handling will
      be added in following patches.
      Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
      d5934ad7
  15. 07 Feb, 2008 4 commits
  16. 13 Jul, 2007 1 commit
  17. 14 Apr, 2007 1 commit
    • Haavard Skinnemoen's avatar
      AVR32: Resource management rewrite · df548d3c
      Haavard Skinnemoen authored
      Rewrite the resource management code (i.e. I/O memory, clock gating,
      gpio) so it doesn't depend on any global state. This is necessary
      because this code is heavily used before relocation to RAM, so we
      can't write to any global variables.
      
      As an added bonus, this makes u-boot's memory footprint a bit smaller,
      although some functionality has been left out; all clocks are enabled
      all the time, and there's no checking for gpio line conflicts.
      Signed-off-by: default avatarHaavard Skinnemoen <hskinnemoen@atmel.com>
      df548d3c
  18. 24 Oct, 2006 1 commit