This replaces the passing of the location and size of an external init ramdisk
via the traditional Linux environment. This is required to supporta again
external init ramdisks with recent Linux kernels.

Signed-off-by: Daniel Schwierzeck <daniel.schwierz...@gmail.com>
---
 arch/mips/lib/bootm.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 796d405..68b57d7 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -104,6 +104,7 @@ static void boot_cmdline_linux(bootm_headers_t *images)
        const char *bootargs, *next, *quote;
        char buf[12];
        unsigned int mem = gd->ram_size >> 20;
+       ulong rd_start, rd_size;
 
        linux_cmdline_init();
 
@@ -111,6 +112,17 @@ static void boot_cmdline_linux(bootm_headers_t *images)
        sprintf(buf, "mem=%uM", mem);
        linux_cmdline_set(buf, strlen(buf));
 
+       /* append rd_start and rd_size */
+       rd_start = images->initrd_start;
+       rd_size = images->initrd_end - images->initrd_start;
+
+       if (rd_size) {
+               sprintf(buf, "rd_start=0x%08lX", rd_start);
+               linux_cmdline_set(buf, strlen(buf));
+               sprintf(buf, "rd_size=0x%lX", rd_size);
+               linux_cmdline_set(buf, strlen(buf));
+       }
+
        bootargs = getenv("bootargs");
        if (!bootargs)
                return;
-- 
1.8.1.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to