From 340e48e662dc9bf79cdd9dc755cb2eb2bad580cd Mon Sep 17 00:00:00 2001 From: Zdenek Pavlas Date: Sat, 25 Mar 2006 03:07:49 -0800 Subject: [PATCH] BLK_DEV_INITRD: do not require BLK_DEV_RAM=y Initramfs initrd images do not need a ramdisk device, so remove this restriction in Kconfig. BLK_DEV_RAM=n saves about 13k on i386. Also without ramdisk device there's no need for "dry run", so initramfs unpacks much faster. People using cramfs, squashfs, or gzipped ext2/minix initrd images are probably smart enough not to turn off ramdisk support by accident. Cc: Al Viro Cc: Christoph Hellwig Cc: "H. Peter Anvin" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- init/initramfs.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'init') diff --git a/init/initramfs.c b/init/initramfs.c index 637344b05981..77b934cccefe 100644 --- a/init/initramfs.c +++ b/init/initramfs.c @@ -506,6 +506,7 @@ void __init populate_rootfs(void) panic(err); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) { +#ifdef CONFIG_BLK_DEV_RAM int fd; printk(KERN_INFO "checking if image is initramfs..."); err = unpack_to_rootfs((char *)initrd_start, @@ -525,6 +526,15 @@ void __init populate_rootfs(void) sys_close(fd); free_initrd(); } +#else + 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(); +#endif } #endif } -- cgit v1.2.3