linux-mips
[Top] [All Lists]

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

To: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Subject: Re: [PATCH] MIPS: Calculate VMLINUZ_LOAD_ADDRESS based on the length of vmlinux.bin
From: wu zhangjin <wuzhangjin@gmail.com>
Date: Tue, 31 Aug 2010 23:11:16 +0800
Cc: ralf@linux-mips.org, linux-mips@linux-mips.org, 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:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=0nPhYjJRLAVO7pPIlCp5BWGIxd0BwPplVTEruZo+m5Q=; b=B4MMrPJCErNJBzeOD3Dze4nbYh19TyG49s1ouSPP3UF7W3WIRStbXGUpsXrqrXWa3v kSI9Uct1VcAyIGdDDCyWc1OQ57yLHF1KJZmamjZvpnVtAg5vt8jjriC8qY4xsFSETFPN v7r6PGZv3SwLiE+9cZlvXnxrgpJoYa+XnI3eQ=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=OV/TGAUTAvknALwJ5YrXxdxgmb/+6VLGhDgHe1W3u14PgNXasyw8smDZp0Y/bRwvPL UNoO91bePTVAkGODJZ2h4QsELqBbW5MMEE8LGt7Q0BYVPTjwPUIoMlcGqMdx2JVCAzbH ZbQh6OijHV+FCvnd50gaVjzkhFndg0VPM418k=
In-reply-to: <4c7cd856.cb71df0a.1986.ffffad0f@mx.google.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4c7cd856.cb71df0a.1986.ffffad0f@mx.google.com>
Sender: linux-mips-bounce@linux-mips.org
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
>

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