LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   LLVM,QEMU and More (https://www.linuxquestions.org/questions/linux-software-2/llvm-qemu-and-more-867861/)

foresst 03-11-2011 12:13 AM

LLVM,QEMU and More
 
Hi guys,

I have been working on a small project for about a week but did not succeed so I decided to create this thread to maybe get some tips or ideas of how to accomplish the task.

Successes:

1. Install QEMU
2. Emulate a malta board with a 4kc processor on which I have a linux kernel running
3. Set up file sharing between my host Ubuntu and the emulated machine
4. Generate MIPS assembly using LLVM

The thing I would like to do is to write a MIPS assembly program and copy it to the emulated machine and run it. Now writing a MIPS program by itself I can do what I cannot do is make it run on the guest machine. On the host itself I can simulate it using SPIM or anything else of that sort but I would like to assemble it to native code so I can run it on the other machine. This last thing I cannot accomplish and I would like to ask for help!

If anyone has any ideas or tips I will take any help or direction. If there is any additional information I need to provide please let me know and I will do my best.

Thank you in advance!

P.S. It has to be noted that I have started using linux just about two weeks ago and most of the things are quite novel to me.

jefro 03-12-2011 03:29 PM

Do you have any other sources that tell how to do this or have claimed to do this in qemu?

Qemu is pretty basic. Not even sure how well any of the odd cpu's work. I played with sparc a long time ago and found it only a test of my will to see something do nothing.

http://qemu-forum.ipi.f

You may be better off either with a dedicated board or some commercial app to cross develop in the final product you want to do this for.

foresst 03-12-2011 05:11 PM

I looked for quite some time for examples of how to do this but I could not find anything relevant. I am still looking for a solution and will report back whenever I solve this thing. Hopefully in the meantime I can get more info here.

Thx for the link I started reading through that forum but it is not very populated.

foresst 03-12-2011 11:02 PM

After some digging around I found a cross compiler at http://www.cs.ucsd.edu/classes/fa05/...ux-xgcc.tar.gz.
It let me 'as' and 'ld' the MIPS code. I transferred that code to the emulated machine and tried to run it but got two different type of errors along the lines

1. cannot execute binary file
2. NFS stale handler

Life is so difficult hehe... will report back later if I found a solution.


All times are GMT -5. The time now is 08:31 PM.