public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* error compiling kernel for mips
@ 2002-04-03 19:05 Abdij Bhat
  2002-04-03 19:24 ` Justin Carlson
  2002-04-03 20:05 ` [Linux-mips-kernel]error " M. R. Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Abdij Bhat @ 2002-04-03 19:05 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org',
	'linux-mips-kernel@lists.sourceforge.net'
  Cc: Abdij Bhat

Hi,
 When i try compiling the Kernel for mips i get errors. The kernel is 2.4.17
downloaded from www.kernel.org. I have the mips developments environment
set. I have (hopefully) the right headers and have modified the makefile to
get the headers from those include directories.
 My main problem is changing the architecture from arch686 ( mine ) to mips.
How to i do this? What do i need to do inorder for the make to get the right
architecture? Or is there some other problem too?

 Here is the error listing

mipsel-linux-gcc -D__KERNEL__ -I/usr/tools/mipsel-linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe  -march=i686   -c -o init/main.o
init/main.c
cc1: bad value (i686) for -march= switch
Assembler messages:
Fatal error: invalid architecture -march=i686
make: *** [init/main.o] Error 2

Thanks and Regards,
Abdij


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

* Re: error compiling kernel for mips
  2002-04-03 19:05 error compiling kernel for mips Abdij Bhat
@ 2002-04-03 19:24 ` Justin Carlson
  2002-04-04 17:12   ` Maciej W. Rozycki
  2002-04-03 20:05 ` [Linux-mips-kernel]error " M. R. Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Justin Carlson @ 2002-04-03 19:24 UTC (permalink / raw)
  To: Abdij Bhat; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]

On Wed, 2002-04-03 at 14:05, Abdij Bhat wrote:
> Hi,
>  When i try compiling the Kernel for mips i get errors. The kernel is 2.4.17
> downloaded from www.kernel.org. I have the mips developments environment
> set. I have (hopefully) the right headers and have modified the makefile to
> get the headers from those include directories.
>  My main problem is changing the architecture from arch686 ( mine ) to mips.
> How to i do this? What do i need to do inorder for the make to get the right
> architecture? Or is there some other problem too?
> 

Check out this line in the base level makefile:

ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
s/arm.*/arm/ -e s/sa110/arm/)

This actually looks broken for cross-compile, but I haven't been
following the changes particularly closely...try using this instead:

ARCH := mips

Really, though if you're compiling for mips you should probably grab the
mips-linux CVS sources here:

 cvs -d :pserver:cvs@oss.sgi.com:/cvs login
   (Only needed the first time you use anonymous CVS, the password is
"cvs")
   cvs -d :pserver:cvs@oss.sgi.com:/cvs co <repository>

There's a 2.4 tagged branch that's probably closer to what you want. You
can ask for mips-specific on linux-mips@oss.sgi.com, and you'll be much
more likely to get a prompt and useful answer.

-Justin


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]

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

* Re: [Linux-mips-kernel]error compiling kernel for mips
  2002-04-03 19:05 error compiling kernel for mips Abdij Bhat
  2002-04-03 19:24 ` Justin Carlson
@ 2002-04-03 20:05 ` M. R. Brown
  1 sibling, 0 replies; 4+ messages in thread
From: M. R. Brown @ 2002-04-03 20:05 UTC (permalink / raw)
  To: Abdij Bhat
  Cc: 'linux-kernel@vger.kernel.org',
	'linux-mips-kernel@lists.sourceforge.net'

[-- Attachment #1: Type: text/plain, Size: 761 bytes --]

* Abdij Bhat <Abdij.Bhat@kshema.com> on Thu, Apr 04, 2002:

> Hi,
>  When i try compiling the Kernel for mips i get errors. The kernel is 2.4.17
> downloaded from www.kernel.org. I have the mips developments environment
> set. I have (hopefully) the right headers and have modified the makefile to
> get the headers from those include directories.
>  My main problem is changing the architecture from arch686 ( mine ) to mips.
> How to i do this? What do i need to do inorder for the make to get the right
> architecture? Or is there some other problem too?
> 

You need to pass something like:

$ make ARCH=mips CROSS_COMPILE=mipsel-linux- config dep clean vmlinux

So that the kernel build system knows that you are cross-compiling.

M. R.

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

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

* Re: error compiling kernel for mips
  2002-04-03 19:24 ` Justin Carlson
@ 2002-04-04 17:12   ` Maciej W. Rozycki
  0 siblings, 0 replies; 4+ messages in thread
From: Maciej W. Rozycki @ 2002-04-04 17:12 UTC (permalink / raw)
  To: Justin Carlson; +Cc: Abdij Bhat, linux-kernel

On 3 Apr 2002, Justin Carlson wrote:

> Check out this line in the base level makefile:
> 
> ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e
> s/arm.*/arm/ -e s/sa110/arm/)
> 
> This actually looks broken for cross-compile, but I haven't been
> following the changes particularly closely...try using this instead:
> 
> ARCH := mips

 Or shortly:

$ make "ARCH=<arch>" "CROSS_COMPILE=<prefix>" <whatever>

Here <arch> is "mips" and <prefix> is whatever prefix is is used for your
cross-compiling toolchain (e.g. "mips-linux-" or "mipsel-linux-", etc.).

> Really, though if you're compiling for mips you should probably grab the
> mips-linux CVS sources here:
> 
>  cvs -d :pserver:cvs@oss.sgi.com:/cvs login
>    (Only needed the first time you use anonymous CVS, the password is
> "cvs")
>    cvs -d :pserver:cvs@oss.sgi.com:/cvs co <repository>
> 
> There's a 2.4 tagged branch that's probably closer to what you want. You
> can ask for mips-specific on linux-mips@oss.sgi.com, and you'll be much
> more likely to get a prompt and useful answer.

 Actually 2.4.19 should contain most bits from the current linux_2_4
branch from oss.  Just grab the current "-pre" version.

 Getting a CVS snapshot from oss is certainly a solution as well, but the
server seems to be broken for the last few days (including its CVS server,
its mailing list server and its web server).

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +


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

end of thread, other threads:[~2002-04-04 17:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-03 19:05 error compiling kernel for mips Abdij Bhat
2002-04-03 19:24 ` Justin Carlson
2002-04-04 17:12   ` Maciej W. Rozycki
2002-04-03 20:05 ` [Linux-mips-kernel]error " M. R. Brown

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