Subject: kernel sources?

From: Geert Uytterhoeven <[email-masked]>
Date: Tue, 11 Jan 2000 10:53:32 +0100 (CET)

Hi,

We are considering porting Linux to a R5000-based board.

I built a cross-compiler according to the guidelines in the MIPS-HOWTO and it
was a piece of cake.

Now I'm wondering which kernel sources you suggest to start a port with. I
tried the one from :pserver:[email-masked]:/cvs (2.3.21) but
compilation stopped due to a problem in serial.c (I compiled for
CONFIG_ACER_PICA_61, just to see whether the tree worked).

Thanks in advance!

Gr{oetje,eeting}s,
--
Geert Uytterhoeven -- Linux/{m68k~Amiga,PPC~CHRP} -- [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: Harald Koerfgen <[email-masked]>
Date: Tue, 11 Jan 2000 19:47:57 +0100 (MET)

Hi Geert,

> We are considering porting Linux to a R5000-based board.

Just beeing curious, what board?

> CONFIG_ACER_PICA_61, just to see whether the tree worked).

This source tree as absolutely correct to start with. The attached patch should
fix the complilation problem.

---
Regards,
Harald
--- /nfs/cvs/linux-2.3/linux/include/asm-mips/serial.h	Thu Aug 27 00:40:50 1998
+++ linux-idt/include/asm-mips/serial.h	Wed Jan  5 21:09:20 2000
@@ -38,6 +38,9 @@
 #define ACCENT_FLAGS 0
 #define BOCA_FLAGS 0
 #define HUB6_FLAGS 0
+#define RS_TABLE_SIZE	64
+#else
+#define RS_TABLE_SIZE
 #endif
 
 /*

---

From: Geert Uytterhoeven <[email-masked]>
Date: Wed, 12 Jan 2000 09:57:41 +0100 (CET)

> fix the complilation problem.

Thanks! But unfortunately it doesn't fix all problems:

serial.c: In function `line_info':
serial.c:3078: warning: long unsigned int format, unsigned int arg (arg 5)
serial.c: In function `autoconfig':
serial.c:3430: `ASYNC_IOC3' undeclared (first use this function)
serial.c:3430: (Each undeclared identifier is reported only once
serial.c:3430: for each function it appears in.)
serial.c: In function `rs_init':
serial.c:3999: `ASYNC_IOC3' undeclared (first use this function)
serial.c:4015: warning: long unsigned int format, unsigned int arg (arg 4)

I think some #ifdef CONFIG_SGI_IP27/#endif is missing there.

Gr{oetje,eeting}s,

---

From: Geert Uytterhoeven <[email-masked]>
Date: Wed, 12 Jan 2000 17:19:02 +0100 (CET)

Hi again,

First of all I would like to thank everyone who replied to my question!

In the mean time I managed to get until setup_arch() (which is after the
printing of the Linux banner :-). However, I'm seeing some very weird things: I
had to #if 0/#endif all code in setup_arch() starting with `strncpy
(command_line, arcs_cmdline, CL_SIZE);', or the system crashes right after

    Loading R4000 MMU routines

(yes, this is before setup_arch()!).

I suspect the ELF loader in PMON to be buggy. I also had to disable all __init
stuff before, because functions marked __init ended up as all `nop' after
tftpboot.  

I thought PMON may have problems with large images, so I disabled some more
config options for stuff I don't need at this stage, but now the #if 0/#endif
trick no longer works neither :-(

Note that I now know I can see `in advance' whether an image will work or not
(read: suffers from the above problem): PMON seems to coalesce two sections
when things go wrong.

Loading a working image using tftpboot:

    Loading elf file: xxx.yyy.zzz.qqq:geert/vmlinux
     0x80080000/1101820 + 0x8018e000/90656 + 0x801a4220/352320 + 2097 syms/
    Entry address is 80080580

Loading a non-working image using tftpboot:

    Loading elf file: xxx.yyy.zzz.qqq:geert/vmlinux
      0x80080000/1192432 + 0x801a31f0/352400 + 2097 syms/
    Entry address is 80080580

`objdump --headers' or `objdump --disassemble-all' don't show anything
suspicious.

I'm using gcc version egcs-2.90.27 980315 (egcs-1.0.2 release) and binutils
version 2.8.1 (mipsel-linux), using BFD version 2.8.1, compiled as crossutils
under Solaris/SPARC from binutils-2.8.1-2.src.rpm and egcs-1.0.2-9.src.rpm.

Anyone with a clue? Thx!

Gr{oetje,eeting}s,

---

From: Ralf Baechle <[email-masked]>
Date: Thu, 13 Jan 2000 01:20:33 +0100

> I think some #ifdef CONFIG_SGI_IP27/#endif is missing there.

Thanks for reporting!  What's actually missing is the definition of this
flag in include/linux/serial.h.

  Ralf