Hi,
according the first problem I've already created a ticket. I (and others in IRC) failed building rom-images using nconfig+make with other payloads than seabios. See the txt-files in the ticket system; make reports something like: "Rule for filo unkown".
The second problem is that a self-build seabios doesn't boot in qemu (again for me and people in IRC). While the default-qemu-bios boots any diskimage just fine, -boot build/coreboot.rom causes seabios to start fine (at first), too. But when it actually tries to boot from an image, the errors: "Graphic initalization failed. Error setting up gfxboot. boot: Could not allocate memory."
If I build a new virtual harddrive, install Ubuntu there (using qemu's default bios) then I'm able to start the new image using my self-build bios.
On Mon, Oct 24, 2016 at 07:42:36AM +0200, Philipp Stanner wrote:
Hi,
[...]
The second problem is that a self-build seabios doesn't boot in qemu (again for me and people in IRC). While the default-qemu-bios boots any diskimage just fine, -boot build/coreboot.rom causes seabios to start fine (at first), too. But when it actually tries to boot from an image, the errors: "Graphic initalization failed. Error setting up gfxboot. boot: Could not allocate memory."
I think I was able to reproduce the problem, when Philipp described it on IRC:
1. checkout coreboot from git[1], or run make clean && rm .config
2. make menuconfig, select Emulation/QEMU-i440fx. SeaBIOS will automatically be selected.
3. make
4. Test with QEMU. I'm using QEMU 2.6.0 from Debian testing (a.k.a. stretch) on an x86_64 laptop. Both of the tested CDs use ISOLINUX.
4.1.1. get xubuntu-16.04.1-desktop-amd64.iso[2]
4.1.2. qemu-system-x86_64 -cdrom xubuntu-16.04.1-desktop-amd64.iso -m 512 A splash screen is shown, and then a graphical boot menu, which allows to select language, different boot modes, kernel command line, etc.
4.1.3. qemu-system-x86_64 -cdrom xubuntu-16.04.1-desktop-amd64.iso -m 512 -bios build/coreboot.rom The splash screen doesn't appear; instead an error is shown:
graphics initialization failed Error setting up gfxboot boot:
4.2.1. get debian-live-8.2.0-amd64-lxde-desktop.iso[3]
4.2.2. qemu-system-x86_64 -cdrom debian-live-8.2.0-amd64-lxde-desktop.iso A graphical boot menu is shown.
4.2.3. qemu-system-x86_64 -cdrom debian-live-8.2.0-amd64-lxde-desktop.iso -bios build/coreboot.rom ISOLINUX fails to present a graphic menu and falls back to a text-based menu.
I haven't looked at how ISOLINUX does graphics, or what "gfxboot" does exactly, but there's apparently something (graphics-related) in QEMU's stock BIOS, which coreboot+SeaBIOS doesn't provide.
If I build a new virtual harddrive, install Ubuntu there (using qemu's default bios) then I'm able to start the new image using my self-build bios.
I'm not sure what you mean here. Can you explain it in more detail?
Greetings, Jonathan Neuschäfer
[1] I'm currently on commit f5f0b7b71a450 plus some irrelevant local patches. [2] Available at http://cdimage.ubuntu.com/xubuntu/releases/16.04/release/, sha1sum: 4094e1c353742754064c59200ea5d5db0651e948 [3] Available at http://cdimage.debian.org/mirror/cdimage/archive/8.2.0-live/amd64/iso-hybrid..., sha1sum: b0dbe4ca8f526d1e43555459c538607d4a987184
Sure: Do the following:
1. qemu-img create test.img 10G 2. qemu-system-x86_64 -enable-kvm -hda test.img -cdrom ubuntu.iso -boot d -m 512 3. Install ubuntu on test.img
After installing, boot the new virtual machine with your self-build bios:
* qemu-system-x86_64 -enable-kvm -hda test.img -m 512 -bios build/coreboot.rom
See how the machine starts successfully, using the 'broken' seabios. Ubuntu boots successfully. Even starting my Windows7-machine nearly works, but while "Windows is loading files" is written the virtual screen / text becomes yellow and booting stops.
But Ubuntu can successfully be booted and used absolutely normaly with cb+seabios - only installing seems impossible and the errors you (Jonatahan) described, appear.
Greetings
Am 25.10.2016 um 01:10 schrieb Jonathan Neuschäfer:
If I build a new virtual harddrive, install Ubuntu there (using qemu's default bios) then I'm able to start the new image using my self-build bios.
I'm not sure what you mean here. Can you explain it in more detail?
On Tue, Oct 25, 2016 at 08:20:12AM +0200, Philipp Stanner wrote:
Sure: Do the following:
- qemu-img create test.img 10G
- qemu-system-x86_64 -enable-kvm -hda test.img -cdrom ubuntu.iso -boot d -m 512
- Install ubuntu on test.img
After installing, boot the new virtual machine with your self-build bios:
- qemu-system-x86_64 -enable-kvm -hda test.img -m 512 -bios build/coreboot.rom
See how the machine starts successfully, using the 'broken' seabios. Ubuntu boots successfully. Even starting my Windows7-machine nearly works, but while "Windows is loading files" is written the virtual screen / text becomes yellow and booting stops.
But Ubuntu can successfully be booted and used absolutely normaly with cb+seabios - only installing seems impossible and the errors you (Jonatahan) described, appear.
Ah, that's probably because Ubuntu boots through GRUB when it's installed, and GRUB doesn't need the graphical mode that ISOLINUX uses.
Jonathan Neuschäfer
Jonathan Neuschäfer j.neuschaefer@gmx.net writes:
I think I was able to reproduce the problem, when Philipp described it on IRC:
checkout coreboot from git[1], or run make clean && rm .config
make menuconfig, select Emulation/QEMU-i440fx. SeaBIOS will automatically be selected.
make
Test with QEMU. I'm using QEMU 2.6.0 from Debian testing (a.k.a. stretch) on an x86_64 laptop. Both of the tested CDs use ISOLINUX.
4.1.1. get xubuntu-16.04.1-desktop-amd64.iso[2]
4.1.2. qemu-system-x86_64 -cdrom xubuntu-16.04.1-desktop-amd64.iso -m 512 A splash screen is shown, and then a graphical boot menu, which allows to select language, different boot modes, kernel command line, etc.
4.1.3. qemu-system-x86_64 -cdrom xubuntu-16.04.1-desktop-amd64.iso -m 512 -bios build/coreboot.rom The splash screen doesn't appear; instead an error is shown:
graphics initialization failed Error setting up gfxboot boot:
4.2.1. get debian-live-8.2.0-amd64-lxde-desktop.iso[3]
4.2.2. qemu-system-x86_64 -cdrom debian-live-8.2.0-amd64-lxde-desktop.iso A graphical boot menu is shown.
4.2.3. qemu-system-x86_64 -cdrom debian-live-8.2.0-amd64-lxde-desktop.iso -bios build/coreboot.rom ISOLINUX fails to present a graphic menu and falls back to a text-based menu.
A quick test shows me that selecting CONFIG_SEABIOS_VGA_COREBOOT is the culprit. This change https://review.coreboot.org/#/c/16965/ selects this by default when native graphic init is used but apparently needs an exception for QEMU.
Kind regards
Hi,
graphics initialization failed Error setting up gfxboot boot:
Not sure how coreboot+seabios is configured by default. I see that too when running with coreboot native graphics.
SeaBIOS has a coreboot vgabios which uses the coreboot framebuffer and provides text mode emulation using the framebuffer, i.e. it works on *any* display hardware supported by coreboot. But in that case only a single graphics mode is available (whatever the coreboot framebuffer resolution is, for qemu it is compile-time configurable and IIRC 1024x768 by default).
I guess gfxboot is unhappy about not finding the mode it wants use ...
With coreboot vgabios NOT being rolled into the coreboot.rom (and CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=n) seabios will load the vgabios from the qemu vga pci rom bar instead and everything works fine because all usual resolutions are available then.
cheers, Gerd
PS: https://www.kraxel.org/repos/jenkins/ has rpms with both variants built, here is the config diff:
# diff /usr/share/doc/coreboot.git-4.5/coreboot-i440fx-seabios* --- /usr/share/doc/coreboot.git-4.5/coreboot-i440fx-seabios-corevga.config 2016-10-26 09:06:27.000000000 +0200 +++ /usr/share/doc/coreboot.git-4.5/coreboot-i440fx-seabios.config 2016-10-26 09:06:08.000000000 +0200 @@ -117,13 +117,11 @@ CONFIG_MAINBOARD_VENDOR="Emulation" CONFIG_MAX_CPUS=1 CONFIG_CACHE_ROM_SIZE_OVERRIDE=0x0 CONFIG_CBFS_SIZE=0x400000 -CONFIG_VGA_BIOS_ID="1234,1111" # CONFIG_ONBOARD_VGA_IS_PRIMARY is not set -CONFIG_VGA_BIOS=y +# CONFIG_VGA_BIOS is not set CONFIG_MAINBOARD_SERIAL_NUMBER="123456789" CONFIG_DCACHE_RAM_BASE=0xd0000 CONFIG_DCACHE_RAM_SIZE=0x10000 -CONFIG_VGA_BIOS_FILE="/usr/share/seabios.git-coreboot/vgabios-coreboot.bin" CONFIG_MAINBOARD_SMBIOS_MANUFACTURER="Emulation" CONFIG_POST_IO=y CONFIG_MAX_REBOOT_CNT=3 @@ -372,7 +370,7 @@ CONFIG_SUBSYSTEM_DEVICE_ID=0x0000 # # Display # -CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y +# CONFIG_FRAMEBUFFER_KEEP_VESA_MODE is not set
# # Generic Drivers @@ -399,8 +397,6 @@ CONFIG_FRAMEBUFFER_KEEP_VESA_MODE=y # CONFIG_HAVE_USBDEBUG is not set # CONFIG_HAVE_USBDEBUG_OPTIONS is not set CONFIG_DRIVERS_EMULATION_QEMU_BOCHS=y -CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_XRES=1024 -CONFIG_DRIVERS_EMULATION_QEMU_BOCHS_YRES=768 # CONFIG_SMBIOS_PROVIDED_BY_MOBO is not set # CONFIG_DRIVERS_I2C_PCF8523 is not set # CONFIG_DRIVERS_I2C_RTD2132 is not set