Subject: kernel build problem.

From: Alex deVries <[email-masked]>
Date: Tue, 22 Dec 1998 18:26:08 -0500 (EST)

So, I'm building 2.1.121 that's in cvs using egcs-2.90.27 980315 and
binutils  2.8.1.  Both are from Rough Cuts.

Here's the error:

make[2]: Entering directory `/usr/src/linux/arch/mips/mm'
egcs -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes -O2
-fomit-frame-pointer -G 0 -mno-abicalls -fno-pic -mcpu=r4600 -mips2 -pipe
-c -o r6000.o r6000.c
{standard input}: Assembler messages:
{standard input}:384: Warning: Unmatched %hi reloc
{standard input}:487: Internal error!
Assertion failure in tc_gen_reloc at ./config/tc-mips.c line 10203.
Please report this bug.
make[2]: *** [r6000.o] Error 1
make[2]: Leaving directory `/usr/src/linux/arch/mips/mm'

Any ideas on what I should do here?  Also, Ralf, are you going to upload
2.1.131 soon?

- Alex

-- 
Alex deVries, puffin on LinuxNet.
I know exactly what I want in life.

---

From: [email-masked]
Date: Wed, 23 Dec 1998 05:44:40 +0100

> make[2]: Leaving directory `/usr/src/linux/arch/mips/mm'

Add -mno-split-addresses to CFLAGS.  Your egcs still enables that optimization
by default.

> Any ideas on what I should do here?  Also, Ralf, are you going to upload

Somewhen, when it's working and when I'm done with more urgent non-software
things of live ...

  Ralf

---

From: Alex deVries <[email-masked]>
Date: Thu, 24 Dec 1998 10:31:16 -0500 (EST)

> Add -mno-split-addresses to CFLAGS.  Your egcs still enables that optimization

Alright.  That made it build.

Now when I build it and boot that kernel I get in the Command Monitor:

Exception: <vector=UTLB Miss>
Status register: 0x300004803<CU1,CU0,IM4,IPL=???,MODE=KERNEL,EXL,IE>
Cause register: 0x8008<CE=0,IP8,EXC=RMISS>
Exception PC: 0x881385cc, Exception RA: 0x88002614
exception, bad address: 0x47c4
Local I/O interrupt register 1: 0x80 <VR/GIO2>
  Saved user regs in hex (&gpda 0xa8740e48, &_regs 0xa8741048):
  arg: 7 8bfff938 8bfffc4d 880025dc
  tmp: 8818c14c 8818c14c 10 881510c4 14 8bfad9e0 0 48
  sve: 8bfdf3e8 8bfffc40 8bfb2720 8bfff938 a8747420 9fc56394 0 9fc56394
  t8 48 t9 8bfffee66 at 1 v0 0 v1 8bfff890 k1 bad11bad
  gp 881dfd90 fp 9fc4be88 sp 8bfff8b8 ra 88002614

PANIC: Unexpected exception

I can mail my .config if that helps.

- Alex

---

From: [email-masked]
Date: Fri, 25 Dec 1998 18:14:40 +0100

>clickety faq<

[...]
  5.2.  Self compiled kernels crash when booting.

  When I build my own kernel and it crashes.  On an Indy the crash
  message looks like the following but the same problem hits other
  machines as well and there what happens may look completly different.

  This problem is caused by a still unfixed bug in Binutils newer than
  version 2.7.  As a workaround, remove the -N flags from LDFLAGS in
  arch/mips/Makefile and relink the kernel.
[...]

  Ralf

---

From: Alex deVries <[email-masked]>
Date: Fri, 25 Dec 1998 23:08:01 -0500 (EST)

>   arch/mips/Makefile and relink the kernel.

I should know that, seeing as how I've complained about it about 10,000
times. Sorry.

However, that last sentence should read:

As a workaround, change the following line in arch/mips/Makefile from:

LINKFLAGS       = -static -N

to:

LINKFLAGS       = -static

- Alex