* BLK_DEV_INITRD: do not require BLK_DEV_RAM=y
@ 2006-03-10 12:37 Zdenek Pavlas
0 siblings, 0 replies; only message in thread
From: Zdenek Pavlas @ 2006-03-10 12:37 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Hello,
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.
--
Zdenek Pavlas
[-- Attachment #2: initrd-without-ramdisk.patch --]
[-- Type: text/plain, Size: 1071 bytes --]
--- linux-2.6.15.6/drivers/block/Kconfig 2006-03-05 20:07:54.000000000 +0100
+++ linux/drivers/block/Kconfig 2006-03-10 11:47:35.666970832 +0100
@@ -400,7 +400,6 @@
config BLK_DEV_INITRD
bool "Initial RAM disk (initrd) support"
- depends on BLK_DEV_RAM=y
help
The initial RAM disk is a RAM disk that is loaded by the boot loader
(loadlin or lilo) and that is mounted as root before the normal boot
--- linux-2.6.15.6/init/initramfs.c 2006-03-05 20:07:54.000000000 +0100
+++ linux/init/initramfs.c 2006-03-10 11:59:50.000000000 +0100
@@ -484,6 +484,7 @@
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,
@@ -503,6 +504,15 @@
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
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-10 12:37 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-10 12:37 BLK_DEV_INITRD: do not require BLK_DEV_RAM=y Zdenek Pavlas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox