X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=cmd%2Fbooti.c;h=6ac39193db80bf0b0f46bdce44ff9e0ac69313cb;hb=93e3364804ffd4a5d4a0df9c750a1859f9fe298b;hp=4fff8cfcf69f95440a6ba9bec28f18491bf2bbc0;hpb=bdcb29960e3a9558803632783b922f26993d219e;p=platform%2Fkernel%2Fu-boot.git diff --git a/cmd/booti.c b/cmd/booti.c index 4fff8cf..6ac3919 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -10,7 +10,9 @@ #include #include #include +#include #include +#include #include #include @@ -18,8 +20,8 @@ DECLARE_GLOBAL_DATA_PTR; /* * Image booting support */ -static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, - char * const argv[], bootm_headers_t *images) +static int booti_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], struct bootm_headers *images) { int ret; ulong ld; @@ -41,7 +43,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc, debug("* kernel: default image load address = 0x%08lx\n", image_load_addr); } else { - ld = simple_strtoul(argv[0], NULL, 16); + ld = hextoul(argv[0], NULL); debug("* kernel: cmdline image address = 0x%08lx\n", ld); } @@ -78,7 +80,8 @@ static int booti_start(cmd_tbl_t *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); } @@ -92,13 +95,13 @@ static int booti_start(cmd_tbl_t *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; } -int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_booti(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret; @@ -140,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"