Bug 1048135 - qemu-system-ppc only shows a blank screen
Summary: qemu-system-ppc only shows a blank screen
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: openbios
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Fedora Virtualization Maintainers
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-03 09:31 UTC by Paul Bolle
Modified: 2014-03-18 08:04 UTC (History)
13 users (show)

Fixed In Version: openbios-1.1.svn1239-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-18 08:04:52 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Paul Bolle 2014-01-03 09:31:02 UTC
Description of problem:
I seem to be unable to make qemu-system-ppc generate (usable) output in the emulator.

Version-Release number of selected component (if applicable):
qemu-system-ppc-1.6.1-3.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. qemu-system-ppc -m 512 -M mac99 -cdrom Fedora-16-ppc-netinst.iso -boot d -serial stdio (or any similar command)
2.
3.

Actual results:
A blank screen in the emulator. And on stdout (or stderr) I see this:
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle
>> set_property: NULL phandle

>> =============================================================
>> OpenBIOS 1.1 [Aug 20 2013 15:42]
>> Configuration device id QEMU version 1 machine id 1
>> CPUs: 1
>> Memory: 512M
>> UUID: 00000000-0000-0000-0000-000000000000
>> CPU type PowerPC,G4

Expected results:
A system that boots that (outdated) image and actually shows something visual in the emulator.

Additional info:
0) This may be quite old. See https://bugzilla.redhat.com/show_bug.cgi?id=913725#c0 and https://lists.ubuntu.com/archives/ubuntu-users/2011-November/254605.html

1) But since I've never used qemu-system-ppc before, I might be invoking it incorrectly.

2) If this is reproducible I guess it might be better to discuss it on a (qemu-ppc specific) mailinglist.

Comment 1 Richard W.M. Jones 2014-01-03 09:51:23 UTC
We don't do any meaningful tests of qemu-system-ppc{,64}
and it's not used much upstream either.  Also I found one
has to have precisely the right machine and CPU type, and
compatible SLOF, else you get nothing (and there's no
documentation on what any of these mean).  And no one tested
the Fedora image on qemu, they probably ran it on some sort
of old Mac hardware, and if that booted, it shipped.

I think what I'm saying is .. good luck :-)

This is for ppc64 so not that relevant to you, but it works
and you should be able to use it to run ppc 32 bit userspace
software using this method:

http://rwmj.wordpress.com/2013/08/27/booting-fedora-19-ppc64-netinst-under-qemu-on-x86-64/

I believe there is also a problem that qemu-system-ppc64 does
not emulate certain instructions that are used (rarely) by
some Fedora code, causing some programs to crash at random.
Again this probably only affects ppc64.

Comment 2 Paul Bolle 2014-01-03 14:05:50 UTC
(In reply to Richard W.M. Jones from comment #1)
> Also I found one
> has to have precisely the right machine and CPU type, and
> compatible SLOF, else you get nothing (and there's no
> documentation on what any of these mean).

No documentation for qemu, for the actual hardware, or for both?

> And no one tested
> the Fedora image on qemu, they probably ran it on some sort
> of old Mac hardware, and if that booted, it shipped.

And my goals was using qemu first, to avoid wasting my last blank CDs on non-functional images (for the outdated machine recently dumped at my place). It seems I'm in for some serious yak shaving.

> I think what I'm saying is .. good luck :-)

Thanks!

Comment 3 Paul Bolle 2014-01-03 16:06:05 UTC
I've checked out and compiled v1.6.1 (and v1.7.0) from qemu.git. The configure command used was:
    ./configure --target-list=ppc-softmmu --enable-sdl

This gave me a ./ppc-softmmu/qemu-system-ppc executable that allowed me (in both releases) to boot various PPC iso's with some success. (I didn't yet try to actually finish a virtual machine install.)

Eg, a command like
    ./ppc-softmmu/qemu-system-ppc -cpu G4 -m 1024 -M mac99 -cdrom ~/Downloads/Fedora-10-ppc-netinst.iso -boot d

allowed me to run the first few (graphical) configuration screens. After that I got bored and killed qemu-system-ppc.

If you'd like I could help with pinpointing why Fedora 20's qemu-system-ppc doesn't (seem to) work with these images. But I'm not sure where to start here.

Comment 4 Richard W.M. Jones 2014-01-03 16:13:47 UTC
Note that Fedora recompiles upstream SLOF from source, whereas qemu
comes with a SLOF binary blob.  There's nothing essentially bad about
the binary blob (it's well documented how it is created) but it means
Fedora is likely using a different SLOF from the one which qemu ships.

Comment 5 Richard W.M. Jones 2014-01-03 16:17:48 UTC
(In reply to Paul Bolle from comment #2)
> (In reply to Richard W.M. Jones from comment #1)
> > Also I found one
> > has to have precisely the right machine and CPU type, and
> > compatible SLOF, else you get nothing (and there's no
> > documentation on what any of these mean).
> 
> No documentation for qemu, for the actual hardware, or for both?

I mean it's hard to know what all the machine models and
CPU types mean, unless you are a fan of PowerPC hardware.
That knowledge is not very common amongst regular PC users.

My qemu-system-ppc64 binary has 11 machine models and
428 CPU types.  What's a "Heathrow based PowerMAC"?
What's a "PowerPC LoneStar"?

Comment 6 Paul Bolle 2014-01-03 17:30:45 UTC
(In reply to Richard W.M. Jones from comment #4)
> Note that Fedora recompiles upstream SLOF from source, whereas qemu
> comes with a SLOF binary blob.

SLOF?

Would it be possible to rebuild Fedora 20's qemu rpm locally with that binary blob to see it that's the culprit?

Comment 7 Richard W.M. Jones 2014-01-03 18:11:22 UTC
Sure, just copy qemu.git/pc-bios/slof.bin to /usr/share/qemu/slof.bin
(or vice versa).

Comment 8 Paul Bolle 2014-01-04 11:30:02 UTC
(In reply to Richard W.M. Jones from comment #7)
> Sure, just copy qemu.git/pc-bios/slof.bin to /usr/share/qemu/slof.bin
> (or vice versa).

SLOF isn't the culprit, apparently.

Recompiling upstream with Fedora's binary blob still gives a working (visual) emulator. And, vice versa, rebuilding qemu-system-ppc (and friends) with qemu's binary blob copied over Fedora's binary blob still shows a blank screen when invoking qemu-system-ppc.

I'll have to ponder what to do next.

Comment 9 Paul Bolle 2014-01-04 12:24:43 UTC
It turned out to be caused by openbios-ppc. Using openbios-ppc as shipped in upstream v1.6.1 (through git) gives usable (visual) output. And, likewise, (self-compiled) upstream v1.6.1 using Fedora's openbios-ppc shows a blank screen.

So, what should be done now?

Comment 10 Richard W.M. Jones 2014-01-04 12:39:52 UTC
Reassigning to openbios based on comment 9.

Since Fedora also compiles openbios from source, can you find
out which version qemu is shipping?  There is a text file somewhere
in the qemu source which describes that IIRC.

Comment 11 Paul Bolle 2014-01-04 13:23:10 UTC
0) qemu uses a git submodule for openbios. I'm unfamiliar with git submodules.

1) However, "git log -1 v1.6.1 -- pc-bios/openbios-ppc" points at commit 9a949b94f60ee48ca0fbb5dc263c7ee77b75149f ("Update OpenBIOS images"), with explanation:
    
    Update OpenBIOS images to SVN r1198 built from submodule.
    
    Signed-off-by: Mark Cave-Ayland <mark.cave-ayland.uk>

2) That's intriguing, because Fedora 20 currently ships openbios-1.1.svn1198-2.fc20.noarch.

3) Perhaps this is caused by differences in gcc versions or gcc options. See, as possible clue, qemu commit 682527c00409d676c0d3b9fac99ca3b2fdfd6d2c ("Update OpenBIOS images"), with this explanation:
    
    Update OpenBIOS images to SVN r1062. Build with GCC 4.6.0
    in order to avoid boot problems introduced by GCC 4.7.[01].
    
    Signed-off-by: Blue Swirl <blauwirbel>

4) I've not investigated what version of gcc was used to compile r1198 for upstream qemu. There's no .comment section in that ELF file.

Comment 12 Cole Robinson 2014-01-11 22:58:53 UTC
I can reproduce, but pulling in the newer openbios version from rawhide fixes things for me. I'll pull that back to f20 as well

Comment 13 Hin-Tak Leung 2014-03-06 23:55:23 UTC
Just encountered this problem and google'd this. openbios-1.1.svn1198-2.fc20
openbios-1.1.svn1239-1.fc21 indeed fixes the problem.

So when is the newer openbios landing, seeing as it has been been two months since the last message?

FWIW, I am trying to boot the debian ready-made images from http://people.debian.org/~aurel32/qemu/powerpc/ . (and therefore persisting somewhat, since it is obvious somebody was able to get those to work quite recently).

Comment 14 Hin-Tak Leung 2014-03-07 00:14:00 UTC
Some random googling got me this post from two days ago - 
http://osdevnotes.blogspot.co.uk/2014/03/getting-powerpc-openbios-to-run-on-qemu.html -

Just in case it disappears, it claims that:

"Apparently GCC versions > 4.6 miscompile OpenBIOS, so you need to disable optimization. This is presently set to "-Os" under "Makefile.target". Setting it t "-O0" should do."

Comment 15 Cole Robinson 2014-03-07 14:29:48 UTC
Apologies, I forgot about this. I'll push an update shortly

Comment 16 Fedora Update System 2014-03-07 14:40:53 UTC
openbios-1.1.svn1239-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/openbios-1.1.svn1239-1.fc20

Comment 17 Fedora Update System 2014-03-08 03:35:02 UTC
Package openbios-1.1.svn1239-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing openbios-1.1.svn1239-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-3612/openbios-1.1.svn1239-1.fc20
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2014-03-18 08:04:52 UTC
openbios-1.1.svn1239-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.