public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* RFC: initramfs unpack point and rules
@ 2007-04-05 12:34 Krzysztof Halasa
  2007-04-05 14:31 ` Krzysztof Halasa
  2007-04-12 11:06 ` Al Viro
  0 siblings, 2 replies; 4+ messages in thread
From: Krzysztof Halasa @ 2007-04-05 12:34 UTC (permalink / raw)
  To: linux-kernel

Hi,

I recently got a BSOD bootup problem with external initramfs (it's
ARM but it seems it doesn't matter).

--------------------------------------------------------------------------

First problem: initramfs is unpacked way before console drivers
are initialized, so you aren't going to see the panic():

init/initramfs.c:static int __init populate_rootfs(void)
...
		printk(KERN_INFO "Unpacking initramfs...");
		err = unpack_to_rootfs((char *)initrd_start,
			initrd_end - initrd_start, 0);
		if (err)
			panic(err);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		printk(" done\n");
		free_initrd();

I wonder why is initramfs unpacked that early, before most drivers?
I'd expect it much later in the boot sequence, just before userspace
and initial devices (/dev/console etc) are needed. Should it be moved
there? populate_rootfs() unpacks both builtin and external initramfs.


--------------------------------------------------------------------------

Second problem:
RedBoot> exec -r 0x800000 -s 8000000 -c "console=ttyS0,115200"      

Using base address 0x00030000 and length 0x001eea08
Uncompressing Linux...............................done, booting the kernel.
[nothing then]

Obviously I didn't want to specify the exact size and expected inflate
to determine it by itself. I think a valid gzipped cpio image, followed
by some junk, should not be a problem here. Currently, unpack_to_rootfs()
does the job but returns "bad gzip magic numbers" error message - I think
I should change it to return that message only for first initramfs header
and return a success if some junk is spotted after a valid end of
compressed data.

Opinions?
-- 
Krzysztof Halasa

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-13 12:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 12:34 RFC: initramfs unpack point and rules Krzysztof Halasa
2007-04-05 14:31 ` Krzysztof Halasa
2007-04-12 11:06 ` Al Viro
2007-04-13 12:08   ` Krzysztof Halasa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox