aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkos Chandras <markos.chandras@imgtec.com>2015-02-16 10:13:11 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-02-20 08:17:43 -0500
commit9d6b80faf9a5c47eaf10e9d5d0b6b911e902d21d (patch)
tree3a2f665adceb7f1f7074adfd00835abdad3398a9
parent151f9148d1af9ed3b5e29ab49800b0669bfe6a6a (diff)
MIPS: boot: Provide more uImage options
Allow more compression algorithms as well as uncompressed uImage.bin to be generated. An uncompressed image might be useful to rule out problems in the decompression code in the bootloader or even speed up the boot process at the expense of a bigger uImage file. Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Cc: James Hogan <james.hogan@imgtec.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/9271/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/Makefile8
-rw-r--r--arch/mips/boot/Makefile49
2 files changed, 55 insertions, 2 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index b3de8ec06e88..8f57fc72d62c 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -298,7 +298,11 @@ boot-y += vmlinux.ecoff
298boot-y += vmlinux.srec 298boot-y += vmlinux.srec
299ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0) 299ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0)
300boot-y += uImage 300boot-y += uImage
301boot-y += uImage.bin
302boot-y += uImage.bz2
301boot-y += uImage.gz 303boot-y += uImage.gz
304boot-y += uImage.lzma
305boot-y += uImage.lzo
302endif 306endif
303 307
304# compressed boot image targets (arch/mips/boot/compressed/) 308# compressed boot image targets (arch/mips/boot/compressed/)
@@ -397,7 +401,11 @@ define archhelp
397 echo ' vmlinuz.bin - Raw binary zboot image' 401 echo ' vmlinuz.bin - Raw binary zboot image'
398 echo ' vmlinuz.srec - SREC zboot image' 402 echo ' vmlinuz.srec - SREC zboot image'
399 echo ' uImage - U-Boot image' 403 echo ' uImage - U-Boot image'
404 echo ' uImage.bin - U-Boot image (uncompressed)'
405 echo ' uImage.bz2 - U-Boot image (bz2)'
400 echo ' uImage.gz - U-Boot image (gzip)' 406 echo ' uImage.gz - U-Boot image (gzip)'
407 echo ' uImage.lzma - U-Boot image (lzma)'
408 echo ' uImage.lzo - U-Boot image (lzo)'
401 echo ' dtbs - Device-tree blobs for enabled boards' 409 echo ' dtbs - Device-tree blobs for enabled boards'
402 echo 410 echo
403 echo ' These will be default as appropriate for a configured platform.' 411 echo ' These will be default as appropriate for a configured platform.'
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile
index 1466c0026093..acb1988f354e 100644
--- a/arch/mips/boot/Makefile
+++ b/arch/mips/boot/Makefile
@@ -23,6 +23,12 @@ strip-flags := $(addprefix --remove-section=,$(drop-sections))
23 23
24hostprogs-y := elf2ecoff 24hostprogs-y := elf2ecoff
25 25
26suffix-y := bin
27suffix-$(CONFIG_KERNEL_BZIP2) := bz2
28suffix-$(CONFIG_KERNEL_GZIP) := gz
29suffix-$(CONFIG_KERNEL_LZMA) := lzma
30suffix-$(CONFIG_KERNEL_LZO) := lzo
31
26targets := vmlinux.ecoff 32targets := vmlinux.ecoff
27quiet_cmd_ecoff = ECOFF $@ 33quiet_cmd_ecoff = ECOFF $@
28 cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag) 34 cmd_ecoff = $(obj)/elf2ecoff $(VMLINUX) $@ $(e2eflag)
@@ -44,14 +50,53 @@ $(obj)/vmlinux.srec: $(VMLINUX) FORCE
44UIMAGE_LOADADDR = $(VMLINUX_LOAD_ADDRESS) 50UIMAGE_LOADADDR = $(VMLINUX_LOAD_ADDRESS)
45UIMAGE_ENTRYADDR = $(VMLINUX_ENTRY_ADDRESS) 51UIMAGE_ENTRYADDR = $(VMLINUX_ENTRY_ADDRESS)
46 52
53#
54# Compressed vmlinux images
55#
56
57extra-y += vmlinux.bin.bz2
58extra-y += vmlinux.bin.gz
59extra-y += vmlinux.bin.lzma
60extra-y += vmlinux.bin.lzo
61
62$(obj)/vmlinux.bin.bz2: $(obj)/vmlinux.bin FORCE
63 $(call if_changed,bzip2)
64
47$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE 65$(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE
48 $(call if_changed,gzip) 66 $(call if_changed,gzip)
49 67
68$(obj)/vmlinux.bin.lzma: $(obj)/vmlinux.bin FORCE
69 $(call if_changed,lzma)
70
71$(obj)/vmlinux.bin.lzo: $(obj)/vmlinux.bin FORCE
72 $(call if_changed,lzo)
73
74#
75# Compressed u-boot images
76#
77
78targets += uImage
79targets += uImage.bin
80targets += uImage.bz2
50targets += uImage.gz 81targets += uImage.gz
82targets += uImage.lzma
83targets += uImage.lzo
84
85$(obj)/uImage.bin: $(obj)/vmlinux.bin FORCE
86 $(call if_changed,uimage,none)
87
88$(obj)/uImage.bz2: $(obj)/vmlinux.bin.bz2 FORCE
89 $(call if_changed,uimage,bzip2)
90
51$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE 91$(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE
52 $(call if_changed,uimage,gzip) 92 $(call if_changed,uimage,gzip)
53 93
54targets += uImage 94$(obj)/uImage.lzma: $(obj)/vmlinux.bin.lzma FORCE
55$(obj)/uImage: $(obj)/uImage.gz FORCE 95 $(call if_changed,uimage,lzma)
96
97$(obj)/uImage.lzo: $(obj)/vmlinux.bin.lzo FORCE
98 $(call if_changed,uimage,lzo)
99
100$(obj)/uImage: $(obj)/uImage.$(suffix-y)
56 @ln -sf $(notdir $<) $@ 101 @ln -sf $(notdir $<) $@
57 @echo ' Image $@ is ready' 102 @echo ' Image $@ is ready'