Commit b76a4c1a authored by Andrew Bresticker's avatar Andrew Bresticker Committed by Ralf Baechle

MIPS: Allow platforms to specify the decompressor load address

Platforms which use raw zboot images may need to link the image at
a fixed address if there is no other way to communicate the load
address to the bootloader.  Allow the per-platform Kbuild files
to specify an optional zboot image load address (zload-y) and fall
back to calc_vmlinuz_load_addr if unset.
Signed-off-by: default avatarAndrew Bresticker <abrestic@chromium.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Ezequiel Garcia <ezequiel.garcia@imgtec.com>
Cc: James Hartley <james.hartley@imgtec.com>
Cc: James Hogan <james.hogan@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/9566/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent d631fc60
...@@ -12,6 +12,8 @@ ...@@ -12,6 +12,8 @@
# Author: Wu Zhangjin <wuzhangjin@gmail.com> # Author: Wu Zhangjin <wuzhangjin@gmail.com>
# #
include $(srctree)/arch/mips/Kbuild.platforms
# set the default size of the mallocing area for decompressing # set the default size of the mallocing area for decompressing
BOOT_HEAP_SIZE := 0x400000 BOOT_HEAP_SIZE := 0x400000
...@@ -66,8 +68,8 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE ...@@ -66,8 +68,8 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
# Calculate the load address of the compressed kernel image # Calculate the load address of the compressed kernel image
hostprogs-y := calc_vmlinuz_load_addr hostprogs-y := calc_vmlinuz_load_addr
ifeq ($(CONFIG_MACH_JZ4740),y) ifneq ($(zload-y),)
VMLINUZ_LOAD_ADDRESS := 0x80600000 VMLINUZ_LOAD_ADDRESS := $(zload-y)
else else
VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \ VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
$(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS)) $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
......
platform-$(CONFIG_MACH_JZ4740) += jz4740/ platform-$(CONFIG_MACH_JZ4740) += jz4740/
cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740 cflags-$(CONFIG_MACH_JZ4740) += -I$(srctree)/arch/mips/include/asm/mach-jz4740
load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000 load-$(CONFIG_MACH_JZ4740) += 0xffffffff80010000
zload-$(CONFIG_MACH_JZ4740) += 0xffffffff80600000
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment