aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/Makefile15
-rw-r--r--arch/sh/boot/.gitignore5
-rw-r--r--arch/sh/boot/Makefile39
-rw-r--r--arch/sh/boot/compressed/Makefile4
4 files changed, 40 insertions, 23 deletions
diff --git a/arch/sh/Makefile b/arch/sh/Makefile
index 75d049b03f7e..2aba73eccb31 100644
--- a/arch/sh/Makefile
+++ b/arch/sh/Makefile
@@ -189,14 +189,16 @@ KBUILD_AFLAGS += $(cflags-y)
189libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) 189libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y)
190libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) 190libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y)
191 191
192PHONY += maketools FORCE 192BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \
193 zImage vmlinux.srec
194PHONY += maketools $(BOOT_TARGETS) FORCE
193 195
194maketools: include/linux/version.h FORCE 196maketools: include/linux/version.h FORCE
195 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h 197 $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h
196 198
197all: $(KBUILD_IMAGE) 199all: $(KBUILD_IMAGE)
198 200
199zImage uImage uImage.srec vmlinux.srec: vmlinux 201$(BOOT_TARGETS): vmlinux
200 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ 202 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
201 203
202compressed: zImage 204compressed: zImage
@@ -208,10 +210,13 @@ archclean:
208 $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall 210 $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall
209 211
210define archhelp 212define archhelp
211 @echo '* zImage - Compressed kernel image' 213 @echo ' zImage - Compressed kernel image'
212 @echo ' vmlinux.srec - Create an ELF S-record' 214 @echo ' vmlinux.srec - Create an ELF S-record'
213 @echo ' uImage - Create a bootable image for U-Boot' 215 @echo '* uImage - Alias to bootable U-Boot image'
214 @echo ' uImage.srec - Create an S-record for U-Boot' 216 @echo ' uImage.srec - Create an S-record for U-Boot'
217 @echo '* uImage.gz - Kernel-only image for U-Boot (gzip)'
218 @echo ' uImage.bz2 - Kernel-only image for U-Boot (bzip2)'
219 @echo ' uImage.lzma - Kernel-only image for U-Boot (lzma)'
215endef 220endef
216 221
217CLEAN_FILES += include/asm-sh/machtypes.h 222CLEAN_FILES += include/asm-sh/machtypes.h
diff --git a/arch/sh/boot/.gitignore b/arch/sh/boot/.gitignore
index aad5edddf93b..541087d2029c 100644
--- a/arch/sh/boot/.gitignore
+++ b/arch/sh/boot/.gitignore
@@ -1,4 +1,3 @@
1zImage 1zImage
2vmlinux.srec 2vmlinux*
3uImage 3uImage*
4uImage.srec
diff --git a/arch/sh/boot/Makefile b/arch/sh/boot/Makefile
index 78efb04c28f3..dd2a852041e9 100644
--- a/arch/sh/boot/Makefile
+++ b/arch/sh/boot/Makefile
@@ -20,7 +20,12 @@ CONFIG_BOOT_LINK_OFFSET ?= 0x00800000
20CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 20CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000
21CONFIG_ENTRY_OFFSET ?= 0x00001000 21CONFIG_ENTRY_OFFSET ?= 0x00001000
22 22
23targets := zImage vmlinux.srec uImage uImage.srec 23suffix-$(CONFIG_KERNEL_GZIP) := gz
24suffix-$(CONFIG_KERNEL_BZIP2) := bz2
25suffix-$(CONFIG_KERNEL_LZMA) := lzma
26
27targets := zImage vmlinux.srec uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma
28extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma
24subdir- := compressed 29subdir- := compressed
25 30
26$(obj)/zImage: $(obj)/compressed/vmlinux FORCE 31$(obj)/zImage: $(obj)/compressed/vmlinux FORCE
@@ -40,9 +45,6 @@ KERNEL_MEMORY := $(shell /bin/bash -c 'printf "0x%08x" \
40 $$[$(CONFIG_MEMORY_START)]') 45 $$[$(CONFIG_MEMORY_START)]')
41endif 46endif
42 47
43export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
44 CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY
45
46KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ 48KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \
47 $$[$(CONFIG_PAGE_OFFSET) + \ 49 $$[$(CONFIG_PAGE_OFFSET) + \
48 $(KERNEL_MEMORY) + \ 50 $(KERNEL_MEMORY) + \
@@ -55,19 +57,30 @@ KERNEL_ENTRY := $(shell /bin/bash -c 'printf "0x%08x" \
55 57
56quiet_cmd_uimage = UIMAGE $@ 58quiet_cmd_uimage = UIMAGE $@
57 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \ 59 cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A sh -O linux -T kernel \
58 -C gzip -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \ 60 -C $(2) -a $(KERNEL_LOAD) -e $(KERNEL_ENTRY) \
59 -n 'Linux-$(KERNELRELEASE)' -d $< $@ 61 -n 'Linux-$(KERNELRELEASE)' -d $< $@
60 62
61$(obj)/uImage: $(obj)/vmlinux.bin.gz FORCE
62 $(call if_changed,uimage)
63 @echo ' Image $@ is ready'
64
65$(obj)/vmlinux.bin: vmlinux FORCE 63$(obj)/vmlinux.bin: vmlinux FORCE
66 $(call if_changed,objcopy) 64 $(call if_changed,objcopy)
67 65
68$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 66$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
69 $(call if_changed,gzip) 67 $(call if_changed,gzip)
70 68
69$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
70 $(call if_changed,bzip2)
71
72$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
73 $(call if_changed,lzma)
74
75$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2
76 $(call if_changed,uimage,bzip2)
77
78$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz
79 $(call if_changed,uimage,gzip)
80
81$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma
82 $(call if_changed,uimage,lzma)
83
71OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec 84OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec
72$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux 85$(obj)/vmlinux.srec: $(obj)/compressed/vmlinux
73 $(call if_changed,objcopy) 86 $(call if_changed,objcopy)
@@ -76,5 +89,9 @@ OBJCOPYFLAGS_uImage.srec := -I binary -O srec
76$(obj)/uImage.srec: $(obj)/uImage 89$(obj)/uImage.srec: $(obj)/uImage
77 $(call if_changed,objcopy) 90 $(call if_changed,objcopy)
78 91
79clean-files += uImage uImage.srec vmlinux.srec \ 92$(obj)/uImage: $(obj)/uImage.$(suffix-y)
80 vmlinux.bin vmlinux.bin.gz 93 @ln -sf $(notdir $<) $@
94 @echo ' Image $@ is ready'
95
96export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \
97 CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY suffix-y
diff --git a/arch/sh/boot/compressed/Makefile b/arch/sh/boot/compressed/Makefile
index 3324019e207e..b31618e9e8c8 100644
--- a/arch/sh/boot/compressed/Makefile
+++ b/arch/sh/boot/compressed/Makefile
@@ -48,10 +48,6 @@ $(obj)/vmlinux.bin.bz2: $(vmlinux.bin.all-y) FORCE
48$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE 48$(obj)/vmlinux.bin.lzma: $(vmlinux.bin.all-y) FORCE
49 $(call if_changed,lzma) 49 $(call if_changed,lzma)
50 50
51suffix-$(CONFIG_KERNEL_GZIP) := gz
52suffix-$(CONFIG_KERNEL_BZIP2) := bz2
53suffix-$(CONFIG_KERNEL_LZMA) := lzma
54
55OBJCOPYFLAGS += -R .empty_zero_page 51OBJCOPYFLAGS += -R .empty_zero_page
56 52
57LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T 53LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T