ramdisk size is larger than 4MB

Scott Wood scottwood at freescale.com
Sat Jul 31 03:04:24 EST 2010


On Fri, 30 Jul 2010 00:00:52 -0700
Shawn Jin <shawnxjin at gmail.com> wrote:

> Hi,
> 
> I have a ramdisk as RFS much larger than 4MB in a 2.4 kernel. In
> recent 2.6 kernels ramdisk is no longer supported so I decided to go
> with initramfs. However I found the initial RFS for initramfs is
> limited to 4MB since the bootwrapper locates at 0x400000.

The uncompressed image, including both ramfs and kernel must fit below
4MB.

> One way to lift this limitation is to relocate the bootwrapper to
> somewhere else, say for example, 0x1000000 so that a 16MB initramfs
> can be loaded. If the bootwrapper is relocated, what else would be
> affected by this relocation?

It should be fine to just change it locally.  It would be a problem to
change it upstream for all boards, since some supported boards have
only 16MB (or even 8MB) of RAM.

Another option is to provide a vmlinux_alloc callback to stick the
kernel somewhere other than zero, at the cost of an extra image copy
once the kernel runs to get itself back down to zero.  This wasn't done
in cuboot because it was considered better to adjust the bootwrapper
link address at build time based on the kernel+ramfs image size, but
that never got implemented.

Perhaps a reasonable compromise is a vmlinux_alloc that returns zero if
the image fits there, and calls malloc otherwise?

-Scott



More information about the Linuxppc-dev mailing list