summaryrefslogtreecommitdiff
path: root/arch/mips/lib
diff options
context:
space:
mode:
authorDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-05-09 17:10:06 +0200
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-08-13 11:58:48 +0200
commit6c154552b0540f73cc2a3692f53b405f0f2bdf0e (patch)
tree758cfda89d8cdc6fbab76482efdf989c60339b08 /arch/mips/lib
parent15f8aa90931c47cecac41984bf80bb394c3f4dfd (diff)
downloadu-boot-imx-6c154552b0540f73cc2a3692f53b405f0f2bdf0e.zip
u-boot-imx-6c154552b0540f73cc2a3692f53b405f0f2bdf0e.tar.gz
u-boot-imx-6c154552b0540f73cc2a3692f53b405f0f2bdf0e.tar.bz2
MIPS: bootm: add support for generic relocation of init ramdisks
All linux kernels after v2.6 require a page-aligned location of an external init ramdisk. Enable CONFIG_SYS_BOOT_RAMDISK_HIGH to support this with the generic U-Boot relocation code. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Diffstat (limited to 'arch/mips/lib')
-rw-r--r--arch/mips/lib/bootm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 257390b..27e0b1b 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -147,6 +147,7 @@ static void boot_prep_linux(bootm_headers_t *images)
{
char env_buf[12];
const char *cp;
+ ulong rd_start, rd_size;
#ifdef CONFIG_MEMSIZE_IN_BYTES
sprintf(env_buf, "%lu", (ulong)gd->ram_size);
@@ -157,14 +158,17 @@ static void boot_prep_linux(bootm_headers_t *images)
(ulong)(gd->ram_size >> 20));
#endif /* CONFIG_MEMSIZE_IN_BYTES */
+ rd_start = UNCACHED_SDRAM(images->initrd_start);
+ rd_size = images->initrd_end - images->initrd_start;
+
linux_env_init();
linux_env_set("memsize", env_buf);
- sprintf(env_buf, "0x%08X", (uint) UNCACHED_SDRAM(images->rd_start));
+ sprintf(env_buf, "0x%08lX", rd_start);
linux_env_set("initrd_start", env_buf);
- sprintf(env_buf, "0x%X", (uint) (images->rd_end - images->rd_start));
+ sprintf(env_buf, "0x%lX", rd_size);
linux_env_set("initrd_size", env_buf);
sprintf(env_buf, "0x%08X", (uint) (gd->bd->bi_flashstart));