diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/Makefile | 15 | ||||
-rw-r--r-- | arch/sh/boot/.gitignore | 5 | ||||
-rw-r--r-- | arch/sh/boot/Makefile | 39 | ||||
-rw-r--r-- | arch/sh/boot/compressed/Makefile | 4 |
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) | |||
189 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) | 189 | libs-$(CONFIG_SUPERH32) := arch/sh/lib/ $(libs-y) |
190 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) | 190 | libs-$(CONFIG_SUPERH64) := arch/sh/lib64/ $(libs-y) |
191 | 191 | ||
192 | PHONY += maketools FORCE | 192 | BOOT_TARGETS = uImage uImage.bz2 uImage.gz uImage.lzma uImage.srec \ |
193 | zImage vmlinux.srec | ||
194 | PHONY += maketools $(BOOT_TARGETS) FORCE | ||
193 | 195 | ||
194 | maketools: include/linux/version.h FORCE | 196 | maketools: 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 | ||
197 | all: $(KBUILD_IMAGE) | 199 | all: $(KBUILD_IMAGE) |
198 | 200 | ||
199 | zImage uImage uImage.srec vmlinux.srec: vmlinux | 201 | $(BOOT_TARGETS): vmlinux |
200 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ | 202 | $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
201 | 203 | ||
202 | compressed: zImage | 204 | compressed: zImage |
@@ -208,10 +210,13 @@ archclean: | |||
208 | $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall | 210 | $(Q)$(MAKE) $(clean)=arch/sh/kernel/vsyscall |
209 | 211 | ||
210 | define archhelp | 212 | define 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)' | ||
215 | endef | 220 | endef |
216 | 221 | ||
217 | CLEAN_FILES += include/asm-sh/machtypes.h | 222 | CLEAN_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 @@ | |||
1 | zImage | 1 | zImage |
2 | vmlinux.srec | 2 | vmlinux* |
3 | uImage | 3 | uImage* |
4 | uImage.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 | |||
20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 | 20 | CONFIG_ZERO_PAGE_OFFSET ?= 0x00001000 |
21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 | 21 | CONFIG_ENTRY_OFFSET ?= 0x00001000 |
22 | 22 | ||
23 | targets := zImage vmlinux.srec uImage uImage.srec | 23 | suffix-$(CONFIG_KERNEL_GZIP) := gz |
24 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | ||
25 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | ||
26 | |||
27 | targets := zImage vmlinux.srec uImage uImage.srec uImage.gz uImage.bz2 uImage.lzma | ||
28 | extra-y += vmlinux.bin vmlinux.bin.gz vmlinux.bin.bz2 vmlinux.bin.lzma | ||
24 | subdir- := compressed | 29 | subdir- := 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)]') |
41 | endif | 46 | endif |
42 | 47 | ||
43 | export CONFIG_PAGE_OFFSET CONFIG_MEMORY_START CONFIG_BOOT_LINK_OFFSET \ | ||
44 | CONFIG_ZERO_PAGE_OFFSET CONFIG_ENTRY_OFFSET KERNEL_MEMORY | ||
45 | |||
46 | KERNEL_LOAD := $(shell /bin/bash -c 'printf "0x%08x" \ | 48 | KERNEL_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 | ||
56 | quiet_cmd_uimage = UIMAGE $@ | 58 | quiet_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 | |||
71 | OBJCOPYFLAGS_vmlinux.srec := -I binary -O srec | 84 | OBJCOPYFLAGS_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 | ||
79 | clean-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 | |||
96 | export 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 | ||
51 | suffix-$(CONFIG_KERNEL_GZIP) := gz | ||
52 | suffix-$(CONFIG_KERNEL_BZIP2) := bz2 | ||
53 | suffix-$(CONFIG_KERNEL_LZMA) := lzma | ||
54 | |||
55 | OBJCOPYFLAGS += -R .empty_zero_page | 51 | OBJCOPYFLAGS += -R .empty_zero_page |
56 | 52 | ||
57 | LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T | 53 | LDFLAGS_piggy.o := -r --format binary --oformat $(ld-bfd) -T |