Re: initramfs padding for constant redboot exec -r/-s args

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, Mar 27, 2009 at 01:15:32PM +0100, Loïc Minier wrote:
>  I tried to pad the initrd with zeroes (as done on my Thecus N2100) or
>  with 0xff's (as 0xf seems to be the EOB in the gzip compression), I
>  tried passing initrd=0x91000000,6M mem=200M@0x90000000 on the kernel
>  cmdline (with CONFIG_BLK_DEV_RAM_SIZE=8192) with -s 0x00600000, in all
>  cases I overflow the ramdisk fd:
> [42949379.640000] RAMDISK: Compressed image found at block 0
> [42949380.210000] RAMDISK: incomplete write (-28 != 32768) 8388608
> 
>  My understanding is that RedBoot is responsible for creating the ATAG
>  headers and will only do so if both -r and -s are used, and that can be
>  overriden with the initrd arg; I tried with and without -r / -s and
>  with/without the kernel args; in all cases the result was the overflow
>  at CONFIG_BLK_DEV_RAM_SIZE.

I think you're confused.  From your 'initrd' argument you show above,
you're saying that you have a 6MB compressed initrd image.

However, you're trying to load it into a ram disk which is only 8MB in
size.  Generally, gzip manages to shrink such things by a factor of two,
so a 6MB compressed initrd image probably decompresses to 12MB.

12MB into 8MB won't go, and that's why you're getting the ENOSPC error.
Redboot isn't responsible for working this out - it can only be worked
out by doing the decompression, and why would you want Redboot to
decompress the image just to find that out?

You know how large the image was when you created it, so either set
CONFIG_BLK_DEV_RAM_SIZE appropriately, or pass an appropriate
ramdisk_size= argument to the kernel.

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php


[Linux ARM]     [Linux ARM MSM]     [Linux ARM Kernel]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

Add to Google Follow linuxarm on Twitter