aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2012-09-16 21:44:50 -0400
committerChris Zankel <chris@zankel.net>2012-10-03 18:13:09 -0400
commit9ad79b58510b2845e5ffa77654596d7184a827ab (patch)
tree77286849c1f91a94cff1f352772c53920950c17a
parentb973b4c91be8f7de0531cf8ca2df41021d8f39b3 (diff)
xtensa: drop CONFIG_EMBEDDED_RAMDISK
Remove Kconfig entries, boot subdirectory, dependencies from other boot-* Makefiles, and sections from ld scripts. Remove stale redboot code that used to pass initrd addresses in a3 and a4 to _start. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
-rw-r--r--arch/xtensa/Kconfig17
-rw-r--r--arch/xtensa/Makefile8
-rw-r--r--arch/xtensa/boot/Makefile2
-rw-r--r--arch/xtensa/boot/boot-elf/Makefile17
-rw-r--r--arch/xtensa/boot/boot-elf/boot.lds.S7
-rw-r--r--arch/xtensa/boot/boot-redboot/boot.ld7
-rw-r--r--arch/xtensa/boot/boot-redboot/bootstrap.S10
-rw-r--r--arch/xtensa/boot/ramdisk/Makefile23
-rw-r--r--arch/xtensa/configs/s6105_defconfig5
-rw-r--r--arch/xtensa/kernel/setup.c12
-rw-r--r--arch/xtensa/kernel/vmlinux.lds.S5
11 files changed, 2 insertions, 111 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
index 282be264cd02..cebbcfbe9d6d 100644
--- a/arch/xtensa/Kconfig
+++ b/arch/xtensa/Kconfig
@@ -227,23 +227,6 @@ source "drivers/Kconfig"
227 227
228source "fs/Kconfig" 228source "fs/Kconfig"
229 229
230menu "Xtensa initrd options"
231 depends on BLK_DEV_INITRD
232
233config EMBEDDED_RAMDISK
234 bool "Embed root filesystem ramdisk into the kernel"
235
236config EMBEDDED_RAMDISK_IMAGE
237 string "Filename of gzipped ramdisk image"
238 depends on EMBEDDED_RAMDISK
239 default "ramdisk.gz"
240 help
241 This is the filename of the ramdisk image to be built into the
242 kernel. Relative pathnames are relative to arch/xtensa/boot/ramdisk/.
243 The ramdisk image is not part of the kernel distribution; you must
244 provide one yourself.
245endmenu
246
247source "arch/xtensa/Kconfig.debug" 230source "arch/xtensa/Kconfig.debug"
248 231
249source "security/Kconfig" 232source "security/Kconfig"
diff --git a/arch/xtensa/Makefile b/arch/xtensa/Makefile
index b201d4486098..735916b3daee 100644
--- a/arch/xtensa/Makefile
+++ b/arch/xtensa/Makefile
@@ -48,12 +48,6 @@ endif
48 48
49KBUILD_DEFCONFIG := iss_defconfig 49KBUILD_DEFCONFIG := iss_defconfig
50 50
51# ramdisk/initrd support
52# You need a compressed ramdisk image, named ramdisk.gz in
53# arch/xtensa/boot/ramdisk
54
55core-$(CONFIG_EMBEDDED_RAMDISK) += arch/xtensa/boot/ramdisk/
56
57# Test for cross compiling 51# Test for cross compiling
58 52
59ifneq ($(VARIANT),) 53ifneq ($(VARIANT),)
@@ -87,7 +81,7 @@ all: zImage
87 81
88bzImage : zImage 82bzImage : zImage
89 83
90zImage zImage.initrd: vmlinux 84zImage: vmlinux
91 $(Q)$(MAKE) $(build)=$(boot) $@ 85 $(Q)$(MAKE) $(build)=$(boot) $@
92 86
93define archhelp 87define archhelp
diff --git a/arch/xtensa/boot/Makefile b/arch/xtensa/boot/Makefile
index 70fd1453e172..4018f8994196 100644
--- a/arch/xtensa/boot/Makefile
+++ b/arch/xtensa/boot/Makefile
@@ -25,7 +25,7 @@ bootdir-$(CONFIG_XTENSA_PLATFORM_ISS) += boot-elf
25bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf 25bootdir-$(CONFIG_XTENSA_PLATFORM_XT2000) += boot-redboot boot-elf
26 26
27 27
28zImage zImage.initrd Image Image.initrd: $(bootdir-y) 28zImage Image: $(bootdir-y)
29 29
30$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \ 30$(bootdir-y): $(addprefix $(obj)/,$(subdir-y)) \
31 $(addprefix $(obj)/,$(host-progs)) 31 $(addprefix $(obj)/,$(host-progs))
diff --git a/arch/xtensa/boot/boot-elf/Makefile b/arch/xtensa/boot/boot-elf/Makefile
index 4bbc26f797f1..f10992b89027 100644
--- a/arch/xtensa/boot/boot-elf/Makefile
+++ b/arch/xtensa/boot/boot-elf/Makefile
@@ -33,22 +33,5 @@ Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds
33 -T arch/$(ARCH)/boot/boot-elf/boot.lds \ 33 -T arch/$(ARCH)/boot/boot-elf/boot.lds \
34 -o arch/$(ARCH)/boot/$@.elf $@.tmp 34 -o arch/$(ARCH)/boot/$@.elf $@.tmp
35 35
36Image.initrd: vmlinux $(OBJS)
37 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \
38 --add-section .initrd=arch/$(ARCH)/boot/ramdisk \
39 --set-section-flags .initrd=contents,alloc,load,load,data \
40 vmlinux vmlinux.tmp
41 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \
42 --add-section image=vmlinux.tmp \
43 --set-section-flags image=contents,alloc,load,load,data \
44 $(OBJS) $@.tmp
45 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \
46 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \
47 -o arch/$(ARCH)/boot/$@.elf $@.tmp
48#rm -f $@.tmp vmlinux.tmp
49
50
51zImage: Image 36zImage: Image
52 37
53zImage.initrd: Image.initrd
54
diff --git a/arch/xtensa/boot/boot-elf/boot.lds.S b/arch/xtensa/boot/boot-elf/boot.lds.S
index 4e53b74dc44b..7b646e0a6486 100644
--- a/arch/xtensa/boot/boot-elf/boot.lds.S
+++ b/arch/xtensa/boot/boot-elf/boot.lds.S
@@ -33,13 +33,6 @@ SECTIONS
33 33
34 __reloc_end = . ; 34 __reloc_end = . ;
35 35
36 .initrd ALIGN(0x10) :
37 {
38 boot_initrd_start = . ;
39 *(.initrd)
40 boot_initrd_end = .;
41 }
42
43 . = ALIGN(0x10); 36 . = ALIGN(0x10);
44 __image_load = . ; 37 __image_load = . ;
45 .image 0xd0001000: 38 .image 0xd0001000:
diff --git a/arch/xtensa/boot/boot-redboot/boot.ld b/arch/xtensa/boot/boot-redboot/boot.ld
index 774db20d11f7..5bbcaf9e830d 100644
--- a/arch/xtensa/boot/boot-redboot/boot.ld
+++ b/arch/xtensa/boot/boot-redboot/boot.ld
@@ -31,13 +31,6 @@ SECTIONS
31 31
32 __reloc_end = . ; 32 __reloc_end = . ;
33 33
34 .initrd ALIGN(0x10) :
35 {
36 boot_initrd_start = . ;
37 *(.initrd)
38 boot_initrd_end = .;
39 }
40
41 . = ALIGN(0x10); 34 . = ALIGN(0x10);
42 __image_load = . ; 35 __image_load = . ;
43 .image 0xd0001000: AT(__image_load) 36 .image 0xd0001000: AT(__image_load)
diff --git a/arch/xtensa/boot/boot-redboot/bootstrap.S b/arch/xtensa/boot/boot-redboot/bootstrap.S
index 5582e8cfac8f..4c316cd28a54 100644
--- a/arch/xtensa/boot/boot-redboot/bootstrap.S
+++ b/arch/xtensa/boot/boot-redboot/bootstrap.S
@@ -226,17 +226,7 @@ _reloc:
226 226
227 isync 227 isync
228 228
229 movi a5, __start
230 movi a3, boot_initrd_start
231 movi a4, boot_initrd_end
232 sub a3, a3, a5
233 sub a4, a4, a5
234 add a3, a0, a3
235 add a4, a0, a4
236
237 # a2 Boot parameter list 229 # a2 Boot parameter list
238 # a3 initrd_start (virtual load address)
239 # a4 initrd_end (virtual load address)
240 230
241 movi a0, _image_start 231 movi a0, _image_start
242 jx a0 232 jx a0
diff --git a/arch/xtensa/boot/ramdisk/Makefile b/arch/xtensa/boot/ramdisk/Makefile
deleted file mode 100644
index b12f76352438..000000000000
--- a/arch/xtensa/boot/ramdisk/Makefile
+++ /dev/null
@@ -1,23 +0,0 @@
1#
2# Makefile for a ramdisk image
3#
4
5BIG_ENDIAN := $(shell echo -e "\#ifdef __XTENSA_EL__\nint little;\n\#else\nint big;\n\#endif" | $(CC) -E -|grep -c big)
6
7ifeq ($(BIG_ENDIAN),1)
8OBJCOPY_ARGS := -O elf32-xtensa-be
9else
10OBJCOPY_ARGS := -O elf32-xtensa-le
11endif
12
13obj-y = ramdisk.o
14
15RAMDISK_IMAGE = arch/$(ARCH)/boot/ramdisk/$(CONFIG_EMBEDDED_RAMDISK_IMAGE)
16
17arch/$(ARCH)/boot/ramdisk/ramdisk.o:
18 $(Q)echo -e "dummy:" | $(AS) -o $@;
19 $(Q)$(OBJCOPY) $(OBJCOPY_ARGS) \
20 --add-section .initrd=$(RAMDISK_IMAGE) \
21 --set-section-flags .initrd=contents,alloc,load,load,data \
22 arch/$(ARCH)/boot/ramdisk/ramdisk.o $@
23
diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
index 550e8ed5b5c6..eaf1b8fc6556 100644
--- a/arch/xtensa/configs/s6105_defconfig
+++ b/arch/xtensa/configs/s6105_defconfig
@@ -541,11 +541,6 @@ CONFIG_MSDOS_PARTITION=y
541# CONFIG_DLM is not set 541# CONFIG_DLM is not set
542 542
543# 543#
544# Xtensa initrd options
545#
546# CONFIG_EMBEDDED_RAMDISK is not set
547
548#
549# Kernel hacking 544# Kernel hacking
550# 545#
551CONFIG_PRINTK_TIME=y 546CONFIG_PRINTK_TIME=y
diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c
index 17e746f7be60..270360d9806c 100644
--- a/arch/xtensa/kernel/setup.c
+++ b/arch/xtensa/kernel/setup.c
@@ -60,8 +60,6 @@ struct rtc_ops *rtc_ops;
60#ifdef CONFIG_BLK_DEV_INITRD 60#ifdef CONFIG_BLK_DEV_INITRD
61extern void *initrd_start; 61extern void *initrd_start;
62extern void *initrd_end; 62extern void *initrd_end;
63extern void *__initrd_start;
64extern void *__initrd_end;
65int initrd_is_mapped = 0; 63int initrd_is_mapped = 0;
66extern int initrd_below_start_ok; 64extern int initrd_below_start_ok;
67#endif 65#endif
@@ -79,10 +77,6 @@ static char default_command_line[COMMAND_LINE_SIZE] __initdata = CONFIG_CMDLINE;
79 77
80sysmem_info_t __initdata sysmem; 78sysmem_info_t __initdata sysmem;
81 79
82#ifdef CONFIG_BLK_DEV_INITRD
83int initrd_is_mapped;
84#endif
85
86#ifdef CONFIG_MMU 80#ifdef CONFIG_MMU
87extern void init_mmu(void); 81extern void init_mmu(void);
88#else 82#else
@@ -197,12 +191,6 @@ static int __init parse_bootparam(const bp_tag_t* tag)
197 191
198void __init init_arch(bp_tag_t *bp_start) 192void __init init_arch(bp_tag_t *bp_start)
199{ 193{
200
201#ifdef CONFIG_BLK_DEV_INITRD
202 initrd_start = &__initrd_start;
203 initrd_end = &__initrd_end;
204#endif
205
206 sysmem.nr_banks = 0; 194 sysmem.nr_banks = 0;
207 195
208#ifdef CONFIG_CMDLINE_BOOL 196#ifdef CONFIG_CMDLINE_BOOL
diff --git a/arch/xtensa/kernel/vmlinux.lds.S b/arch/xtensa/kernel/vmlinux.lds.S
index ee2e2089483d..255154f820b7 100644
--- a/arch/xtensa/kernel/vmlinux.lds.S
+++ b/arch/xtensa/kernel/vmlinux.lds.S
@@ -222,11 +222,6 @@ SECTIONS
222 . = ALIGN(0x10); 222 . = ALIGN(0x10);
223 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) } 223 .bootstrap : { *(.bootstrap.literal .bootstrap.text .bootstrap.data) }
224 224
225 . = ALIGN(0x1000);
226 __initrd_start = .;
227 .initrd : { *(.initrd) }
228 __initrd_end = .;
229
230 .ResetVector.text XCHAL_RESET_VECTOR_VADDR : 225 .ResetVector.text XCHAL_RESET_VECTOR_VADDR :
231 { 226 {
232 *(.ResetVector.text) 227 *(.ResetVector.text)