aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZdenek Pavlas <pavlas@nextra.cz>2006-03-25 06:07:49 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:22:57 -0500
commit340e48e662dc9bf79cdd9dc755cb2eb2bad580cd (patch)
treedcd67a41171101d47cf9afa77f642fc2b3efe172
parent05eeae208d08a05a6980cf2ff61f02843c0955fd (diff)
[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 <viro@ftp.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/block/Kconfig1
-rw-r--r--init/initramfs.c10
2 files changed, 10 insertions, 1 deletions
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig
index 8b1331677407..e57ac5a43246 100644
--- a/drivers/block/Kconfig
+++ b/drivers/block/Kconfig
@@ -401,7 +401,6 @@ config BLK_DEV_RAM_SIZE
401 401
402config BLK_DEV_INITRD 402config BLK_DEV_INITRD
403 bool "Initial RAM disk (initrd) support" 403 bool "Initial RAM disk (initrd) support"
404 depends on BLK_DEV_RAM=y
405 help 404 help
406 The initial RAM disk is a RAM disk that is loaded by the boot loader 405 The initial RAM disk is a RAM disk that is loaded by the boot loader
407 (loadlin or lilo) and that is mounted as root before the normal boot 406 (loadlin or lilo) and that is mounted as root before the normal boot
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)
506 panic(err); 506 panic(err);
507#ifdef CONFIG_BLK_DEV_INITRD 507#ifdef CONFIG_BLK_DEV_INITRD
508 if (initrd_start) { 508 if (initrd_start) {
509#ifdef CONFIG_BLK_DEV_RAM
509 int fd; 510 int fd;
510 printk(KERN_INFO "checking if image is initramfs..."); 511 printk(KERN_INFO "checking if image is initramfs...");
511 err = unpack_to_rootfs((char *)initrd_start, 512 err = unpack_to_rootfs((char *)initrd_start,
@@ -525,6 +526,15 @@ void __init populate_rootfs(void)
525 sys_close(fd); 526 sys_close(fd);
526 free_initrd(); 527 free_initrd();
527 } 528 }
529#else
530 printk(KERN_INFO "Unpacking initramfs...");
531 err = unpack_to_rootfs((char *)initrd_start,
532 initrd_end - initrd_start, 0);
533 if (err)
534 panic(err);
535 printk(" done\n");
536 free_initrd();
537#endif
528 } 538 }
529#endif 539#endif
530} 540}