linux-mips
[Top] [All Lists]

Re: Building 64 bit kernel on Cobalt

To: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Subject: Re: Building 64 bit kernel on Cobalt
From: Thiemo Seufer <ths@networkno.de>
Date: Sat, 24 Mar 2007 23:16:02 +0000
Cc: kumba@gentoo.org, linux-mips@linux-mips.org, vagabon.xyz@gmail.com
In-reply-to: <20070324.234727.25910303.anemo@mba.ocn.ne.jp>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <4603DA74.70707@gentoo.org> <20070324.002440.93023010.anemo@mba.ocn.ne.jp> <46049BAD.1010705@gentoo.org> <20070324.234727.25910303.anemo@mba.ocn.ne.jp>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.13 (2006-08-11)
Atsushi Nemoto wrote:
> On Fri, 23 Mar 2007 23:31:57 -0400, Kumba <kumba@gentoo.org> wrote:
> > Well, o64 went away as we all know.  It was never a favourable
> > option for very good reasons (although I used it right up until it
> > died and I was forced off of it).  The replacement for it, that was
> > more preferred and resulted in similar code was building a kernel
> > for any of these three systems using CONFIG_BUILD_ELF64 + -msym32
> > (auto selected in the Makefile) + the make vmlinux.32 target.  I
> > believe this method is what Debian uses for building their mips
> > kernels for SGI systems, but don't quote me on that.  If someone
> > from Debian wants to comment, please do.
> 
> The replacement is CONFIG_BUILD_ELF64=n (it adds -msym32 option) +
> CONFIG_BOOT_ELF32=y (it adds vmlinux.32 to "all" target).  Not
> CONFIG_BUILD_ELF64=y.
> 
> CONFIG_BUILD_ELF64=n enables -msym32 option, which means the kernel
> load address should be CKSEG0.

This sounds wrong to me, since CONFIG_BUILD_ELF64=n will build a
ELF64 kernel (from compiler/linker POV). This tricks people into
believing they need no ELF64 capable toolchain for a 64bit kernel.

IMO -msym32 should depend on:
    ((Compiler can do -msym32)
     && (load address is in ckseg0)
     && CONFIG_64BIT)

which obsoletes the whole CONFIG_BUILD_ELF* stuff.


Thiemo

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