Subject: does someone succeed in making the toolchain for 2.6 kernel?

From: zhuzhenhua <[email-masked]>
Date: Wed, 21 Dec 2005 16:51:35 +0800

i want to compile a 2.6.14 kernel for mips 4kec, does someone compile
the 2.6 kernel with self-build toolchain? how to select the gcc,
gdb,glibc,linux head and binutils version?
and where to get the guide doc?

Best regards!

zhuzhenhua

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Wed, 21 Dec 2005 09:55:39 +0100

> and where to get the guide doc?

After you've built your toolchain, it's either an additional native
one (gcc-4.1), or you've build some kind of cross-toolchain that got a
prefix (mips-linux-gcc).

In the former case, you'd be able to "make CC=gcc-4.1" a kernel, in
the later case you call make like "make CROSS_COMPILE=vax-linux-".

MfG, JBG

-- 
Jan-Benedict Glaw       [email-masked]    . +49-172-7608481             _ O _
"Eine Freie Meinung in  einem Freien Kopf    | Gegen Zensur | Gegen Krieg  _ _ O
 für einen Freien Staat voll Freier Bürger"  | im Internet! |   im Irak!   O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));

---

From: Pete Popov <[email-masked]>
Date: Wed, 21 Dec 2005 00:57:12 -0800

On Wed, 2005-12-21 at 16:51 +0800, zhuzhenhua wrote:
> the 2.6 kernel with self-build toolchain? 

Quite a few people have, I'm sure.

> how to select the gcc,

If you have such questions, I would suggest you start by compiling and
booting your kernel with a toolchain and distribution that already
works. Build your own toolchain, if you must, later.

Pete

---

From: zhuzhenhua <[email-masked]>
Date: Wed, 21 Dec 2005 17:04:25 +0800

sorry to not describle clearly
i want to know how to build the cross-compile toolchain

On 12/21/05, Jan-Benedict Glaw <[email-masked]> wrote:
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
>
> iD8DBQFDqRiLHb1edYOZ4bsRArKbAKCH4JLwRjHur6/JQ8oufY7+N/4/QwCeJ5hI
> wDSqqScrhupXQYHxdhzGtiA=
> =yOYf
> -----END PGP SIGNATURE-----
>
>
>

Best regards
zhuzhenhua

---

From: zhuzhenhua <[email-masked]>
Date: Wed, 21 Dec 2005 17:06:36 +0800

i am not sure which toolchain can work for the 2.6 kernel
can you suggest one?
thanks

Best regards
zhuzhenhua

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Wed, 21 Dec 2005 10:18:52 +0100

> i want to know how to build the cross-compile toolchain

Building a working toolchain for kernel-only work isn't _that_ hard
(though, if you've never done that, you may find yourself asking
Google for a month or two...)

As a good starting point, go to http://www.kegel.com/crosstool/ .

MfG, JBG

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Wed, 21 Dec 2005 10:22:08 +0100

> i am not sure which toolchain can work for the 2.6 kernel

That's a hard question... 2.95.x compilers used to work and were quite
fast, but newer GCC's features are incorporated into the kernel
sources so it probably will no longer work. Some 3.x based GCC should
probably work.

I am using GCC and binutils right from CVS/SVN in their HEAD
revisions, but not for MIPS. Works for me.

MfG, JBG

---

From: "Kevin D. Kissell" <[email-masked]>
Date: Wed, 21 Dec 2005 10:47:21 +0100

I've been using the 6.02 MIPS SDE for my 2.6 kernel builds.  I'm not
100% certain that it's exactly the same one that you'll find on the page at
http://www.linux-mips.org/wiki/MIPS_SDE_Installation
but it's close enough where I'd suggest at least giving it a try.

            Regards,

            Kevin K.

---

From: Matej Kupljen <[email-masked]>
Date: Wed, 21 Dec 2005 11:02:34 +0100

Hi

> As a good starting point, go to http://www.kegel.com/crosstool/ .

Yes, we use crosstool, but the results matrix isn't rely
encouraging:
http://www.kegel.com/crosstool/crosstool-0.38/buildlogs/

BR,
Matej

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Wed, 21 Dec 2005 11:06:19 +0100

> http://www.kegel.com/crosstool/crosstool-0.38/buildlogs/

Well, try do do it any better *yourself*. Compiling a complete
toolchain (incl. userland support) really isn't easy...

MfG, JBG

---

From: "P. Christeas" <[email-masked]>
Date: Wed, 21 Dec 2005 12:27:07 +0200

> As a good starting point, go to http://www.kegel.com/crosstool/ .

I have been using the toolchain of OpenWRT. (it builds uClibs rather than 
glibc)

However, I am noting some instability of the system and that *could* be 
because of gcc. I am reading that you also have some trouble with the 
instructions it generates.

---

From: Matej Kupljen <[email-masked]>
Date: Wed, 21 Dec 2005 11:32:16 +0100

Hi

> toolchain (incl. userland support) really isn't easy...

You probably misunderstood me :(

I was trying to say, that we use crosstool *successfully* to build
kernel 2.6.15-rc5 (and a bunch of user land binaries) and that
this matrix should be updated.

If someone looks at this matrix, he thinks that for mips(el) crosstool
does not work.

BR,
Matej

---

From: zhuzhenhua <[email-masked]>
Date: Wed, 21 Dec 2005 18:37:58 +0800

> If someone looks at this matrix, he thinks that for mips(el) crosstool
  you are right, as i see the matrix, i just think it can't work for mips
with your reply, i want to try this
thanks!

Best regards!
zhuzhenhua

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 21 Dec 2005 20:00:14 +0100

On Wed, Dec 21, 2005 at 10:22:08AM +0100, Jan-Benedict Glaw wrote:

> sources so it probably will no longer work.

There are still users building the kernel with gcc 2.95 and 2.96
successfully.

  Ralf

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Wed, 21 Dec 2005 21:29:37 +0100

> There are still users building the kernel with gcc 2.95 and 2.96

I guess evolution will get'em all... And that of course depends on how
much you take part in it. Only compiling a minimum set of drivers will
probably help you out for some time :->

MfG, JBG

---

From: zhuzhenhua <[email-masked]>
Date: Thu, 22 Dec 2005 10:43:31 +0800

> If someone looks at this matrix, he thinks that for mips(el) crosstool

i have use the crosstool to try,but i get a
"#error "glibc cannot be compiled without optimization"
what CFLAGS and CXXFLAGS should  to set in demo-mipsel.sh

BR,
zhuzhenhua

---

From: Jan-Benedict Glaw <[email-masked]>
Date: Thu, 22 Dec 2005 09:57:36 +0100

> what CFLAGS and CXXFLAGS should  to set in demo-mipsel.sh

At least -O I guess, or -O2.

MfG, JBG

---

From: zhuzhenhua <[email-masked]>
Date: Thu, 22 Dec 2005 17:05:58 +0800

> At least -O I guess, or -O2.

in the mipsel.dat it has define -O2，
i try -O and -O2,both failed

> iD8DBQFDqmqAHb1edYOZ4bsRAt4fAJ9KOYR7/2H4kbVWJo077dlt5fVaPQCfdTQT
> 5cKoKa8Pm5eIfvJBPi3kq8c=
> =gfd8
Best regards
zhuzhenhua

---

From: Matej Kupljen <[email-masked]>
Date: Thu, 22 Dec 2005 10:23:18 +0100

Hi

> what CFLAGS and CXXFLAGS should  to set in demo-mipsel.sh

If you mean mipsel.dat then I have this defined:

KERNELCONFIG=`pwd`/mipsel.config
TARGET=mipsel-linux
TARGET_CFLAGS="-O2 -finline-limit=10000"
GCC_EXTRA_CONFIG="--with-float=soft"
GLIBC_EXTRA_CONFIG="--without-fp"
BINUTILS_EXTRA_CONFIG="--enable-shared"

Note, I have additional patches for "real SF".

I have no flags set in demo-mipsel.sh

BR,
Matej

---

From: zhuzhenhua <[email-masked]>
Date: Thu, 22 Dec 2005 17:30:42 +0800

> I have no flags set in demo-mipsel.sh

thanks,
another question: do you change the demo-mipsel.sh to eval another sh or just
keep the
 eval `cat mipsel.dat gcc-3.4.2-glibc-2.2.5.dat`        sh all.sh --notest

Best Regards

zhuzhenhua

---

From: Matej Kupljen <[email-masked]>
Date: Thu, 22 Dec 2005 10:46:10 +0100

Hi

>  eval `cat mipsel.dat gcc-3.4.2-glibc-2.2.5.dat`        sh all.sh --notest

eval `cat mipsel-sf.dat gcc-3.4.4-glibc-2.3.5-hdrs-2.6.11.2.dat`
sh all.sh --notest

(mipsel-sf.dat contains what I have written in a previous mail.)

BR,
Matej

---

From: "Stephen P. Becker" <[email-masked]>
Date: Thu, 22 Dec 2005 08:29:35 -0500

> what CFLAGS and CXXFLAGS should  to set in demo-mipsel.sh

Do you only want to build kernels, or do you want to build userland 
stuff also?  You have indicated the former, but not the latter, in which 
case you really only need binutils and gcc (a static, C-only bootstrap 
gcc works fine for compiling a kernel).

-Steve

---

From: zhuzhenhua <[email-masked]>
Date: Fri, 23 Dec 2005 12:46:10 +0800

> gcc works fine for compiling a kernel).
sorry to not discribe clearly, i want to build the toolchain both for
kernel nand userland stuff.

and i succeed now  using the crosstool with Matej Kupljen's advices.
thanks all！

best regards

zhuzhenhua