On Tue, Aug 26, 2014 at 12:56:18AM +0200, Denis 'GNUtoo' Carikli wrote:
On Mon, 25 Aug 2014 11:35:14 -0400 Kevin O'Connor kevin@koconnor.net wrote:
On Sun, Aug 24, 2014 at 11:45:35PM +0200, Denis 'GNUtoo' Carikli wrote:
The qemu vgabioses can be usefull in coreboot, since coreboot does support qemu.
I'm not sure why you'd want to build the QEMU vga roms when CONFIG_COREBOOT is set. All it would do is rebuild the same roms that already come with QEMU.
I have some i945 laptops which have coreboot with the native GPU initialization. (I've also an Alix-1c with a geode LX).
So, I wanted to have a (virtual) machine that is closer to my coreboot machines.
The goal is to test the payloads way faster with qemu, then once ready, to try the payload on the real hardware.
Right now qemu uses the roms that comes with it, and it probably make it looks like a flash chip that is on the (virtual) GPU.
That's right, by default QEMU places SeaVGABIOS in the VGA device's PCI ROM BAR.
Here's an example of my test configuration: Coreboot loads grub. Then grub has an entry for SeaBIOS. At that point the goal is to have a functional SeaBIOS with keyboard and VGA graphics.
There is a lot of possible variations for such setup:
Coreboot:
- Both setup(i945 laptops and qemu) can run a VGA option rom(CONFIG_ON_DEVICE_ROM_RUN), or not. They can run the rom in two different ways:
- native(CONFIG_PCI_OPTION_ROM_RUN_REALMODE)
- secure(CONFIG_PCI_OPTION_ROM_RUN_YABEL)
- It can use native graphics initialization (CONFIG_MAINBOARD_DO_NATIVE_VGA_INIT), but its selection seem to be forced for qemu, it's not for the i945 laptops.
- It can switch to VESA(CONFIG_FRAMEBUFFER_KEEP_VESA_MODE) or keep the "coreboot framebuffer mode"
- With qemu(not yet available for the i945 laptops), it can choose a resolution resolution(CONFIG_FRAMEBUFFER_SET_VESA_MODE)
SeaBIOS:
- Hardware specific VGA helpers(VGAHOOKS) enabled or disabled.
- Then there is the choice of building no option rom(CONFIG_NO_VGABIOS), or building the "coreboot linear framebuffer" one (CONFIG_VGA_COREBOOT).
I think you may be confusing SeaBIOS with SeaVGABIOS. Although SeaVGABIOS is in the SeaBIOS git repo, it builds a totally separate ROM. The choices under the "VGA ROM" menu only impact the creation of SeaVGABIOS (which results in out/vgabios.rom). The options in that menu have no impact on the main SeaBIOS rom (out/bios.bin.elf).
Given the ammount of variations, testing on qemu could save a lot of time, even if testing on real hardware is unavoidable.
The i945 laptops don't have free software standalone VGA option roms.
But given the number of possibilites for testing on qemu, I was wondering if disabling all the VGA related options in coreboot, and only using SeaBIOS's vga option roms for qemu could help for getting started.
By default, QEMU now uses SeaVGABIOS ROMS. So, I don't see why you'd want to recompile them. But, if you do, then select CONFIG_QEMU, select CONFIG_VGA_CIRRUS (or CONFIG_VGA_BOCHS), then run make, and then copy the vgarom to your qemu area (cp out/vgabios.bin /path/to/somewhere/). You can then change SeaBIOS back to build for coreboot (select CONFIG_COREBOOT) and build the SeaBIOS rom for coreboot.
That would give a (hopefully working) reference configuration.
Then I would step by step modify the configurations to get something closer to the i945 laptops.
PS: Maybe someone has a hint on how to disable the "flash chip that is on the (virtual) GPU" in qemu?
I think you can by adding "-device cirrus-vga,romfile=" to the QEMU command line. It may need additional tweaks though.
-Kevin