Subject: SGI, MIPS, Hardhat Linux question...

From: Jeff Harrell <[email-masked]>
Date: Tue, 02 Nov 1999 21:30:37 GMT

I am currently working on a project that is using a MIPS R4x00 core on a 
single board computer and would like to leverage the work the SGI team 
has done on the MIPS/Linux port.  I have downloaded the kernel source 
code for Hardhat Linux  (kernel 2.1.100) and applied the patches (i.e.,  
kernel-2.1.100-sgi.patch and kernel-mips-link.patch).  I have also 
downloaded Ralf Bachle's cross compiler tools (486-linux -> MIPS).  We 
are using the little endian version of the tools.   I copied the kernel 
files to my home directory under the structure <my_home_dir>\work\linux  
and applied the patches.  The patches applied properly.  I then did a 
default configuration, following the file kernel-config.sgi as a 
template.  I built the dependencies ( make CROSS_COMPILE=mipsel-linux- 
dep) and did not get any errors.  The problem seems to occur when I 
attempt to build the compressed image, I enter the command:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
make CROSS_COMPILE=mipsel-linux- zImage
mipsel-linux-gcc -D__KERNEL__ -I/home/jharrell/work/linux/include 
-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -G 0 -mno-abicalls 
-fno-pic -g -mcpu=r4600 -mips2 -pipe  -c -o init/main.o init/main.c
/home/jharrell/work/linux/include/asm/string.h: In function `bcopy':
In file included from 
/home/jharrell/work/linux/include/linux/string.h:39,
                 from 
/home/jharrell/work/linux/include/asm/termios.h:99,
                 from 
/home/jharrell/work/linux/include/linux/termios.h:5,
                 from 
/home/jharrell/work/linux/include/linux/tty.h:20,
                 from 
/home/jharrell/work/linux/include/linux/sched.h:20,
                 from init/main.c:17:
/home/jharrell/work/linux/include/asm/string.h:134: warning: control 
reaches end of non-void function
/home/jharrell/work/linux/include/linux/sched.h: In function `suser':
In file included from init/main.c:17:
/home/jharrell/work/linux/include/linux/sched.h:545: `current' 
undeclared (first use this function)
/home/jharrell/work/linux/include/linux/sched.h:545: (Each undeclared 
identifier is reported only once
/home/jharrell/work/linux/include/linux/sched.h:545: for each function 
it appears in.)
/home/jharrell/work/linux/include/linux/sched.h: In function `fsuser':
/home/jharrell/work/linux/include/linux/sched.h:554: `current' 
undeclared (first use this function)
/home/jharrell/work/linux/include/linux/sched.h: In function 
`capable':
/home/jharrell/work/linux/include/linux/sched.h:572: `current' 
undeclared (first use this function)
/home/jharrell/work/linux/include/linux/mm.h: In function 
`expand_stack':
In file included from 
/home/jharrell/work/linux/include/linux/slab.h:14,
                 from 
/home/jharrell/work/linux/include/linux/malloc.h:4,
                 from 
/home/jharrell/work/linux/include/linux/proc_fs.h:6,
                 from init/main.c:25:
/home/jharrell/work/linux/include/linux/mm.h:359: `current' undeclared 
(first use this function)
make: *** [init/main.o] Error 1
Compilation exited abnormally with code 2 at Tue Nov  2 14:14:55
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
- - - -

I checked the linkage in the linux/include directory and a link exists 
between  asm and mips-asm.  For some reason it is not able to find the 
files located in the include/asm directory,  I looked over the gcc man 
page and read that if a  -I is used as a parameter to gcc, it should 
be the first directory examined in the search patch.....It seems to 
have problems with the #include <asm/current.h>.  Am I missing 
something? Hmmm....

A second question I would like to ask is concerning the Hardhat 
distribution,  Is this the best starting place to get an embedded 
version of MIPS/Linux?  Is there a better distribution (i.e. 
Cross-compilation tools, etc., that uses a more current version of the 
kernel?)  Any information available would be greatly appreciated....

Thanks,
Jeff Harrell

Jeff Harrell ([email-masked])		work: (801) 984-0183
TI / Broadband Access Group

---

From: "Juan J. Sierralta P." <[email-masked]>
Date: Tue, 02 Nov 1999 20:42:56 -0300

Hi:

	I got the CVS sources for Kernel (2.3.19) and exactly the
same error messages appears I'm using an HardHat 5.1 with
2.1.100 on a SGI Indy 5000 so maybe it isn't a
cross-compiler error. I also checked the symlinks and seems
ok....
	Any suggestions ?

Thanks.
------------------------------------------------------------------
Juan Jose Sierralta P.		 |	[email-masked]
Ayudante de Proyecto Fondef III	 |	Fono: +56-32-654093
Departamento de Electronica.	 |	"In a world without fences
UTFSM.				 |	who needs Gates ?"

---

From: Ulf Carlsson <[email-masked]>
Date: Tue, 2 Nov 1999 15:53:43 -0800

> cross-compiler error. I also checked the symlinks and seems

Are you using gcc or egcs to cross-compiler?  If I remember correctly that
message is caused by the gcc specs file that isn't compatible with the current
MIPS kernels. Use this cross-compiler instead:

    ftp://oss.sgi.com/pub/linux/mips/crossdev/i386-linux/mips-linux/

And don't forget to turn off the -N option in arch/mips/Makefiles, or it will
not boot.

Ulf

---

From: "Frank B. Pound" <[email-masked]>
Date: Mon, 08 Nov 1999 12:59:59 -0500

I got the same message when trying to compile the ftape driver on an x86
box.  
It's been a long time since I tried it but I do distinctly remember
tracing it to
what you were talking about.
 
"It seems to have problems with the #include <asm/current.h>." 
I'm not sure if your problem is related to mine but could be.

It happened after a kernel upgrade, using RH.

Frank 

-- 
_______________________________________________________________
Frank B. Pound                    Phone: 703-560-5000 ext. 4008 
Raytheon Systems Company Strategic Systems Division
E-mail: [email-masked]
Web: http://www.raytheon.com/rsc/c3/c300.htm
_______________________________________________________________