aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/boot')
-rw-r--r--arch/sh/boot/Makefile30
-rw-r--r--arch/sh/boot/compressed/Makefile7
-rw-r--r--arch/sh/boot/compressed/misc.c23
3 files changed, 23 insertions, 37 deletions
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index cb8cf5572e79..1ce63624c9b9 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -21,12 +21,15 @@ CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000
21CONFIG_ENTRY_OFFSET ?= 0x00001000 21CONFIG_ENTRY_OFFSET ?= 0x00001000
22 22
23suffix-y := bin 23suffix-y := bin
24suffix-$(CONFIG_KERNEL_GZIP) := gz 24suffix-$(CONFIG_KERNEL_GZIP) := gz
25suffix-$(CONFIG_KERNEL_BZIP2) := bz2 25suffix-$(CONFIG_KERNEL_BZIP2) := bz2
26suffix-$(CONFIG_KERNEL_LZMA) := lzma 26suffix-$(CONFIG_KERNEL_LZMA) := lzma
27 27suffix-$(CONFIG_KERNEL_LZO) := lzo
28targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma uImage.bin 28
29extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma 29targets := zImage vmlinux.srec romImage uImage uImage.srec uImage.gz \
30 uImage.bz2 uImage.lzma uImage.lzo uImage.bin
31extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma \
32 vmlinux.bin.lzo
30subdir- := compressed romimage 33subdir- := compressed romimage
31 34
32$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 35$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
@@ -43,15 +46,8 @@ $(obj)/romImage: $(obj)/romimage/vmlinux FORCE
43$(obj)/romimage/vmlinux: $(obj)/zImage FORCE 46$(obj)/romimage/vmlinux: $(obj)/zImage FORCE
44 $(Q)$(MAKE) $(build)=$(obj)/romimage $@ 47 $(Q)$(MAKE) $(build)=$(obj)/romimage $@
45 48
46KERNEL_MEMORY := 0x00000000 49KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
47ifeq ($(CONFIG_PMB_FIXED),y)
48KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
49 $$[$(CONFIG_MEMORY_START) & 0x1fffffff]') 50 $$[$(CONFIG_MEMORY_START) & 0x1fffffff]')
50endif
51ifeq ($(CONFIG_29BIT),y)
52KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
53 $$[$(CONFIG_MEMORY_START)]')
54endif
55 51
56KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ 52KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
57 $$[$(CONFIG_PAGE_OFFSET) + \ 53 $$[$(CONFIG_PAGE_OFFSET) + \
@@ -80,6 +76,9 @@ $(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
80$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE 76$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
81 $(call if_changed,lzma) 77 $(call if_changed,lzma)
82 78
79$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
80 $(call if_changed,lzo)
81
83$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 82$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2
84 $(call if_changed,uimage,bzip2) 83 $(call if_changed,uimage,bzip2)
85 84
@@ -89,6 +88,9 @@ $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
89$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma 88$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
90 $(call if_changed,uimage,lzma) 89 $(call if_changed,uimage,lzma)
91 90
91$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo
92 $(call if_changed,uimage,lzo)
93
92$(obj)/uImage.bin: $(obj)/vmlinux.bin 94$(obj)/uImage.bin: $(obj)/vmlinux.bin
93 $(call if_changed,uimage,none) 95 $(call if_changed,uimage,none)
94 96
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 6182eca5180a..5d660b90943b 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -6,14 +6,11 @@
6 6
7targets := vmlinux vmlinux.bin vmlinux.bin.gz \ 7targets := vmlinux vmlinux.bin vmlinux.bin.gz \
8 vmlinux.bin.bz2 vmlinux.bin.lzma \ 8 vmlinux.bin.bz2 vmlinux.bin.lzma \
9 vmlinux.bin.lzo \
9 head_$(BITS).o misc.o piggy.o 10 head_$(BITS).o misc.o piggy.o
10 11
11OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o 12OBJECTS = $(obj)/head_$(BITS).o $(obj)/misc.o $(obj)/cache.o
12 13
13ifdef CONFIG_SH_STANDARD_BIOS
14OBJECTS += $(obj)/../../kernel/sh_bios.o
15endif
16
17# 14#
18# IMAGE_OFFSET is the load offset of the compression loader 15# IMAGE_OFFSET is the load offset of the compression loader
19# 16#
@@ -47,6 +44,8 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
47 $(call if_changed,bzip2) 44 $(call if_changed,bzip2)
48$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE 45$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
49 $(call if_changed,lzma) 46 $(call if_changed,lzma)
47$(obj)/vmlinux.bin.lzo: $(vmlinux.bin.all-y) FORCE
48 $(call if_changed,lzo)
50 49
51OBJCOPYFLAGS += -R .empty_zero_page 50OBJCOPYFLAGS += -R .empty_zero_page
52 51
diff --git a/arch/sh/boot/compressed/misc.c b/arch/sh/boot/compressed/misc.c
index b51b1fc4baae..27140a6b365d 100644
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -14,7 +14,6 @@
14#include <asm/uaccess.h> 14#include <asm/uaccess.h>
15#include <asm/addrspace.h> 15#include <asm/addrspace.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/sh_bios.h>
18 17
19/* 18/*
20 * gzip declarations 19 * gzip declarations
@@ -62,29 +61,15 @@ static unsigned long free_mem_end_ptr;
62#include "../../../../lib/decompress_unlzma.c" 61#include "../../../../lib/decompress_unlzma.c"
63#endif 62#endif
64 63
65#ifdef CONFIG_SH_STANDARD_BIOS 64#ifdef CONFIG_KERNEL_LZO
66size_t strlen(const char *s) 65#include "../../../../lib/decompress_unlzo.c"
67{ 66#endif
68 int i = 0;
69
70 while (*s++)
71 i++;
72 return i;
73}
74 67
75int puts(const char *s) 68int puts(const char *s)
76{ 69{
77 int len = strlen(s);
78 sh_bios_console_write(s, len);
79 return len;
80}
81#else
82int puts(const char *s)
83{
84 /* This should be updated to use the sh-sci routines */ 70 /* This should be updated to use the sh-sci routines */
85 return 0; 71 return 0;
86} 72}
87#endif
88 73
89void* memset(void* s, int c, size_t n) 74void* memset(void* s, int c, size_t n)
90{ 75{
@@ -132,7 +117,7 @@ void decompress_kernel(void)
132 output_addr = (CONFIG_MEMORY_START + 0x2000); 117 output_addr = (CONFIG_MEMORY_START + 0x2000);
133#else 118#else
134 output_addr = __pa((unsigned long)&_text+PAGE_SIZE); 119 output_addr = __pa((unsigned long)&_text+PAGE_SIZE);
135#ifdef CONFIG_29BIT 120#if defined(CONFIG_29BIT)
136 output_addr |= P2SEG; 121 output_addr |= P2SEG;
137#endif 122#endif
138#endif 123#endif