stackprot: Make our test a bit more complex
[pandora-u-boot.git] / cmd / booti.c
index ae37975..3df70ea 100644 (file)
@@ -12,6 +12,7 @@
 #include <lmb.h>
 #include <log.h>
 #include <mapmem.h>
+#include <asm/global_data.h>
 #include <linux/kernel.h>
 #include <linux/sizes.h>
 
@@ -79,7 +80,8 @@ static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
 
        /* Handle BOOTM_STATE_LOADOS */
        if (relocated_addr != ld) {
-               debug("Moving Image from 0x%lx to 0x%lx\n", ld, relocated_addr);
+               printf("Moving Image from 0x%lx to 0x%lx, end=%lx\n", ld,
+                      relocated_addr, relocated_addr + image_size);
                memmove((void *)relocated_addr, (void *)ld, image_size);
        }
 
@@ -93,7 +95,7 @@ static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc,
         * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
         * have a header that provide this informaiton.
         */
-       if (bootm_find_images(flag, argc, argv))
+       if (bootm_find_images(flag, argc, argv, relocated_addr, image_size))
                return 1;
 
        return 0;
@@ -141,7 +143,7 @@ static char booti_help_text[] =
        "\tspecifying the size of a RAW initrd.\n"
        "\tCurrently only booting from gz, bz2, lzma and lz4 compression\n"
        "\ttypes are supported. In order to boot from any of these compressed\n"
-       "\timages, user have to set kernel_comp_addr_r and kernel_comp_size enviornment\n"
+       "\timages, user have to set kernel_comp_addr_r and kernel_comp_size environment\n"
        "\tvariables beforehand.\n"
 #if defined(CONFIG_OF_LIBFDT)
        "\tSince booting a Linux kernel requires a flat device-tree, a\n"