MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
authorShmulik Ladkani <[email protected]>
Tue, 31 Aug 2010 10:24:19 +0000 (13:24 +0300)
committerRalf Baechle <[email protected]>
Mon, 4 Oct 2010 17:34:00 +0000 (18:34 +0100)
Fix VMLINUZ_LOAD_ADDRESS calculation to be based on the length of
vmlinux.bin, the actual uncompressed kernel binary.

Previously it was based on the length of KBUILD_IMAGE (the unstripped ELF
vmlinux), which is bigger than vmlinux.bin.  As a result, vmlinuz was
loaded into a memory address higher then actually needed - a problem for
small memory platforms.

Signed-off-by: Shmulik Ladkani <[email protected]>
To: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/1564/
Acked-by: Wu Zhangjin <[email protected]>
Signed-off-by: Ralf Baechle <[email protected]>
arch/mips/boot/compressed/Makefile

index ed9bb709c9a3816a4738d0ceef91db8c8de20cd4..5fd7f7a58b7eb9b02446e8ea2aa3e2e9b1e48e8f 100644 (file)
@@ -59,7 +59,7 @@ $(obj)/piggy.o: $(obj)/dummy.o $(obj)/vmlinux.bin.z FORCE
 hostprogs-y := calc_vmlinuz_load_addr
 
 VMLINUZ_LOAD_ADDRESS = $(shell $(obj)/calc_vmlinuz_load_addr \
-               $(objtree)/$(KBUILD_IMAGE) $(VMLINUX_LOAD_ADDRESS))
+               $(obj)/vmlinux.bin $(VMLINUX_LOAD_ADDRESS))
 
 vmlinuzobjs-y += $(obj)/piggy.o