[OpenBIOS] Problem with jumping from assembly to c function
Vishu at soc-soft.com
Vishu at soc-soft.com
Mon Sep 13 20:15:22 CEST 2004
I'm able to cross compile the OpenBios Kernel for mips board but
I cannot mention for which board right now.
Sorry to tell this since my company doesn't allow me to expose u the
I was successful in doing so with some changes in Makefiles and kept
only /openbios/forth and /openbios/kernel.
Within these folders I made changes for Host compilation and Target
Compilation. The compile image is to boot from
RAM right now Initial stage since I wanted to know the kernel booting
on the Target Board. Later on I would like to
Compile for ROM and run on RAM. For this we have to write a linker file
for relocatable code.
The problem right now I'm facing is that
1. openbios.full contains "/openbios/obj-mips/kernel/openfirmware.dict"
as the final compiled image which is converted to SREC format and
On the Target Board.
2. But it is not including the
"/openbios/obj-mips/forth/openfirmware.dict". Copied this file manually
from the said directory to "/openbios/obj-mips/kernel/" and tried to
boot it used to hang. The same problem is there in X86 system, i cross
verified through grub loader as well as for the Target Board.
I'm waiting for the reply.....
From: openbios-bounces+vishu=soc-soft.com at lists.openbios.org
[mailto:openbios-bounces+vishu=soc-soft.com at lists.openbios.org] On
Behalf Of Stefan Reinauer
Sent: Monday, September 13, 2004 5:26 PM
To: The OpenBIOS Mailinglist
Subject: Re: [OpenBIOS] Problem with jumping from assembly to c function
* Vishu at soc-soft.com <Vishu at soc-soft.com> [040908 12:03]:
> For my previous mail of cross compiling the kernel for mips
> resolved the issue As u mentioned of on HOSTCC and CC for Target.
> Is there any other way of compiling forth sources.
You can choose a system with the same bit width (32/64bit) and and
endianess (big/little endian) and compile the dictionary natively there.
Otherwise you will have to wait until OpenBIOS supports cross compiling
> 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.
Do you get any output before this? Did you initialize the stack properly
in or before boot.S?
> 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.
Have a look at the current version at http://www.openbios.org/snapshots/
Relocation from rom to ram is currently only done by the underlying ELF
loader (ie LinuxBIOS) but we want to support more in the future. Any
concrete ideas / patches are welcome.
Free your System - May the Forth be with you
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the OpenBIOS