Subject: 64bit Sead build

From: David Kesselring <[email-masked]>
Date: Mon, 21 Jul 2003 10:32:55 -0400 (EDT)

I'm trying to build linux for Sead in 64 bit. I found that it would not
compile without the change at the end of this note. After this fix, I got
the following link error. Does anyone have an idea why?
*******************************************************************
mips64el-linux-ld --oformat elf32-tradlittlemips -G 0 -static  -Ttext
0x80100000 arch/mips64/kernel/head.o
arch/mips64/kernel/init_task.o init/main.o init/version.o init/do_mounts.o
\
        --start-group \
        arch/mips64/kernel/kernel.o arch/mips64/mm/mm.o kernel/kernel.o
mm/mm.o fs/fs.o ipc/ipc.o arch/mips/math-emu/fpu_emulator.o \
         drivers/char/char.o drivers/block/block.o drivers/misc/misc.o
drivers/net/net.o drivers/media/media.o \
        net/network.o \
        arch/mips64/lib/lib.a
/home/dkesselr/MIPS/linux-mips-cvs/2003Jul18/linux-build-mips64b/lib/lib.a
arch/mips/mips-boards/sead/sead.o
arch/mips/mips-boards/generic/mipsboards.o \
        --end-group \
        -o vmlinux
mips64el-linux-ld: warning: cannot find entry symbol __start; defaulting
to 0000000080100000
mips64el-linux-ld: vmlinux: Not enough room for program headers (allocated
3, need 4)
mips64el-linux-ld: final link failed: Bad value
make: *** [vmlinux] Error 1

**************************************************************************
--- 2003Jul21/linux/include/asm-mips64/serial.h	2003-06-15
19:42:21.000000000 -0400
+++ 2003Jul18/linux-build-mips64b/include/asm-mips64/serial.h	2003-07-21
10:25:32.000000000 -0400
@@ -20,8 +20,6 @@
  */
 #define BASE_BAUD (1843200 / 16)

-#ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
-
 /* Standard COM flags (except for COM4, because of the 8514 problem) */
 #ifdef CONFIG_SERIAL_DETECT_IRQ
 #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST |
ASYNC_AUTO_IRQ)
@@ -31,6 +29,7 @@
 #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF
 #endif

+#ifdef CONFIG_HAVE_STD_PC_SERIAL_PORT
 #define STD_SERIAL_PORT_DEFNS			\
 	/* UART CLK   PORT IRQ     FLAGS        */			\
 	{ 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS },	/* ttyS0 */	\

David Kesselring
Atmel MMC
[email-masked]
919-462-6587

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 22 Jul 2003 01:36:49 +0200

> mips64el-linux-ld: vmlinux: Not enough room for program headers (allocated

It may not be obvious but this is ld's way of telling you it doesn't
feel happy with the options and input files; in some case it could also
be considered an insufficiency of ld ...

In this particular case the bug is that the kernel configuration doesn't
set CONFIG_BOOT_ELF32.

I'm a bit surprised to see somebody's actually using a 64-bit kernel on a
SEAD.

  Ralf

---

From: David Kesselring <[email-masked]>
Date: Tue, 22 Jul 2003 08:40:30 -0400 (EDT)

Thanks for the info. I'm trying to build 64bit sead so that it can be a
basis for a port to our own chip with a MIPS 5kf core. Is one of the other
supported boards more generic (and thus a better start) than Sead?
David

David Kesselring
Atmel MMC
[email-masked]
919-462-6587

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 22 Jul 2003 14:48:39 +0200

> supported boards more generic (and thus a better start) than Sead?

We more regularly test on Malta which I also consider a way more
friendly test and development environment than SEAD which is sort of
a bare bone board.

  Ralf

---

From: Dominic Sweetman <[email-masked]>
Date: Tue, 22 Jul 2003 13:49:48 +0100

David,

You wrote to Ralf:

> Thanks for the info. I'm trying to build 64bit sead so that it can
> be a basis for a port to our own chip with a MIPS 5kf core.

Interesting.  It's good to know people are looking at the 64-bit
ports.

> Is one of the other supported boards more generic (and thus a better
> start) than Sead?

We use our 'Malta' board for all our in-house Linux work.  See:

  http://www.mips.com/ProductCatalog/P626341476/productView

(I think that link will work for you... let me know if it's
non-portable) 

We maintain a relatively stable 32-bit Linux port for Malta.  64-bit
is still somewhat experimental; but at least you have a board with
ethernet and disk ports, and PCI expansion slots.

I guess you should ask your local MIPS salesperson about Malta.

-- 
Dominic Sweetman
MIPS Technologies
The Fruit Farm, Ely Road, Chittering, CAMBS CB5 9PH, ENGLAND
phone +44 1223 706205/fax +44 1223 706250/swbrd +44 1223 706200
http://www.mips.com

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 22 Jul 2003 14:52:47 +0200

> supported boards more generic (and thus a better start) than Sead?

Btw, forgot to mention I put a fix for the problem you reported into
CVS yesterday so building works.  I don't have a SEAD so I wasn't
able to test.

  Ralf

---

From: Ralf Baechle <[email-masked]>
Date: Tue, 22 Jul 2003 15:04:00 +0200

> Interesting.  It's good to know people are looking at the 64-bit

The general problem I'm observing is nobody wants to be the first through
the minefield of building a commercial product based on a 64-bit kernel
though for many applications it seems to be a much saner solution than
a 32-bit kernel.

My use is atypical but I'm running a 64-bit kernel SMP / ccNUMA kernel
since years without major problems so we're 90% through and I'd like to
know about the missing 10% ...

  Ralf