diff options
Diffstat (limited to 'arch/mips/boot/compressed/Makefile')
-rw-r--r-- | arch/mips/boot/compressed/Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile index 671d3448fad4..9df903d714d7 100644 --- a/arch/mips/boot/compressed/Makefile +++ b/arch/mips/boot/compressed/Makefile | |||
@@ -14,8 +14,11 @@ | |||
14 | 14 | ||
15 | # compressed kernel load addr: VMLINUZ_LOAD_ADDRESS > VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE | 15 | # compressed kernel load addr: VMLINUZ_LOAD_ADDRESS > VMLINUX_LOAD_ADDRESS + VMLINUX_SIZE |
16 | VMLINUX_SIZE := $(shell wc -c $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | cut -d' ' -f1) | 16 | VMLINUX_SIZE := $(shell wc -c $(objtree)/$(KBUILD_IMAGE) 2>/dev/null | cut -d' ' -f1) |
17 | VMLINUX_SIZE := $(shell [ -n "$(VMLINUX_SIZE)" ] && echo $$(($(VMLINUX_SIZE) + (65536 - $(VMLINUX_SIZE) % 65536)))) | 17 | VMLINUX_SIZE := $(shell [ -n "$(VMLINUX_SIZE)" ] && echo -n $$(($(VMLINUX_SIZE) + (65536 - $(VMLINUX_SIZE) % 65536)))) |
18 | VMLINUZ_LOAD_ADDRESS := 0x$(shell [ -n "$(VMLINUX_SIZE)" ] && printf %x $$(($(VMLINUX_LOAD_ADDRESS) + $(VMLINUX_SIZE)))) | 18 | # VMLINUZ_LOAD_ADDRESS = concat "high32 of VMLINUX_LOAD_ADDRESS" and "(low32 of VMLINUX_LOAD_ADDRESS) + VMLINUX_SIZE" |
19 | HIGH32 := $(shell A=$(VMLINUX_LOAD_ADDRESS); [ $${\#A} -gt 10 ] && expr substr "$(VMLINUX_LOAD_ADDRESS)" 3 $$(($${\#A} - 10))) | ||
20 | LOW32 := $(shell [ -n "$(HIGH32)" ] && A=11 || A=3; expr substr "$(VMLINUX_LOAD_ADDRESS)" $${A} 8) | ||
21 | VMLINUZ_LOAD_ADDRESS := 0x$(shell [ -n "$(VMLINUX_SIZE)" -a -n "$(LOW32)" ] && printf "$(HIGH32)%08x" $$(($(VMLINUX_SIZE) + 0x$(LOW32)))) | ||
19 | 22 | ||
20 | # set the default size of the mallocing area for decompressing | 23 | # set the default size of the mallocing area for decompressing |
21 | BOOT_HEAP_SIZE := 0x400000 | 24 | BOOT_HEAP_SIZE := 0x400000 |
@@ -41,9 +44,11 @@ $(obj)/vmlinux.bin: $(KBUILD_IMAGE) | |||
41 | suffix_$(CONFIG_KERNEL_GZIP) = gz | 44 | suffix_$(CONFIG_KERNEL_GZIP) = gz |
42 | suffix_$(CONFIG_KERNEL_BZIP2) = bz2 | 45 | suffix_$(CONFIG_KERNEL_BZIP2) = bz2 |
43 | suffix_$(CONFIG_KERNEL_LZMA) = lzma | 46 | suffix_$(CONFIG_KERNEL_LZMA) = lzma |
47 | suffix_$(CONFIG_KERNEL_LZO) = lzo | ||
44 | tool_$(CONFIG_KERNEL_GZIP) = gzip | 48 | tool_$(CONFIG_KERNEL_GZIP) = gzip |
45 | tool_$(CONFIG_KERNEL_BZIP2) = bzip2 | 49 | tool_$(CONFIG_KERNEL_BZIP2) = bzip2 |
46 | tool_$(CONFIG_KERNEL_LZMA) = lzma | 50 | tool_$(CONFIG_KERNEL_LZMA) = lzma |
51 | tool_$(CONFIG_KERNEL_LZO) = lzo | ||
47 | $(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin | 52 | $(obj)/vmlinux.$(suffix_y): $(obj)/vmlinux.bin |
48 | $(call if_changed,$(tool_y)) | 53 | $(call if_changed,$(tool_y)) |
49 | 54 | ||