diff options
Diffstat (limited to 'arch/sh/boot/compressed')
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 50 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile_32 | 46 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile_64 | 43 | ||||
-rw-r--r-- | arch/sh/boot/compressed/head_64.S | 5 | ||||
-rw-r--r-- | arch/sh/boot/compressed/vmlinux_64.lds | 64 |
5 files changed, 47 insertions, 161 deletions
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile index efb01dc3c8c3..9531bf1b7c2f 100644 --- a/arch/sh/boot/compressed/Makefile +++ b/arch/sh/boot/compressed/Makefile | |||
@@ -1,5 +1,47 @@ | |||
1 | ifeq ($(CONFIG_SUPERH32),y) | 1 | # |
2 | include ${srctree}/arch/sh/boot/compressed/Makefile_32 | 2 | # linux/arch/sh/boot/compressed/Makefile |
3 | else | 3 | # |
4 | include ${srctree}/arch/sh/boot/compressed/Makefile_64 | 4 | # create a compressed vmlinux image from the original vmlinux |
5 | # | ||
6 | |||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | ||
8 | head_$(BITS).o misc_$(BITS).o piggy.o | ||
9 | |||
10 | OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc_$(BITS).o $(obj)/cache.o | ||
11 | |||
12 | ifdef CONFIG_SH_STANDARD_BIOS | ||
13 | OBJECTS += $(obj)/../../kernel/sh_bios.o | ||
5 | endif | 14 | endif |
15 | |||
16 | # | ||
17 | # IMAGE_OFFSET is the load offset of the compression loader | ||
18 | # | ||
19 | IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | ||
20 | $$[$(CONFIG_PAGE_OFFSET) + \ | ||
21 | $(KERNEL_MEMORY) + \ | ||
22 | $(CONFIG_BOOT_LINK_OFFSET)]') | ||
23 | |||
24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
25 | |||
26 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | ||
27 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | ||
28 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | ||
29 | endif | ||
30 | |||
31 | LDFLAGS_vmlinux := --oformat $(ld-bfd) -Ttext $(IMAGE_OFFSET) -e startup \ | ||
32 | -T $(obj)/../../kernel/vmlinux.lds | ||
33 | |||
34 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | ||
35 | $(call if_changed,ld) | ||
36 | @: | ||
37 | |||
38 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
39 | $(call if_changed,objcopy) | ||
40 | |||
41 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
42 | $(call if_changed,gzip) | ||
43 | |||
44 | OBJCOPYFLAGS += -R .empty_zero_page | ||
45 | |||
46 | $(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE | ||
47 | $(call if_changed,as_o_S) | ||
diff --git a/arch/sh/boot/compressed/Makefile_32 b/arch/sh/boot/compressed/Makefile_32 deleted file mode 100644 index b96a055b053e..000000000000 --- a/arch/sh/boot/compressed/Makefile_32 +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | # | ||
2 | # linux/arch/sh/boot/compressed/Makefile | ||
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | |||
7 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | ||
8 | head_32.o misc_32.o piggy.o | ||
9 | |||
10 | OBJECTS = $(obj)/head_32.o $(obj)/misc_32.o | ||
11 | |||
12 | ifdef CONFIG_SH_STANDARD_BIOS | ||
13 | OBJECTS += $(obj)/../../kernel/sh_bios.o | ||
14 | endif | ||
15 | |||
16 | # | ||
17 | # IMAGE_OFFSET is the load offset of the compression loader | ||
18 | # | ||
19 | IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | ||
20 | $$[$(CONFIG_PAGE_OFFSET) + \ | ||
21 | $(CONFIG_MEMORY_START) + \ | ||
22 | $(CONFIG_BOOT_LINK_OFFSET)]') | ||
23 | |||
24 | LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) | ||
25 | |||
26 | ifeq ($(CONFIG_FUNCTION_TRACER),y) | ||
27 | ORIG_CFLAGS := $(KBUILD_CFLAGS) | ||
28 | KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) | ||
29 | endif | ||
30 | |||
31 | LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds | ||
32 | |||
33 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE | ||
34 | $(call if_changed,ld) | ||
35 | @: | ||
36 | |||
37 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
38 | $(call if_changed,objcopy) | ||
39 | |||
40 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
41 | $(call if_changed,gzip) | ||
42 | |||
43 | OBJCOPYFLAGS += -R .empty_zero_page | ||
44 | |||
45 | $(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE | ||
46 | $(call if_changed,as_o_S) | ||
diff --git a/arch/sh/boot/compressed/Makefile_64 b/arch/sh/boot/compressed/Makefile_64 deleted file mode 100644 index 658d4f915556..000000000000 --- a/arch/sh/boot/compressed/Makefile_64 +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | # | ||
2 | # arch/sh/boot/compressed/Makefile_64 | ||
3 | # | ||
4 | # create a compressed vmlinux image from the original vmlinux | ||
5 | # | ||
6 | # Copyright (C) 2002 Stuart Menefy | ||
7 | # Copyright (C) 2004 Paul Mundt | ||
8 | # | ||
9 | # This file is subject to the terms and conditions of the GNU General Public | ||
10 | # License. See the file "COPYING" in the main directory of this archive | ||
11 | # for more details. | ||
12 | # | ||
13 | |||
14 | targets := vmlinux vmlinux.bin vmlinux.bin.gz \ | ||
15 | head_64.o misc_64.o cache.o piggy.o | ||
16 | |||
17 | OBJECTS := $(obj)/vmlinux_64.lds $(obj)/head_64.o $(obj)/misc_64.o \ | ||
18 | $(obj)/cache.o | ||
19 | |||
20 | # | ||
21 | # ZIMAGE_OFFSET is the load offset of the compression loader | ||
22 | # (4M for the kernel plus 64K for this loader) | ||
23 | # | ||
24 | ZIMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ | ||
25 | $$[$(CONFIG_PAGE_OFFSET)+0x400000+0x10000]') | ||
26 | |||
27 | LDFLAGS_vmlinux := -Ttext $(ZIMAGE_OFFSET) -e startup \ | ||
28 | -T $(obj)/../../kernel/vmlinux.lds | ||
29 | |||
30 | $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o FORCE | ||
31 | $(call if_changed,ld) | ||
32 | @: | ||
33 | |||
34 | $(obj)/vmlinux.bin: vmlinux FORCE | ||
35 | $(call if_changed,objcopy) | ||
36 | |||
37 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
38 | $(call if_changed,gzip) | ||
39 | |||
40 | OBJCOPYFLAGS += -R .empty_zero_page | ||
41 | |||
42 | $(obj)/piggy.o: $(obj)/piggy.S $(obj)/vmlinux.bin.gz FORCE | ||
43 | $(call if_changed,as_o_S) | ||
diff --git a/arch/sh/boot/compressed/head_64.S b/arch/sh/boot/compressed/head_64.S index 622eac3cf556..9993113c6713 100644 --- a/arch/sh/boot/compressed/head_64.S +++ b/arch/sh/boot/compressed/head_64.S | |||
@@ -14,6 +14,7 @@ | |||
14 | * Copyright (C) 2002 Stuart Menefy (stuart.menefy@st.com) | 14 | * Copyright (C) 2002 Stuart Menefy (stuart.menefy@st.com) |
15 | */ | 15 | */ |
16 | #include <asm/cache.h> | 16 | #include <asm/cache.h> |
17 | #include <asm/tlb.h> | ||
17 | #include <cpu/mmu_context.h> | 18 | #include <cpu/mmu_context.h> |
18 | #include <cpu/registers.h> | 19 | #include <cpu/registers.h> |
19 | 20 | ||
@@ -33,11 +34,7 @@ | |||
33 | #define ICCR0_INIT_VAL ICCR0_ON | ICCR0_ICI /* ICE + ICI */ | 34 | #define ICCR0_INIT_VAL ICCR0_ON | ICCR0_ICI /* ICE + ICI */ |
34 | #define ICCR1_INIT_VAL ICCR1_NOLOCK /* No locking */ | 35 | #define ICCR1_INIT_VAL ICCR1_NOLOCK /* No locking */ |
35 | 36 | ||
36 | #if 1 | ||
37 | #define OCCR0_INIT_VAL OCCR0_ON | OCCR0_OCI | OCCR0_WB /* OCE + OCI + WB */ | 37 | #define OCCR0_INIT_VAL OCCR0_ON | OCCR0_OCI | OCCR0_WB /* OCE + OCI + WB */ |
38 | #else | ||
39 | #define OCCR0_INIT_VAL OCCR0_OFF | ||
40 | #endif | ||
41 | #define OCCR1_INIT_VAL OCCR1_NOLOCK /* No locking */ | 38 | #define OCCR1_INIT_VAL OCCR1_NOLOCK /* No locking */ |
42 | 39 | ||
43 | .text | 40 | .text |
diff --git a/arch/sh/boot/compressed/vmlinux_64.lds b/arch/sh/boot/compressed/vmlinux_64.lds deleted file mode 100644 index 59c2ef4aeda5..000000000000 --- a/arch/sh/boot/compressed/vmlinux_64.lds +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | * ld script to make compressed SuperH/shmedia Linux kernel+decompression | ||
3 | * bootstrap | ||
4 | * Modified by Stuart Menefy from arch/sh/vmlinux.lds.S written by Niibe Yutaka | ||
5 | */ | ||
6 | |||
7 | |||
8 | #ifdef CONFIG_LITTLE_ENDIAN | ||
9 | /* OUTPUT_FORMAT("elf32-sh64l-linux", "elf32-sh64l-linux", "elf32-sh64l-linux") */ | ||
10 | #define NOP 0x6ff0fff0 | ||
11 | #else | ||
12 | /* OUTPUT_FORMAT("elf32-sh64", "elf32-sh64", "elf32-sh64") */ | ||
13 | #define NOP 0xf0fff06f | ||
14 | #endif | ||
15 | |||
16 | OUTPUT_FORMAT("elf32-sh64-linux") | ||
17 | OUTPUT_ARCH(sh) | ||
18 | ENTRY(_start) | ||
19 | |||
20 | #define ALIGNED_GAP(section, align) (((ADDR(section)+SIZEOF(section)+(align)-1) & ~((align)-1))-ADDR(section)) | ||
21 | #define FOLLOWING(section, align) AT (LOADADDR(section) + ALIGNED_GAP(section,align)) | ||
22 | |||
23 | SECTIONS | ||
24 | { | ||
25 | _text = .; /* Text and read-only data */ | ||
26 | |||
27 | .text : { | ||
28 | *(.text) | ||
29 | *(.text64) | ||
30 | *(.text..SHmedia32) | ||
31 | *(.fixup) | ||
32 | *(.gnu.warning) | ||
33 | } = NOP | ||
34 | . = ALIGN(4); | ||
35 | .rodata : { *(.rodata) } | ||
36 | |||
37 | /* There is no 'real' reason for eight byte alignment, four would work | ||
38 | * as well, but gdb downloads much (*4) faster with this. | ||
39 | */ | ||
40 | . = ALIGN(8); | ||
41 | .image : { *(.image) } | ||
42 | . = ALIGN(4); | ||
43 | _etext = .; /* End of text section */ | ||
44 | |||
45 | .data : /* Data */ | ||
46 | FOLLOWING(.image, 4) | ||
47 | { | ||
48 | _data = .; | ||
49 | *(.data) | ||
50 | } | ||
51 | _data_image = LOADADDR(.data);/* Address of data section in ROM */ | ||
52 | |||
53 | _edata = .; /* End of data section */ | ||
54 | |||
55 | .stack : { stack = .; _stack = .; } | ||
56 | |||
57 | . = ALIGN(4); | ||
58 | __bss_start = .; /* BSS */ | ||
59 | .bss : { | ||
60 | *(.bss) | ||
61 | } | ||
62 | . = ALIGN(4); | ||
63 | _end = . ; | ||
64 | } | ||