Skip to content

Commit

Permalink
MIPS: Remove addinitrd and CONFIG_PROBE_INITRD_HEADER
Browse files Browse the repository at this point in the history
Addinitrd has been superseded by initramfs ages ago.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Ralf Baechle committed Dec 17, 2009
1 parent 0e8cccc commit 32028f1
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 168 deletions.
9 changes: 0 additions & 9 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2041,15 +2041,6 @@ config STACKTRACE_SUPPORT

source "init/Kconfig"

config PROBE_INITRD_HEADER
bool "Probe initrd header created by addinitrd"
depends on BLK_DEV_INITRD
help
Probe initrd header at the last page of kernel image.
Say Y here if you are using arch/mips/boot/addinitrd.c to
add initrd or initramfs image to the kernel image.
Otherwise, say N.

source "kernel/Kconfig.freezer"

menu "Bus options (PCI, PCMCIA, EISA, ISA, TC)"
Expand Down
8 changes: 2 additions & 6 deletions arch/mips/boot/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ strip-flags = $(addprefix --remove-section=,$(drop-sections))

VMLINUX = vmlinux

all: vmlinux.ecoff vmlinux.srec addinitrd
all: vmlinux.ecoff vmlinux.srec

vmlinux.ecoff: $(obj)/elf2ecoff $(VMLINUX)
$(obj)/elf2ecoff $(VMLINUX) vmlinux.ecoff $(E2EFLAGS)
Expand All @@ -39,11 +39,7 @@ vmlinux.bin: $(VMLINUX)
vmlinux.srec: $(VMLINUX)
$(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $(obj)/vmlinux.srec

$(obj)/addinitrd: $(obj)/addinitrd.c
$(HOSTCC) -o $@ $^

clean-files += addinitrd \
elf2ecoff \
clean-files += elf2ecoff \
vmlinux.bin \
vmlinux.ecoff \
vmlinux.srec
131 changes: 0 additions & 131 deletions arch/mips/boot/addinitrd.c

This file was deleted.

1 change: 0 additions & 1 deletion arch/mips/configs/ar7_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,6 @@ CONFIG_DEFAULT_DEADLINE=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="deadline"
CONFIG_PROBE_INITRD_HEADER=y
# CONFIG_FREEZER is not set

#
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/cavium-octeon_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
CONFIG_CLASSIC_RCU=y
# CONFIG_PROBE_INITRD_HEADER is not set
# CONFIG_FREEZER is not set

#
Expand Down
1 change: 0 additions & 1 deletion arch/mips/configs/rbtx49xx_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ CONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="anticipatory"
# CONFIG_PROBE_INITRD_HEADER is not set
# CONFIG_FREEZER is not set

#
Expand Down
20 changes: 1 addition & 19 deletions arch/mips/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,26 +166,8 @@ static unsigned long __init init_initrd(void)
* already set up initrd_start and initrd_end. In these cases
* perfom sanity checks and use them if all looks good.
*/
if (!initrd_start || initrd_end <= initrd_start) {
#ifdef CONFIG_PROBE_INITRD_HEADER
u32 *initrd_header;

/*
* See if initrd has been added to the kernel image by
* arch/mips/boot/addinitrd.c. In that case a header is
* prepended to initrd and is made up by 8 bytes. The first
* word is a magic number and the second one is the size of
* initrd. Initrd start must be page aligned in any cases.
*/
initrd_header = __va(PAGE_ALIGN(__pa_symbol(&_end) + 8)) - 8;
if (initrd_header[0] != 0x494E5244)
goto disable;
initrd_start = (unsigned long)(initrd_header + 2);
initrd_end = initrd_start + initrd_header[1];
#else
if (!initrd_start || initrd_end <= initrd_start)
goto disable;
#endif
}

if (initrd_start & ~PAGE_MASK) {
pr_err("initrd start must be page aligned\n");
Expand Down

0 comments on commit 32028f1

Please sign in to comment.