On Fri, Nov 18, 2016 at 10:48:02AM +0100, Dennis Guse wrote:
I know usually Seabios is loaded by Coreboot and then Seabios loads its modules from CBFS. I want to do it slightly different:
- Hardware starts coreboot (actually libreboot flashed to a Lenovo X60)
- Coreboot starts Grub2
- Grub2 chainloads Seabios from external storage, e.g., USB0:
`chainloader (usb0,msdos1)/bios.bin.elf`
- Seabios starts and loads its roms and configuration NOT from CBFS
My actual reason for not accessing CBFS is that I want to avoid flashing the CBFS to hardware for every change of Seabios or its configuration. However, I want to have VGA output...
The multiboot support should allow one to pass modules from grub2 to SeaBIOS. I've not used multiboot, but this was an example posted in the past:
menuentry "SeaBIOS (mb)" --unrestricted { root=ahci0,2 multiboot /bios.bin.elf module /vgabios_x230.rom name=pci8086,0166.rom }
So far, I can chainload Seabios from Grub2 (mostly via USB0). Then Seabios is accessing the CBFS and automatically loads Grub2 from CBFS.
I don't see why SeaBIOS would automatically chainload grub2 unless you asked it to. SeaBIOS only brings in payloads that are stored in the "img/" directory of CBFS - as long as one doesn't put images in that directory, SeaBIOS wont attempt to boot them.
For my case, it would be perfect if the roms (mainly VGA.rom) and configuration would be compiled into the `bios.bin.elf`.
I looked into the source and did not find a built in option for this (I think nobody ever came with such a use case). What would be a good starting point for me?
There's no support for compiling in binaries to SeaBIOS.
I'm CC'ing Vladimir as he added the multiboot support.
-Kevin
Thanks - works like charm! For reproducability: http://g00se.org/2016/11/seabios-on-libreboot.html
On Fri, Nov 18, 2016 at 4:45 PM, Kevin O'Connor kevin@koconnor.net wrote:
On Fri, Nov 18, 2016 at 10:48:02AM +0100, Dennis Guse wrote:
I know usually Seabios is loaded by Coreboot and then Seabios loads its modules from CBFS. I want to do it slightly different:
- Hardware starts coreboot (actually libreboot flashed to a Lenovo X60)
- Coreboot starts Grub2
- Grub2 chainloads Seabios from external storage, e.g., USB0:
`chainloader (usb0,msdos1)/bios.bin.elf`
- Seabios starts and loads its roms and configuration NOT from CBFS
My actual reason for not accessing CBFS is that I want to avoid flashing the CBFS to hardware for every change of Seabios or its configuration. However, I want to have VGA output...
The multiboot support should allow one to pass modules from grub2 to SeaBIOS. I've not used multiboot, but this was an example posted in the past:
menuentry "SeaBIOS (mb)" --unrestricted { root=ahci0,2 multiboot /bios.bin.elf module /vgabios_x230.rom name=pci8086,0166.rom }
Just for documentation, I used for SeaVGABIOS:
multiboot (usb0,msdos1)/bios.elf.bin module (usb0,msdos1)/vgabios.bin name=vgaroms/seavgabios.bin boot
So far, I can chainload Seabios from Grub2 (mostly via USB0). Then Seabios is accessing the CBFS and automatically loads Grub2 from CBFS.
I don't see why SeaBIOS would automatically chainload grub2 unless you asked it to. SeaBIOS only brings in payloads that are stored in the "img/" directory of CBFS - as long as one doesn't put images in that directory, SeaBIOS wont attempt to boot them.
Grub2 is loaded by SeaBIOS if CBFS support is enabled. As Grub2 resides in img/ to be loaded by coreboot, SeaBIOS finds and loads it. I simply disabled CBFS support in SeaBIOS to avoid this.
For my case, it would be perfect if the roms (mainly VGA.rom) and configuration would be compiled into the `bios.bin.elf`.
I looked into the source and did not find a built in option for this (I think nobody ever came with such a use case). What would be a good starting point for me?
There's no support for compiling in binaries to SeaBIOS.
I'm CC'ing Vladimir as he added the multiboot support.
Thanks for implementing it!
-Kevin