diff options
author | Jean-Paul Saman <jean-paul.saman@nxp.com> | 2007-02-10 04:44:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 13:51:25 -0500 |
commit | c33df4eaaf41fd3e34837a6ae9a5f9970c393d9f (patch) | |
tree | b53498e6cd10a6da004b1835f285ed64493abdf2 /usr | |
parent | dd65aa6690e30fdad84a62191c7ab37da89d9865 (diff) |
[PATCH] disable init/initramfs.c
The file init/initramfs.c is always compiled and linked in the kernel
vmlinux even when BLK_DEV_RAM and BLK_DEV_INITRD are disabled and the
system isn't using any form of an initramfs or initrd. In this situation
the code is only used to unpack a (static) default initial rootfilesystem.
The current init/initramfs.c code. usr/initramfs_data.o compiles to a size
of ~15 kbytes. Disabling BLK_DEV_RAM and BLK_DEV_INTRD shrinks the kernel
code size with ~60 Kbytes.
This patch avoids compiling in the code and data for initramfs support if
CONFIG_BLK_DEV_INITRD is not defined. Instead of the initramfs code and
data it uses a small routine in init/noinitramfs.c to setup an initial
static default environment for mounting a rootfilesystem later on in the
kernel initialisation process. The new code is: 164 bytes of size.
The patch is separated in two parts:
1) doesn't compile initramfs code when CONFIG_BLK_DEV_INITRD is not set
2) changing all plaforms vmlinux.lds.S files to not reserve an area of
PAGE_SIZE when CONFIG_BLK_DEV_INITRD is not set.
[deweerdt@free.fr: warning fix]
Signed-off-by: Jean-Paul Saman <jean-paul.saman@nxp.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'usr')
-rw-r--r-- | usr/Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr/Makefile b/usr/Makefile index 382702ad663b..201f27f8cbaf 100644 --- a/usr/Makefile +++ b/usr/Makefile | |||
@@ -7,7 +7,7 @@ PHONY += klibcdirs | |||
7 | 7 | ||
8 | 8 | ||
9 | # Generate builtin.o based on initramfs_data.o | 9 | # Generate builtin.o based on initramfs_data.o |
10 | obj-y := initramfs_data.o | 10 | obj-$(CONFIG_BLK_DEV_INITRD) := initramfs_data.o |
11 | 11 | ||
12 | # initramfs_data.o contains the initramfs_data.cpio.gz image. | 12 | # initramfs_data.o contains the initramfs_data.cpio.gz image. |
13 | # The image is included using .incbin, a dependency which is not | 13 | # The image is included using .incbin, a dependency which is not |