1. 20 10月, 2010 1 次提交
  2. 19 10月, 2010 3 次提交
    • J
      boot: change some arch ifdefs to feature ifdefs · fca43cc8
      John Rigby 提交于
      The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd
      are currently enabled by various combinations of CONFIG_M68K,
      CONFIG_POWERPC and CONFIG_SPARC.
      
      Use CONFIG_SYS_BOOT_<FEATURE> defines instead.
      
      CONFIG_SYS_BOOT_RAMDISK_HIGH
      CONFIG_SYS_BOOT_GET_CMDLINE
      CONFIG_SYS_BOOT_GET_KBD
      
      Define these as appropriate in arch/include/asm/config.h files.
      Signed-off-by: NJohn Rigby <john.rigby@linaro.org>
      Acked-by: NWolfgang Denk <wd@denx.de>
      fca43cc8
    • J
      common/image.c remove extra calls to be32_to_cpu in boot_get_fdt · d1263fce
      John Rigby 提交于
      fdt_totalsize returns size in cpu endian so don't call be32_to_cpu
      on the result.  This was harmless on big endian platforms but not
      on little endian ARMs.
      Signed-off-by: NJohn Rigby <john.rigby@linaro.org>
      d1263fce
    • J
      common/image.c fix length calculation in boot_relocate_fdt · 758b3997
      John Rigby 提交于
      boot_relocate_fdt is called on platforms with CONFIG_SYS_BOOTMAPSZ
      defined to relocate the device tree blob to be inside the
      boot map area between bootmap_base and bootmap_base+CONFIG_SYS_BOOTMAPSZ.
      
      For the case where the blob needs to be relocated, space is
      allocated inside the bootmap by calling lmb_alloc_base with
      size passed in plus some padding:
      
          of_len = *of_size + CONFIG_SYS_FDT_PAD;
      
      For the case where the blob is already inside the bounds of the boot map
      area, lmb_reserve is called to reserve the the space where the blob is
      already residing.  The calculation for this case is currently:
      
          of_len = (CONFIG_SYS_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob;
      
      This is wrong because it reserves all the space in the boot map area
      from the blob to the end ignoring completely the actual size. The
      worst case is where the blob is at the beginning and the entire boot map
      area get reserved. Fix this by changing the length calculation to this:
      
          of_len = *of_size + CONFIG_SYS_FDT_PAD;
      
      This bug has likely never manifested itself because bootm has never
      been called with the fdt blob already in the bootmap area.  In my
      testing on an OMAP3 beagle board I initially worked around the bug
      by simply moving the initial location of the fdt blob.  I have tested
      with the new calculation with the fdt blob both inside and outside
      the boot map area.
      Signed-off-by: NJohn Rigby <john.rigby@linaro.org>
      758b3997
  3. 28 9月, 2010 1 次提交
  4. 09 8月, 2010 1 次提交
    • S
      fdt relocate: have more attention to use a bootmap or not · 958e1206
      Stephan Linz 提交于
      Platforms with flat device tree support can use a bootmap to relocate
      the fdt_blob. This is not a must. That's why the relocation function
      boot_relocate_fdt() should be use only if CONFIG_OF_LIBFDT was defined
      together with CONFIG_SYS_BOOTMAPSZ (see common/cmd_bootm.c).
      
      On MicroBlaze platforms there is no need to use a bootmap to relocate
      a fdt blob. So we need a more precise focus on the compilation and usage
      of boot_relocate_fdt().
      
      In general it is valid to exclude the function boot_relocate_fdt() if
      the bootmap size CONFIG_SYS_BOOTMAPSZ is not defined.
      Signed-off-by: NStephan Linz <linz@li-pro.net>
      958e1206
  5. 08 8月, 2010 1 次提交
  6. 05 7月, 2010 1 次提交
    • W
      Make sure that argv[] argument pointers are not modified. · 54841ab5
      Wolfgang Denk 提交于
      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: NWolfgang Denk <wd@denx.de>
      Acked-by: NMike Frysinger <vapier@gentoo.org>
      54841ab5
  7. 28 5月, 2010 1 次提交
  8. 06 5月, 2010 1 次提交
  9. 26 1月, 2010 1 次提交
  10. 09 12月, 2009 1 次提交
  11. 05 12月, 2009 1 次提交
    • P
      add lzop decompression support · 20dde48b
      Peter Korsgaard 提交于
      Add lzop decompression support to the existing lzo bitstream handling
      (think gzip versus zlib), and support it for uImage decompression if
      CONFIG_LZO is enabled.
      
      Lzop doesn't compress as good as gzip (~10% worse), but decompression
      is very fast (~0.7s faster here on a slow ppc). The lzop decompression
      code is based on Albin Tonnerre's recent ARM Linux lzo support patch.
      
      Cc: albin.tonnerre@free-electrons.com
      Signed-off-by: NPeter Korsgaard <jacmet@sunsite.dk>
      20dde48b
  12. 03 10月, 2009 5 次提交
  13. 11 9月, 2009 4 次提交
  14. 05 4月, 2009 1 次提交
  15. 14 12月, 2008 1 次提交
  16. 19 10月, 2008 2 次提交
  17. 13 9月, 2008 1 次提交
  18. 10 9月, 2008 1 次提交
  19. 09 9月, 2008 3 次提交
  20. 07 9月, 2008 2 次提交
  21. 27 8月, 2008 2 次提交
  22. 12 8月, 2008 1 次提交
  23. 10 8月, 2008 1 次提交
  24. 09 8月, 2008 1 次提交
  25. 13 7月, 2008 1 次提交
    • M
      FIS: repare incorrect return value with ramdisk handling · c78fce69
      Michal Simek 提交于
      Microblaze and PowerPC use boot_get_ramdisk for loading
      ramdisk to memory with checking return value.
      Return 0 means success. Return 1 means failed.
      Here is correspond part of code from bootm.c which check
      return code.
      
      ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_PPC,
      		&rd_data_start, &rd_data_end);
      if (ret)
      	goto error;
      Signed-off-by: NMichal Simek <monstr@monstr.eu>
      c78fce69
  26. 12 6月, 2008 1 次提交