
In message 4057256E.3080604@il.marvell.com you wrote:
I'm trying to port the U-Boot to Marvell board with MIPS (rm7000)
In your Subject: you write: MIPS (purple) compilation problems. I cannot see any relation to the Infineon Purple board here??
I see that after relocating to the DRAM the disassembly of the u-boot shows me that we jump back to the flash:
What did you disassemble? The code in RAM?
start.S: dis: la t9,board_init_r lui t9,0xbfc1 addiu t9,20140 j t9 jr t9
This cannot work. This is what I see for the "purple" board:
... move a0, a1 564: 00a02021 move a0,a1 la t9, board_init_r 568: 8f990000 lw t9,0(gp) j t9 56c: 03200008 jr t9 move a1, a2 /* delay slot */ 570: 00c02821 move a1,a2
I see that I get the same problem when I jump to printf etc. maybe it is because I don't compile the code as PIC? Is there any
If you meddle with the compiler options you better know EXACTLY what you are doing.
special compilation flag I should use?
Use the flags as they are defined in U-Boot. This is what works for me.
Can someone please send me a disassembly of the U-Boot for any of the MIPS board (purple, incaip or dbaux100).
See above.
Is there any special handle for relocating of the MIPS that is different from the PPC, that I should take under consideration???
There are differences, but your problem is not caused by any of these. You use bad compiler options and/or misconfigured tools.
c1: warning: -G is incompatible with PIC code which is the default .........
and an LD error: mips64-elf-ld: common/main.o: linking PIC files with non-PIC files
I don't understand why you don't follow the clear hints the compiler is giving: "incompatible with PIC code which is the default". If your compiler is configured such that PIC is the default, and this default is causing incompatibilities, I would try to find out which compiler option can be used NOT to generate PIC. ["-fno-pic" comes to mind.]
Wolfgang Denk