Skip to content
Snippets Groups Projects
  1. Oct 21, 2010
  2. 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
  3. Apr 13, 2010
  4. Oct 28, 2008
    • 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
  5. Oct 18, 2008
  6. Sep 19, 2008
  7. Sep 10, 2008
  8. Aug 26, 2008
  9. Aug 11, 2008
  10. Apr 18, 2008
  11. Mar 26, 2008
  12. Mar 12, 2008
  13. Feb 29, 2008
  14. Feb 27, 2008
  15. Feb 25, 2008
    • 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
  16. Feb 07, 2008
    • Marian Balakowicz's avatar
      [new uImage] Use image API in SH do_bootm_linux() routine · 82850f3d
      Marian Balakowicz authored
      
      Introduce image handling API for lately added Hitachi SH architecture.
      
      Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
      82850f3d
    • Marian Balakowicz's avatar
      [new uImage] Rename architecture specific bootm code files · 4a995ede
      Marian Balakowicz authored
      
      Implementation of the do_bootm_linux() and other bootm helper routines is
      architecture specific code. As such it resides in lib_<arch> directories
      in files named <arch>_linux.c
      
      This patch renames those files to a more clear and accurate
      lib_<arch>/bootm.c form.
      
      List of the renamed files:
         lib_arm/armlinux.c -> lib_arm/bootm.c
         lib_avr32/avr32_linux.c -> lib_avr32/bootm.c
         lib_blackfin/bf533_linux.c -> lib_blackfin/bootm.c
         lib_i386/i386_linux.c -> lib_i386/bootm.c
         lib_m68k/m68k_linux.c -> lib_m68k/bootm.c
         lib_microblaze/microblaze_linux.c -> lib_microblaze/bootm.c
         lib_mips/mips_linux.c -> lib_mips/bootm.c
         lib_nios/nios_linux.c -> lib_nios/bootm.c
         lib_nios2/nios_linux.c -> lib_nios2/bootm.c
         lib_ppc/ppc_linux.c -> lib_ppc/bootm.c
         lib_sh/sh_linux.c -> lib_sh/bootm.c
      
      Signed-off-by: default avatarMarian Balakowicz <m8@semihalf.com>
      4a995ede
  17. Dec 27, 2007
  18. Sep 22, 2007
  19. May 13, 2007
Loading