Linux MIPS Architecture development
 help / color / mirror / Atom feed
* compiling kernel 2.6.13
@ 2005-08-31 13:59 Damian Dimmich
  2005-08-31 15:02 ` Ralf Baechle
  2005-08-31 15:12 ` Thiemo Seufer
  0 siblings, 2 replies; 11+ messages in thread
From: Damian Dimmich @ 2005-08-31 13:59 UTC (permalink / raw)
  To: linux-mips

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

Hello,

I had some trouble compiling 2.6.13 for the mips architecture.  I encountered 
two errors:

1)

In the file include/asm-mips/thread_info.h TIF_32BIT was undefined.

I added the following two lines which showed up in parisc and ppc64 's 
thread-info's.  Don't know if these values are correct or if this actually 
works.  It just gets it to compile...
#define TIF_32BIT               5       /* 32 bit binary */
#define _TIF_32BIT              (1<<TIF_32BIT)

The error was in drivers/input/evdev.c which includes 
include/asm-mips/thread_info.h

The error was:
 CC [M]  drivers/input/evdev.o
drivers/input/evdev.c: In function `evdev_write':
drivers/input/evdev.c:193: error: `TIF_32BIT' undeclared (first use in this 
function)
drivers/input/evdev.c:193: error: (Each undeclared identifier is reported only 
once
drivers/input/evdev.c:193: error: for each function it appears in.)
drivers/input/evdev.c: In function `evdev_read':
drivers/input/evdev.c:254: error: `TIF_32BIT' undeclared (first use in this 
function)


2)

When linking .tmp_vmlinux1, KSEG1ADDR and KSEG1 where reported as undefined 
and linking failed. 
 LD      .tmp_vmlinux1
arch/mips/sgi-ip22/built-in.o(.text+0x2854): In function `ip22_eisa_intr':
: undefined reference to `KSEG1ADDR'
arch/mips/sgi-ip22/built-in.o(.text+0x2864): In function `ip22_eisa_intr':
: undefined reference to `KSEG1ADDR'
arch/mips/sgi-ip22/built-in.o(.text+0x2870): In function `ip22_eisa_intr':
: undefined reference to `KSEG1ADDR'
arch/mips/sgi-ip22/built-in.o(.text+0x28ac): In function `ip22_eisa_intr':
: undefined reference to `KSEG1ADDR'
arch/mips/sgi-ip22/built-in.o(.text+0x28c0): In function `ip22_eisa_intr':
: undefined reference to `KSEG1ADDR'
arch/mips/sgi-ip22/built-in.o(.text+0x293c): more undefined references to 
`KSEG1ADDR' follow
make: *** [.tmp_vmlinux1] Error 1


I fixed this by adding the lines:
#define KSEG1ADDR(a)  (CPHYSADDR(a) | KSEG1)
#define KSEG1     0xa0000000
at the top of the file arch/mips/sgi-ip22/ip22-eisa.c
These are copied from include/asm/addrspace.h

I found it quite strange that it only failed when linking the kernel and not 
earlier.  The file asm/addrspace.h is included in ip22-eisa.c

eisa support is enabled and i'm compiling a 64 bit kernel.
gcc is: 
Reading specs from /usr/mips/lib/gcc-lib/mips-linux/3.3.3/specs
Configured with: ../configure --prefix=/usr/mips --exec-prefix=/usr/mips 
--target=mips-linux --enable-shared --disable-nls --disable-multilib 
--enable-languages=c,c++,ada,f77,objc
Thread model: posix
gcc version 3.3.3 (Debian)


Cheers,
Damian

[-- Attachment #2: ip22-eisa.c.patch --]
[-- Type: text/x-diff, Size: 301 bytes --]

34c34,35
< #include <asm/addrspace.h>
---
> //#include <asm/addrspace.h>
> #include <asm-mips/addrspace.h>
39a41,45
> //Force redefine.. seems to fail to find it when linking kernel itself.
> //This is probably no good..
> #define KSEG1ADDR(a)	(CPHYSADDR(a) | KSEG1)
> #define KSEG1     0xa0000000
> 

[-- Attachment #3: asm-mips.thread_info.h.patch --]
[-- Type: text/x-diff, Size: 327 bytes --]

38a39,45
> /*Copied these from parisc and ppc64 - don't know any better.  TIF_32BIT was 
>  * undefined when compiling for mips in drivers/input/evdev.c I do not 
>  * understand this code.  Just guessing...*/
> #define TIF_32BIT               5       /* 32 bit binary */
> #define _TIF_32BIT              (1<<TIF_32BIT)
> 
> 

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

end of thread, other threads:[~2005-09-01  8:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-31 13:59 compiling kernel 2.6.13 Damian Dimmich
2005-08-31 15:02 ` Ralf Baechle
2005-08-31 15:30   ` Stephen P. Becker
2005-08-31 15:35     ` Ralf Baechle
2005-08-31 15:55       ` Thiemo Seufer
2005-08-31 16:22         ` Atsushi Nemoto
2005-09-01  8:33           ` Thiemo Seufer
2005-08-31 15:12 ` Thiemo Seufer
2005-08-31 15:25   ` Ralf Baechle
2005-08-31 16:10     ` Thiemo Seufer
2005-08-31 15:42   ` Ladislav Michl

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