]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_bootm.c
compiler.h: unify system ifdef cruft here
[karo-tx-uboot.git] / common / cmd_bootm.c
index 905567293cd2299054b843bbe57aa8c971a806f5..367d5a7a94cc3c6bbfec8e61ba9e5a3f4629dfdc 100644 (file)
@@ -30,7 +30,7 @@
 #include <command.h>
 #include <image.h>
 #include <malloc.h>
-#include <zlib.h>
+#include <u-boot/zlib.h>
 #include <bzlib.h>
 #include <environment.h>
 #include <lmb.h>
@@ -340,8 +340,10 @@ static int bootm_load_os(image_info_t os, ulong *load_end, int boot_progress)
                } else {
                        printf ("   Loading %s ... ", type_name);
 
-                       memmove_wd ((void *)load,
-                                  (void *)image_start, image_len, CHUNKSZ);
+                       if (load != image_start) {
+                               memmove_wd ((void *)load,
+                                               (void *)image_start, image_len, CHUNKSZ);
+                       }
                }
                *load_end = load + image_len;
                puts("OK\n");
@@ -454,13 +456,13 @@ int do_bootm_subcommand (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
        }
        /* Unrecognized command */
        else {
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
        if (images.state >= state) {
                printf ("Trying to execute a command out of order\n");
-               printf ("Usage:\n%s\n", cmdtp->usage);
+               cmd_usage(cmdtp);
                return 1;
        }
 
@@ -913,7 +915,7 @@ static void *boot_get_kernel (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]
 
 U_BOOT_CMD(
        bootm,  CONFIG_SYS_MAXARGS,     1,      do_bootm,
-       "bootm   - boot application image from memory\n",
+       "boot application image from memory",
        "[addr [arg ...]]\n    - boot application image stored in memory\n"
        "\tpassing arguments 'arg ...'; when booting a Linux kernel,\n"
        "\t'arg' can be the address of an initrd image\n"
@@ -946,7 +948,7 @@ U_BOOT_CMD(
        "\tbdt     - OS specific bd_t processing\n"
        "\tcmdline - OS specific command line processing/setup\n"
        "\tprep    - OS specific prep before relocation or go\n"
-       "\tgo      - start OS\n"
+       "\tgo      - start OS"
 );
 
 /*******************************************************************/
@@ -970,15 +972,15 @@ int do_bootd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 
 U_BOOT_CMD(
        boot,   1,      1,      do_bootd,
-       "boot    - boot default, i.e., run 'bootcmd'\n",
-       NULL
+       "boot default, i.e., run 'bootcmd'",
+       ""
 );
 
 /* keep old command name "bootd" for backward compatibility */
 U_BOOT_CMD(
        bootd, 1,       1,      do_bootd,
-       "bootd   - boot default, i.e., run 'bootcmd'\n",
-       NULL
+       "boot default, i.e., run 'bootcmd'",
+       ""
 );
 
 #endif
@@ -1062,11 +1064,11 @@ static int image_info (ulong addr)
 
 U_BOOT_CMD(
        iminfo, CONFIG_SYS_MAXARGS,     1,      do_iminfo,
-       "iminfo  - print header information for application image\n",
+       "print header information for application image",
        "addr [addr ...]\n"
        "    - print header information for application image starting at\n"
        "      address 'addr' in memory; this includes verification of the\n"
-       "      image contents (magic number, header and payload checksums)\n"
+       "      image contents (magic number, header and payload checksums)"
 );
 #endif
 
@@ -1130,10 +1132,10 @@ next_bank:      ;
 
 U_BOOT_CMD(
        imls,   1,              1,      do_imls,
-       "imls    - list all images found in flash\n",
+       "list all images found in flash",
        "\n"
        "    - Prints information about all images found at sector\n"
-       "      boundaries in flash.\n"
+       "      boundaries in flash."
 );
 #endif