linux-mips
[Top] [All Lists]

[PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmli

To: ralf@linux-mips.org, wuzhangjin@gmail.com, linux-mips@linux-mips.org
Subject: [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
From: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Date: Tue, 31 Aug 2010 13:24:19 +0300
Cc: alex@digriz.org.uk, manuel.lauss@googlemail.com, sam@ravnborg.org, linux-kernel@vger.kernel.org
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:cc :subject:x-mailer:mime-version:content-type :content-transfer-encoding; bh=Y2NF4gRPzbqeC0mkYN6l0h6ka5HsLzPJhWIZGEbb0wE=; b=AIpC+48Xe2loCKY1lh7HGZZqOtHdTH+v8S0tr/hjV2dCwyCJWnU60canOJNrzeJEmZ Q0U5e33Xv2Ig2PitpLnxPKF8kNUDNHNjL1q7K0YF+j/6bFBDzGByTKWITQbjgKDFNItQ xBYUT4xSTeOhmjUrzyp2eYZjodJj5AABPLeYI=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:cc:subject:x-mailer:mime-version :content-type:content-transfer-encoding; b=IL2tbyCxOfdeGNU9DjYArUbUz92UhozGzLbTDxYZkWEbcr0L+99dXHsmkSGqTOZvsR LeOdXYR6qG9SGAmfoRfX9TOnPK5htLStM+1W7aeMl3u2TMOgHoTfV69wRQwdtKCoAy99 6kikw0hnHO89GEGKPBd4cauqTTc6N8o3yPGTg=
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
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

<Prev in Thread] Current Thread [Next in Thread>