Maximum bootable kernel size in current ARM linux
Russell King - ARM Linux
linux at arm.linux.org.uk
Mon Sep 13 06:15:33 EDT 2010
On Mon, Sep 13, 2010 at 10:10:39AM +0000, Simon Guinot wrote:
> On Mon, Sep 13, 2010 at 05:56:30PM +0800, Haojian Zhuang wrote:
> > On Mon, Sep 13, 2010 at 4:43 PM, Marek Vasut <marek.vasut at gmail.com> wrote:
> > > Dne Po 13. září 2010 09:40:56 Bruce M. Penrod napsal(a):
> > >> This seems like a pretty straightforward question, but extensive web
> > >> searching hasn't shown a really clear, up-to-date answer. The most
> > >> recent info is circa 2004 and states that 4MB is the largest
> > >> uncompressed ARM kernel that may be loaded. Not being an ARM assembly
> > >> guru (head.S baffles me), I'd like to know if that is still true in
> > >> 2010, and if it is, why?
> > >>
> > >> I'm having one hell of a time compiling a monolithic kernel and keeping
> > >> it under 4M without leaving out some core networking features I need.
> > >> From my searching, it looks like x86 has either removed the limit or
> > >> raised it to a much higher number. It's not clear to me why a 32 bit
> > >> processor would not be able to boot a kernel larger than 4 MB.
> > >
> > > Hey, CCed Russell.
> > >
> > > Btw. this shouldn't be true anymore. On the other hand, why do you need such a
> > > huge kernel?
> > >
> > > It's not even possible to create kernel that big if you don't have some kind of
> > > initramfs in, right? Besides, you can use some kind of a compression, like LZMA
> > > or something to keep the size down.
> > >
> > > Cheers
> >
> > If initramfs is built in, we'll get a huge kernel. Even using LZMA, my
> > kernel size is near 5MB.
>
> The initramfs is located at the end of the init section and before the
> text section. Because the kernel must be able to 'branch' between the
> init and text sections, the initramfs size can't be greater than the
> 'branch' maximum offset. 32MB ?
>
> I guess that relocate the initramfs just after the text section should
> break this limitation.
But then means that it won't be freed after init time.
If you want one monolithic kernel and filesystem, use the
arch/arm/boot/bootp instead - it doesn't have these restrictions as it
uses the age old initrd method of passing a filesystem/initramfs to the
kernel.
More information about the linux-arm-kernel
mailing list