Skip to contentSkip to conversation

Problems executing qemu-ppc

Qemu-devel Stefano Bonifazi 4 participants 6 messages Dec 18, 2010 – Dec 20, 2010

lore
Share & tools
lore
#0 lore raw

Hi all!
May someone help me running qemu-ppc?
Executing:

Quoted 1 line

qemu-ppc hello

with hello a PPC binary, I get:

Quoted 1 line

/lib/ld.so.1: No such file or directory

executing qemu-ppc without argument I get this:

Quoted 4 lines

[...]
-L path set the elf interpreter prefix
(default=/usr/gnemul/qemu-ppc)
[...]

but /usr/gnemul/qemu-ppc does not exist on my system. I don't know what an elf interpreter prefix is :[

my uname:

Quoted 1 line

Linux Stefano-PC 2.6.35-23-generic-pae #41-Ubuntu SMP Wed Nov 24 10:35:46 UTC 2010 i686 GNU/Linux

Thank you in advance!
Stefano B.

#1 lore raw

Hi!
I am answering myself hoping that my solution may help somebody other who has to face the same problem:

In QEMU home page, under downloads section you can find QEMU Linux user mode tests: http://wiki.qemu.org/download/linux-user-test-0.3.tar.gz
Inside there are also examples for qemu-ppc

Anyway what one probably wants to obtain with qemu-ppc is not just running the tests programs provided there. Instead probably you want to test PPC programs you compile for your needs. Unless you compile your programs with the same PPC Linux kernel whose libs are contained in the downloaded archive, they won't run fine with qemu-ppc using the "gnemul" libs provided in the downloaded archive.

I don't have any powerPC machine, so I use a QEMU virtual machine (qemu-system-ppc) with installed Debian 5.07 PowerPC for compiling PowerPC programs. So what I did for making qemu-ppc run fine my PPC programs was simply to copy all the following files:

/lib/ld*
/lib/lib*

from the Debian PPC linux (virtual machine) into /usr/gnemul/qemu-ppc/lib/ of my real i386 Linux system (ubuntu 10.10, i386)

and /etc/ld* from the Debian PPC Linux into /usr/gnemul/qemu-ppc/etc/ of my real i386 Linux system

After that running "qemu-ppc myproggy" in my real i386 Linux where "proggy" is a simple program compiled into the Debian PPC linux VM works perfectly :)

Feel free of asking for explanations, though I must confess I do not master the topic.. still I managed to run it :)

Best Regards!
Stefano B.

#2 lore raw

Hi :)

Quoted 3 lines · Stefano Bonifazi

Hi!
I am answering myself hoping that my solution may help somebody other who has to face the same problem:

I am not PPC user by myself, but I think it is a good candidate to be written in either Qemu web forum or Qemu wiki (do we have one?) :)

Just 2 cents idea :)

Signature · 7 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
#3 lore raw
Quoted 9 lines · Mulyadi Santosa

Hi :)

Quoted 3 lines · Stefano Bonifazi

Hi!
I am answering myself hoping that my solution may help somebody other who has to face the same problem:

I am not PPC user by myself, but I think it is a good candidate to be written in either Qemu web forum or Qemu wiki (do we have one?) :)

www.qemu.org is a wiki :). And yes, please, that sounds like it really should be on there. As a hint: gcc -static would have also worked.

Alex

#4 lore raw
Quoted 10 lines · Alexander Graf
Quoted 7 lines · Mulyadi Santosa

Hi :)

Quoted 3 lines · Stefano Bonifazi

Hi!
I am answering myself hoping that my solution may help somebody other who has to face the same problem:

Quoted 10 lines
Quoted 2 lines

I am not PPC user by myself, but I think it is a good candidate to be written in either Qemu web forum or Qemu wiki (do we have one?) :)

www.qemu.org is a wiki :). And yes, please, that sounds like it really should be on there. As a hint: gcc -static would have also worked.

Alex

As part of my project I am writing a good QEMU technical documentation, .. I want to insert also this in it someway.. Then if my teacher's policy allows it I'll make my documentation public..I am experiencing big difficulties due to the lack of good updated documentation.. it is a huge C project, and C is not as readable as OO projects.. moreover one needs so many notions about emulators and computer architectures that can't be taught at university .. maybe some document written by who had to learn everything for understanding QEMU can be useful for novices more than one written by those who master all those topics for whom everything is easy and not worth to be said ;) Best Regards!
Stefano B.

#5 lore raw

Hi Stefano :)

Quoted 9 lines · Stefano Bonifazi

As part of my project I am writing a good QEMU technical documentation, .. I want to insert also this in it someway.. Then if my teacher's policy allows it I'll make my documentation public..I am experiencing big difficulties due to the lack of good updated documentation.. it is a huge C project, and C is not as readable as OO projects.. moreover one needs so many notions about emulators and computer architectures that can't be taught at university .. maybe some document written by who had to learn everything for understanding QEMU can be useful for novices more than one written by those who master all those topics for whom everything is easy and not worth to be said ;)

The best I could say for now is: try to strip out all the "confidential" information in your document and try to label it as Creative Common licensed document, or any other kind of open license.

After that, by submitting it to qemu wiki or forum, you can let other improve it...thus you're not alone :)

Signature · 7 lines
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com