Skip to contentSkip to conversation

booting linux 2.6 in qemu-system-ppc

Qemu-devel Johannes Berg 5 participants 12 messages May 15, 2005 – May 25, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

Just for the record: if I remove the VGA card from the qemu pci bus I can successfully boot a linux 2.6 kernel with serial console. Apparently there's something wrong with it.

If you want to discuss please CC me.

johannes

#1 lore raw
Quoted 5 lines · Johannes Berg

Hi,

Just for the record: if I remove the VGA card from the qemu pci bus I can successfully boot a linux 2.6 kernel with serial console. Apparently there's something wrong with it.

wrong with what? linux 2.6? the vga card? the serial console? your kernel config?

Quoted 1 line

If you want to discuss please CC me.

best,
Herbert

Quoted 8 lines

johannes

_______________________________________________
Qemu-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/qemu-devel

#3 lore raw
In reply to Johannes Berg
Quoted 1 line · Johannes Berg

Hi,

Hi,

Quoted 3 lines

Just for the record: if I remove the VGA card from the qemu pci bus I can successfully boot a linux 2.6 kernel with serial console. Apparently there's something wrong with it.

I just checked: I don't have to remove the VGA device to be able to boot 2.6 kernel on serial port. Just have to give it the following arguments to the kernel (and of course, use a kernel with the PC serial port support compiled in):
console=ttyS0 console=tty0
Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs) and that most distributions install CDROM don't have support for PC serial ports. Then, to be able to have video console with any 2.6 based distribution, I'm afraid we'll need to have an ATI Radeon emulation.
You can also notice that we don't emulation Mac serial ports, in Qemu.

Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#4 lore raw

Hi,

Quoted 5 lines

I just checked: I don't have to remove the VGA device to be able to boot 2.6 kernel on serial port. Just have to give it the following arguments to the kernel (and of course, use a kernel with the PC serial port support compiled in):
console=ttyS0 console=tty0

Odd. I didn't test with console=tty0 in addition to console=ttyS0. Did you use the bochs VBE stuff? That works here. Except that both vga cards manage to kill my xorg xserver, so I'm not really into running with a vga card.

Quoted 6 lines

Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs) and that most distributions install CDROM don't have support for PC serial ports. Then, to be able to have video console with any 2.6 based distribution, I'm afraid we'll need to have an ATI Radeon emulation.
You can also notice that we don't emulation Mac serial ports, in Qemu.

Yeah, I was testing the kernel so I did it all by myself, including root (just some busybox stuff) and kernel config.

johannes

#5 lore raw
Quoted 8 lines · Johannes Berg

Hi,

Quoted 5 lines

I just checked: I don't have to remove the VGA device to be able to boot 2.6 kernel on serial port. Just have to give it the following arguments to the kernel (and of course, use a kernel with the PC serial port support compiled in):
console=ttyS0 console=tty0

Quoted 4 lines

Odd. I didn't test with console=tty0 in addition to console=ttyS0. Did you use the bochs VBE stuff? That works here. Except that both vga cards manage to kill my xorg xserver, so I'm not really into running with a vga card.

I don't have this problem using XFree (on Debian Sarge). It may be related to xorg.

Quoted 10 lines
Quoted 7 lines

Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs) and that most distributions install CDROM don't have support for PC serial ports. Then, to be able to have video console with any 2.6 based distribution, I'm afraid we'll need to have an ATI Radeon emulation.
You can also notice that we don't emulation Mac serial ports, in Qemu.

Yeah, I was testing the kernel so I did it all by myself, including root (just some busybox stuff) and kernel config.

What I did is use a Debian Sarge (with a 2.4 kernel) then install a 2.6 kernel. Everything works all right, then, including XFree.
The only drawback is to have no framebuffer console.

Quoted 1 line
Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#2 lore raw
In reply to Herbert Poetzl
Quoted 6 lines · Herbert Poetzl
Quoted 3 lines

Just for the record: if I remove the VGA card from the qemu pci bus I can successfully boot a linux 2.6 kernel with serial console. Apparently there's something wrong with it.

wrong with what? linux 2.6? the vga card? the serial console? your kernel config?

The VGA card I'd say. The kernel crashes while probing the PCI bus.

johannes

#6 lore raw
In reply to J. Mayer
Quoted 4 lines

console=ttyS0 console=tty0
Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs)

How so ?

Quoted 6 lines

and that most distributions install CDROM
don't have support for PC serial ports. Then, to be able to have video console with any 2.6 based distribution, I'm afraid we'll need to have an ATI Radeon emulation.
You can also notice that we don't emulation Mac serial ports, in Qemu.

#7 lore raw
Quoted 4 lines
Quoted 2 lines

Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs)

How so ?

Well, in Fedora Core 4 test 3 (kernels 2.6.11.* and 2.6.12-rc*):
video switching at boot from yaboot with Open Firmware to Tux with scrolling VGA text is problematic, and switching video from X11 to VGA-style text virtual consoles does not work at all on my Mac mini. [On the same hardware, Mac OS X has no problems at all.] Perhaps this is just a fumbled handoff _from_ Open Firmware video to direct video on the hardware, but "support" certainly includes that.

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156824
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=156826
https://bugs.freedesktop.org/show_bug.cgi?id=3280

#9 lore raw
In reply to J. Mayer
Quoted 21 lines · J. Mayer
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 3 lines

console=ttyS0 console=tty0
Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs)

How so ?

Well, there have been many issues with frame-buffer in 2.6, not only on Mac platform.
With Open-Firmware frame buffer, I remember the first 2.6 kernels had no fb output at all.
Then came kernels that could display a Tux penguin in psychadelic colors, I guess it was drawing in 16 bits mode when the OF frame-buffer is 15 bits.
This has been solved in more recent kernels. I don't remember in which version it was fixed (but I think around 2.6.5 or 2.6.6).
I can easily reproduce this on my Ibook and on my Apple Network Server, which means it's not a hardware-dependant bug (Ibook 2 has an ATI graphic card, ANS is cirrus-logic) nor it's specific to some OF version (ANS one is really old...).

Quoted 6 lines

There is now another bug with qemu: with recent 2.6 kernels, the frame-buffer is recognized and console is working but it only draws characters black on black background, even if I send escape sequences to change the drawing color. Note that the penguin is well drawn, in those cases.
If you have an idea of what can cause this, I'd be glad to know it ;-)

I would say the palette isn't set properly ...

Ben.

#8 lore raw
In reply to Benjamin Herrenschmidt
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 3 lines

console=ttyS0 console=tty0
Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs)

How so ?

Well, there have been many issues with frame-buffer in 2.6, not only on Mac platform.
With Open-Firmware frame buffer, I remember the first 2.6 kernels had no fb output at all.
Then came kernels that could display a Tux penguin in psychadelic colors, I guess it was drawing in 16 bits mode when the OF frame-buffer is 15 bits.
This has been solved in more recent kernels. I don't remember in which version it was fixed (but I think around 2.6.5 or 2.6.6).
I can easily reproduce this on my Ibook and on my Apple Network Server, which means it's not a hardware-dependant bug (Ibook 2 has an ATI graphic card, ANS is cirrus-logic) nor it's specific to some OF version (ANS one is really old...).

There is now another bug with qemu: with recent 2.6 kernels, the frame-buffer is recognized and console is working but it only draws characters black on black background, even if I send escape sequences to change the drawing color. Note that the penguin is well drawn, in those cases.
If you have an idea of what can cause this, I'd be glad to know it ;-)

[...]

Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#10 lore raw
In reply to Benjamin Herrenschmidt
Quoted 22 lines · Benjamin Herrenschmidt
Quoted 21 lines · J. Mayer
Quoted 5 lines · Benjamin Herrenschmidt
Quoted 3 lines

console=ttyS0 console=tty0
Note that the Open-Firmware frame-buffer support is broken in many 2.6 kernels (I mean on real Macs)

How so ?

Well, there have been many issues with frame-buffer in 2.6, not only on Mac platform.
With Open-Firmware frame buffer, I remember the first 2.6 kernels had no fb output at all.
Then came kernels that could display a Tux penguin in psychadelic colors, I guess it was drawing in 16 bits mode when the OF frame-buffer is 15 bits.
This has been solved in more recent kernels. I don't remember in which version it was fixed (but I think around 2.6.5 or 2.6.6).
I can easily reproduce this on my Ibook and on my Apple Network Server, which means it's not a hardware-dependant bug (Ibook 2 has an ATI graphic card, ANS is cirrus-logic) nor it's specific to some OF version (ANS one is really old...).

Quoted 8 lines
Quoted 6 lines

There is now another bug with qemu: with recent 2.6 kernels, the frame-buffer is recognized and console is working but it only draws characters black on black background, even if I send escape sequences to change the drawing color. Note that the penguin is well drawn, in those cases.
If you have an idea of what can cause this, I'd be glad to know it ;-)

I would say the palette isn't set properly ...

Right, is this set according to some OF properties (which could be a cause of the bug) ?
I didn't find anything like this in OF fb code, but I may have missed it....

Signature · 2 lines
J. Mayer <[email protected]>
Never organized
#11 lore raw
Quoted 7 lines

Right, is this set according to some OF properties (which could be a cause of the bug) ?
I didn't find anything like this in OF fb code, but I may have missed it....

prom_init() sets it using calls to OF fb driver setcolreg method.

Ben.