From: Marcelo Tosatti The initramfs check at populate_rootfs() can consume significant time (several seconds) on slow/embedded platforms, since it has to decompress the image. Add an option to skip it under CONFIG_EMBEDDED. Signed-off-by: Andrew Morton --- init/Kconfig | 10 ++++++++++ init/initramfs.c | 2 ++ 2 files changed, 12 insertions(+) diff -puN init/initramfs.c~optionally-skip-initramfs-check init/initramfs.c --- 25/init/initramfs.c~optionally-skip-initramfs-check Thu Nov 17 14:56:58 2005 +++ 25-akpm/init/initramfs.c Thu Nov 17 14:56:58 2005 @@ -486,6 +486,7 @@ void __init populate_rootfs(void) if (initrd_start) { int fd; printk(KERN_INFO "checking if image is initramfs..."); +#ifndef CONFIG_INITRAMFS_SKIP err = unpack_to_rootfs((char *)initrd_start, initrd_end - initrd_start, 1); if (!err) { @@ -495,6 +496,7 @@ void __init populate_rootfs(void) free_initrd(); return; } +#endif printk("it isn't (%s); looks like an initrd\n", err); fd = sys_open("/initrd.image", O_WRONLY|O_CREAT, 700); if (fd >= 0) { diff -puN init/Kconfig~optionally-skip-initramfs-check init/Kconfig --- 25/init/Kconfig~optionally-skip-initramfs-check Thu Nov 17 14:56:58 2005 +++ 25-akpm/init/Kconfig Thu Nov 17 14:56:58 2005 @@ -409,6 +409,16 @@ config SLAB SLOB is more space efficient but does not scale well and is more susceptible to fragmentation. +config INITRAMFS_SKIP + bool "Skip initramfs verification of initrd" if EMBEDDED + default n + help + By default the initialization code uncompresses the initrd image to + verify if it is a initramfs image. + + Say Y here if you are sure not to be using initramfs and want to + skip that test. + endmenu # General setup config TINY_SHMEM _