Subject: Compiling a kernel for ibm z50

From: "oski" <[email-masked]>
Date: Tue, 27 Sep 2005 18:19:51 +0100

Hi,

I am a newbie trying to compile a kernel for my z50 and up to now failed.

This is my set up:
-An old Pentium II box with Redhat 8
-Downloaded linux-2.6.13.mipscvs-20050904 from www.longlandclan...and bzip2
and tar into /usr/src.
-Installed the mipsel crosscompiler from MIPS SDE
-After make config, when trying to make dep, I get a warning: make dep is
unnecessary now.
-Doing a ls arch/mips/boot I get a file called "compressed" with only a
folder called "CVS" .
 Questions:
1.Can somebody tell me what I am doing wrong?
2.Give me some advise on the proper way to crosscompile?
3.Has somebody a compiled kernel (and root) that will be willing to share
with me, to boot using hpcboot?

Many thanks

oski

---

From: Geert Uytterhoeven <[email-masked]>
Date: Tue, 27 Sep 2005 20:39:00 +0200 (CEST)

> -Installed the mipsel crosscompiler from MIPS SDE

This is a FAQ, please use a real mipsel-linux crosscompiler instead.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email-masked]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

---

From: "oski" <[email-masked]>
Date: Tue, 27 Sep 2005 20:06:13 +0100

Hi,
In fact I changed to the mipsel SDE because I had the same results after
using mipsel-linux-binutils-2.14-3.i386.rpm and
mipsel-linux-gcc-2.95.3-23.i386.rpm.
Could be related to the kernel source I used?
thanks for answering.

oski

---

From: Yoann Allain <[email-masked]>
Date: Wed, 28 Sep 2005 09:26:53 +0200

Hi,

I am no more a newbie but I still need some help to build kernels :
I am working on the Wintegra Evaluation Board (WEB777) and I used the 
2.4 kernel Wintegra gave me with the patch for that board.
I tried to adapt the patch for the 2.6 kernel but it doesn't work. I 
traced the kernel to find it crashed very early before displaying anything.
In fact the host processor makes an address and tries to read it but 
this makes an exception :

* Exception 0x02 (user) : TLB (load or instruction fetch) *
* in address: 80101ea8
ClockDiv2+0xe38:
[80101ea8] 8c820000 lw          r2,0x0000(r4)

r0(zero): 00000000 r1(AT)  : 1000fc00 r2(v0)  : 0000001c r3(v1)  : 80360000
r4(a0)  : 0000001c r5(a1)  : 803919f0 r6(a2)  : 0000000d r7(a3)  : 8038df8c

I think this is a problem of host processor misconfiguration, but don't 
find out exactly what it is... To make the address in R4, the processor 
reads some zeroes where in 2.4 kernel, it doesn't and the address read 
in 2.4 is something like 0xbf010f1c.
I don't know if this can help but here are the few functions before crash:

kernel_entry
    J start_kernel
             cpu_probe() (WEB777 patch)
             prom_init() (WEB777 patch)
                   setup_prom_printf() (WEB777 patch)
                   wds_prom_printf() (WEB777 patch)
                            putPromChar() (WEB777 patch)
                            --> CRASH

Thanks a lot for your precious advices

Yoann

---

From: Ralf Baechle <[email-masked]>
Date: Wed, 28 Sep 2005 19:37:31 +0100

> -Doing a ls arch/mips/boot I get a file called "compressed" with only a

That's because who made that tarball didn't know his way around CVS enough
to supply a -P option.  Nothing to worry, just extra clutter.

  Ralf

---

From: Stuart Longland <[email-masked]>
Date: Fri, 30 Sep 2005 15:55:58 +1000

> to supply a -P option.  Nothing to worry, just extra clutter.

Heh, I've never had to use -P.  Hence my script[1] doesn't use -P.  Mind
you, I'll possibly end up porting that script to use git, once I get git
figured out (and the repository dragged across the web... good thing the
month's quota is almost up).

Incidentally, you do realise that you don't `make bzImage` like you do
under x86 don't you?  On mips, we use the raw vmlinux file (or
sometimes, we `make vmlinux.32`).  This is fed to the bootloader.
-- 
 ____                   _             Stuart Longland (a.k.a Redhatter)
/  _ \   ___    ___  __| |__  __   __ Gentoo Linux/MIPS Cobalt and Docs
- (_) \ /   \  ;   \(__   __)/  \ /  \                        Developer
 \    //  O _| / /\ \  | |  | /\ | /\ |
 /   / \   /__| /  \ \ | |  | \/ | \/ |
(___/   \____/|_;  |_| \_/   \__/ \__/ http://dev.gentoo.org/~redhatter
1.
http://www.longlandclan.hopto.org/~stuartl/mips-linux/utilities/get_kernel.sh.gz

---

From: Ralf Baechle <[email-masked]>
Date: Fri, 30 Sep 2005 09:39:10 +0100

On Thu, Sep 29, 2005 at 01:21:43PM +0100, oski wrote:

> After config I run make and got an error.
> The last few lines are
> LD    init/built-in.o
> LD    .tmp_vmlinux1
> drivers/built-in.o: in function 'pnp_check_dma':
> : undefined reference to :'request_dma'
> drivers/built-in.o: in function 'pnp_check_dma':
> : relocation truncated to fit: R_MIPS_26 against 'request_dma'
> drivers/built-in.o: In function 'pnp_check_dma':
> : undefined reference to 'free_dma'
> drivers/built-in.o: In function 'pnp_check_dma':
> : relocation truncated to fit: R_MIPS_26 against 'free_dma'
> make: *** [.tmp_vmlinux1] Error 1
> 
> Any suggestions how can I solve this error problem and progressing in
> building the kernel?

Disable CONFIG_PNP; I don't think that option makes sense on a Z50 but
Yoichi may want to correct me here.

  Ralf