Subject: 2.4.22 Kernel Build Error

From: Shireesh Annam <[email-masked]>
Date: Thu, 15 Dec 2005 18:19:44 +0530

Hi:

I have an new AMD (Au1500) Bosporous Board and I intend to install
MIPS Kernel 2.4.22 (linux-14oct2003.tar.gz) provided on the AMD CD
provided along with the kit. I have been through the
www.linux-mips.org website.

I have installed the Linux/386 cross for big-endian target i.e. MIPS
SDE 6.02.03 from ftp.mips.com on a Red Hat host.

After that when I try to build the kernel using the following command:
$make ARCH=mips CROSS_COMPILE=mips-linux- zImage

I get the following error.

mips-linux-gcc -D__KERNEL__ -I/root/MipsLinux/oct2003/linux/include
-Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -fomit-frame-pointer -I
/root/MipsLinux/oct2003/linux/include/asm/gcc -G 0 -mno-abicalls
-fno-pic -pipe  -mabi=32 -mcpu=r4600 -mips2 -Wa,--trap  
-DKBUILD_BASENAME=main -c -o init/main.o init/main.c
cc1: error: invalid option `-mcpu=r4600'
make: *** [init/main.o] Error 1

I have selected MIPS32 for the CPU Architecture and the toolchain
doesn't seem to recognize the r4600 option.

Could someone throw any light on this? I'm not able to move ahead
since I'm not able to build the kernel itself. Could someone help me
in recommending the right toolchain for this build?

Thanks,
Shireesh

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 15 Dec 2005 14:51:32 +0000

> doesn't seem to recognize the r4600 option.

You're trying to build a stoneage kernel with a much newer compiler -
SDE 6 uses gcc 3.4 - which doesn't work.  Use an older compiler such
as gcc <= 3.3.x.  SDE 5.x contains gcc 2.96 btw.

  Ralf

---

From: Shireesh Annam <[email-masked]>
Date: Fri, 16 Dec 2005 00:18:50 +0530

I'm now using the SDE-Linux 5.03.06 for the big-endian target. I
started the 2.4.22 kernel build process, but soon I get the following
compile error.

**********
make[2]: Entering directory `/root/linux/arch/mips/mm'
mips-linux-gcc -D__KERNEL__ -I/root/linux/include -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing
-fno-common -fomit-frame-pointer -I /root/linux/include/asm/gcc -G 0
-mno-abicalls -fno-pic -pipe  -mabi=32 -mcpu=r4600 -mips2 -Wa,--trap  
-nostdinc -iwithprefix include -DKBUILD_BASENAME=sc_ip22  -c -o
sc-ip22.o sc-ip22.c
{standard input}: Assembler messages:
{standard input}:126: Error: Number (0x9000000080000000) larger than 32 bits
{standard input}:148: Error: Number (0x9000000080000000) larger than 32 bits
{standard input}:168: Error: Number (0x9000000080000000) larger than 32 bits
make[2]: *** [sc-ip22.o] Error 1
make[2]: Leaving directory `/root/linux/arch/mips/mm'
make[1]: *** [first_rule] Error 2
make[1]: Leaving directory `/root/linux/arch/mips/mm'
make: *** [_dir_arch/mips/mm] Error 2

**********

I'm not able to understand these error messages. Could someone throiw
some light on this issue? Is this because of the toolchain that I'm
using for building the kernel?

Thanks,
Shireesh

---

From: Shireesh Annam <[email-masked]>
Date: Sun, 18 Dec 2005 11:18:29 +0530

I repated the build process with the kernel versions 2.4.25 and 2.4.27
and I got the same errors. I downloaded these kernels from
linux-mips.org through CVS.

Can someone please explain me the mistake that I seem to be
committing? I'm a newbie to Linux/MIPS arena and so find these errors
very confusing.

Thanks,
Shireesh

> On 12/16/05, Shireesh Annam <[email-masked]> wrote: