summaryrefslogtreecommitdiff
path: root/lib_mips/bootm.c
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-08-15 08:24:37 -0500
committerWolfgang Denk <wd@denx.de>2008-08-26 23:35:24 +0200
commitc4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865 (patch)
treecdd3de7eec29a70630a6a98f1de434a4ae868cf7 /lib_mips/bootm.c
parentc160a9544743e80e8889edb2275538e7764ce334 (diff)
downloadu-boot-imx-c4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865.zip
u-boot-imx-c4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865.tar.gz
u-boot-imx-c4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865.tar.bz2
bootm: refactor ramdisk locating code
Move determing if we have a ramdisk and where its located into the common code. Keep track of the ramdisk start and end in the bootm_headers_t image struct. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'lib_mips/bootm.c')
-rw-r--r--lib_mips/bootm.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/lib_mips/bootm.c b/lib_mips/bootm.c
index 7df6ce6..9869c33 100644
--- a/lib_mips/bootm.c
+++ b/lib_mips/bootm.c
@@ -48,7 +48,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
bootm_headers_t *images)
{
- ulong initrd_start, initrd_end;
void (*theKernel) (int, char **, char **, int *);
char *commandline = getenv ("bootargs");
char env_buf[12];
@@ -58,11 +57,6 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
/* find kernel entry point */
theKernel = (void (*)(int, char **, char **, int *))images->ep;
- ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_MIPS,
- &initrd_start, &initrd_end);
- if (ret)
- goto error;
-
show_boot_progress (15);
#ifdef DEBUG
@@ -82,10 +76,10 @@ void do_bootm_linux (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[],
linux_env_set ("memsize", env_buf);
- sprintf (env_buf, "0x%08X", (uint) UNCACHED_SDRAM (initrd_start));
- linux_env_set ("initrd_start", env_buf);
+ sprintf (env_buf, "0x%08X", (uint) UNCACHED_SDRAM (images->rd_start));
+ linux_env_set ("images->rd_start", env_buf);
- sprintf (env_buf, "0x%X", (uint) (initrd_end - initrd_start));
+ sprintf (env_buf, "0x%X", (uint) (images->rd_end - images->rd_start));
linux_env_set ("initrd_size", env_buf);
sprintf (env_buf, "0x%08X", (uint) (gd->bd->bi_flashstart));