public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
@ 2010-08-31 10:24 Shmulik Ladkani
  2010-08-31 15:11 ` wu zhangjin
  0 siblings, 1 reply; 2+ messages in thread
From: Shmulik Ladkani @ 2010-08-31 10:24 UTC (permalink / raw)
  To: ralf, wuzhangjin, linux-mips; +Cc: alex, manuel.lauss, sam, linux-kernel

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 <shmulik.ladkani@gmail.com>
---
diff --git a/arch/mips/boot/compressed/Makefile b/arch/mips/boot/compressed/Makefile
index ed9bb70..5fd7f7a 100644
--- a/arch/mips/boot/compressed/Makefile
+++ b/arch/mips/boot/compressed/Makefile
@@ -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
 
-- 
Shmulik Ladkani

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
  2010-08-31 10:24 [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin Shmulik Ladkani
@ 2010-08-31 15:11 ` wu zhangjin
  0 siblings, 0 replies; 2+ messages in thread
From: wu zhangjin @ 2010-08-31 15:11 UTC (permalink / raw)
  To: Shmulik Ladkani; +Cc: ralf, linux-mips, alex, manuel.lauss, sam, linux-kernel

Hi,

This is a very good fix:

$ ls -sh arch/mips/boot/compressed/vmlinux.bin vmlinux
5.4M arch/mips/boot/compressed/vmlinux.bin  6.9M vmlinux

Thanks very much.

Acked-by: Wu Zhangjin <wuzhangjin@gmail.com>

Regards,
Wu Zhangjin

On 8/31/10, Shmulik Ladkani <shmulik.ladkani@gmail.com> wrote:
> 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 <shmulik.ladkani@gmail.com>
> ---
> diff --git a/arch/mips/boot/compressed/Makefile
> b/arch/mips/boot/compressed/Makefile
> index ed9bb70..5fd7f7a 100644
> --- a/arch/mips/boot/compressed/Makefile
> +++ b/arch/mips/boot/compressed/Makefile
> @@ -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
>
> --
> Shmulik Ladkani
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-31 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-31 10:24 [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin Shmulik Ladkani
2010-08-31 15:11 ` wu zhangjin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox