Hi stefan
For my previous mail of cross compiling the kernel for mips board. I resolved the issue As u mentioned of on HOSTCC and CC for Target.
Is there any other way of compiling forth sources. If so how to eliminate the Hosted compilation Directory i.e. unix directory which is in kernel-1.1/arch/unix.
And after cross compilation I am facing the problem of jumping from boot.s to main. Somehow Succeeded in jumping to cmain function. Openbios function is called from cmain during this period Context is saved is it necessary to initialize global pointer. Because once it goes to cmain after some Execution of instructions the global pointer gets manipulated and exception occurs. Why is it so.
For example
Boot.s contains this
RAM address Mnemonics Instructions
a0100044: 3c1ca011 lui gp,0xa011 /* Loads the global pointer address */ a0100048: 279c40c8 addiu gp,gp,16584 a010004c: 8f8880a4 lw t0,-32604(gp) /* get the address of cmain which is stored in to (temp register) */ a0100050: 01000008 jr t0 /* jumps to main */
a0100070 <cmain>: a0100070: 3c1c0001 lui gp,0x1 /* don't know why gp is loaded with 0x1 */ a0100074: 279c4058 addiu gp,gp,16472 a0100078: 0399e021 addu gp,gp,t9 a010007c: 27bdffe0 addiu sp,sp,-32 a0100080: afbc0010 sw gp,16(sp) a0100084: 8f848010 lw a0,-32752(gp)
/* after this instruction exception is occuring and jumping to 0x80000000 address (RAM) */ a0100088: 00000000 nop
But in /arch/x86 example there is only the initilization of stack pointer. Do u have any example for Cross compilation procedure and linking the linker script to download to ROM or RAM.
Regards Viswanath