Skip to contentSkip to conversation

Building a cross kernel for the IP27/Origin System

DISCUSSION Claus Herrmann 3 participants 4 messages May 8, 2007 – May 11, 2007 MIPS

lore
Share & tools
lore
#0 lore raw

Hi,

ich have a question regarding the crosscompiling for an Origin 2000. First of all i get this warning:

include/linux/mmzone.h:553:1: warning: "NODE_DATA" redefined
In file included from include/asm/mmzone.h:9,
from include/asm-mips/mach-ip27/topology.h:5,
from include/asm/topology.h:1,
from include/linux/topology.h:34,
from include/linux/mmzone.h:544,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from include/linux/percpu.h:5,
from include/linux/rcupdate.h:41,
from include/linux/pid.h:4,
from include/linux/sched.h:72,
from arch/mips/kernel/asm-offsets.c:13:
include/asm-mips/mach-ip27/mmzone.h:33:1: warning: this is the location of the previous definition

I fixed it by doing a #define and a #ifndef around the golbal NODE_DATA. Now it compiles smoothly, but in the end I get this:

mips-linux-ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.
mips-linux-ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.
mips-linux-ld: Dwarf Error: found dwarf version '365', this reader only handles version 2 information.
mips-linux-ld: Dwarf Error: found dwarf version '22528', this reader only handles version 2 information. arch/mips/mm/built-in.o: In function `mem_init':
: multiple definition of `mem_init'
mips-linux-ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.
mips-linux-ld: Dwarf Error: found dwarf version '8704', this reader only handles version 2 information. arch/mips/sgi-ip27/built-in.o:: first defined here
arch/mips/mm/built-in.o: In function `paging_init':
: multiple definition of `paging_init'
arch/mips/sgi-ip27/built-in.o:: first defined here
make: *** [.tmp_vmlinux1] Fehler 1

Any suggestions what i am doing wrong?
The toolchan i use is the one from MIPS SDE UK. I tried to build my own Toolchain, but the same error occur.

Brgds

Claus

#1 lore raw
Quoted 1 line · Claus Herrmann

mips-linux-ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.

When GNU ld prints an error message, it first looks to see if you compiled with debug info, and if you did, it tries to read and parse the debug info so it can pretty-print the error message with source file and source line number info. This makes it easier to figure out where the problem is. Unfortunately, this code sometimes fails. The linker must modify the debug info during the linking process by applying relocations. If we try to read the debug info at the wrong time, we may get an inconsistent view of it, and may fail to read it correctly. The code is fail soft, so this is harmless, except that you get annoying messages that make no sense to you. Newer GNU ld versions handle this much better than older GNU ld versions. I suspect this is what is happening in your case.

Just edit out the annoying and useless dwarf error messages, and you get

Quoted 6 lines

arch/mips/mm/built-in.o: In function `mem_init':
: multiple definition of mem_init' arch/mips/sgi-ip27/built-in.o:: first defined here arch/mips/mm/built-in.o: In function paging_init':
: multiple definition of `paging_init' arch/mips/sgi-ip27/built-in.o:: first defined here

which is your real problem. Looks like a problem with your mips kernel configuration.

Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com
#2 lore raw

Hi Jim,

thanks for your response. To be honest, the Dwarf Error I ignored. I did nothing special in the configuration. I just selected the IP27 as Machine and off I went.
And there the first Problems occured. When oyu select the IP27 many options in the ConfigMenu have tob e taken by hand (is this normal?). The Pci Module is not selected (brings linker errors of course (cant find PCI_Probe..), the option for Multi CPU is not selected (same linkererror with "cant find CPU_IRQ or something like this).

I am at the point that I found every packet which the compilation needs and what he doesnt need. But the "multiple definitions"-Error I am at my end. For what it looks to me, it looks like there is a wrong architecture configurations file in the archive. First of all it doesnt make sense, when you select the arcitecture IP27, all required modules (Pci, MultiCpu...) have to be selected by hand. What it seems to me, the automated build scripts seem to compile the general "arch/mips" and the specific "arch/mips/ip27" thus creating the error.

Brgds

Claus

-----Ursprüngliche Nachricht-----
Von: Jim Wilson [mailto:[email protected]]
Gesendet: Donnerstag, 10. Mai 2007 21:01
An: Claus Herrmann
Cc: [email protected]
Betreff: Re: Building a cross kernel for the IP27/Origin System

Quoted 1 line · Claus Herrmann

mips-linux-ld: Dwarf Error: found dwarf version '0', this reader only handles version 2 information.

When GNU ld prints an error message, it first looks to see if you compiled with debug info, and if you did, it tries to read and parse the debug info so it can pretty-print the error message with source file and source line number info. This makes it easier to figure out where the problem is. Unfortunately, this code sometimes fails. The linker must modify the debug info during the linking process by applying relocations. If we try to read the debug info at the wrong time, we may get an inconsistent view of it, and may fail to read it correctly. The code is fail soft, so this is harmless, except that you get annoying messages that make no sense to you. Newer GNU ld versions handle this much better than older GNU ld versions. I suspect this is what is happening in your case.

Just edit out the annoying and useless dwarf error messages, and you get

Quoted 6 lines

arch/mips/mm/built-in.o: In function `mem_init':
: multiple definition of mem_init' arch/mips/sgi-ip27/built-in.o:: first defined here arch/mips/mm/built-in.o: In function paging_init':
: multiple definition of `paging_init' arch/mips/sgi-ip27/built-in.o:: first defined here

which is your real problem. Looks like a problem with your mips kernel configuration.

Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com
#3 lore raw

I'm not a linux kernel expert, I am a gcc/binutils expert. So the curious DWARF error stuff from the linker I can and did explain. The rest of it I can't explain. Hopefully someone else can help you with that.

Signature · 1 line
Jim Wilson, GNU Tools Support, http://www.specifix.com