X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib_sh%2Fbootm.c;h=ae1f869f10d9b31da0e69a4ab75797a955045276;hb=f8d7b56e003fe19f37d4e9e326df9e9024a052b0;hp=d5056ae98a7da23eb2c69a88c5d792f1142c6bfe;hpb=6b44a439215ba7c63f666f8099213ea4f05f2b07;p=u-boot diff --git a/lib_sh/bootm.c b/lib_sh/bootm.c index d5056ae98a..ae1f869f10 100644 --- a/lib_sh/bootm.c +++ b/lib_sh/bootm.c @@ -28,7 +28,7 @@ #include #include -#ifdef CFG_DEBUG +#ifdef CONFIG_SYS_DEBUG static void hexdump(unsigned char *buf, int len) { int i; @@ -48,13 +48,17 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images) /* Linux kernel load address */ void (*kernel) (void) = (void (*)(void))images->ep; /* empty_zero_page */ - unsigned char *param = (unsigned char *)image_get_ep(images); + unsigned char *param + = (unsigned char *)image_get_load(images->legacy_hdr_os); /* Linux kernel command line */ - unsigned char *cmdline = param + 0x100; + char *cmdline = (char *)param + 0x100; /* PAGE_SIZE */ - unsigned long size = images->ep - image_get_ep(images); + unsigned long size = images->ep - (unsigned long)param; char *bootargs = getenv("bootargs"); + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) + return 1; + /* Setup parameters */ memset(param, 0, size); /* Clear zero page */ strcpy(cmdline, bootargs);