diff mbox

Why is SeaBIOS used with -kernel?

Message ID 20160401111139.GK32728@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Richard W.M. Jones April 1, 2016, 11:11 a.m. UTC
On Fri, Apr 01, 2016 at 01:07:55PM +0200, Gerd Hoffmann wrote:
> On Fr, 2016-04-01 at 11:17 +0100, Richard W.M. Jones wrote:
> > On Fri, Apr 01, 2016 at 11:18:30AM +0200, Gerd Hoffmann wrote:
> > >   Hi,
> > > 
> > > > I wonder how we can make use of this in qemu and downstream distros?
> > > > Can we have a bios-min.bin which is used with -kernel boots?
> > > 
> > > We already build two seabios roms: one full featued and one slightly
> > > stripped down to keep it below 128k, for backward compatibility with old
> > > machine types.
> > > 
> > > Adding a third config for -kernel boot should be easy.  For that use
> > > case we can probably also turn on seabios logging to the serial console
> > > and drop sgabios.  We don't need input (no boot menu) and we also don't
> > > need to hook into int10 (no grub/ipxe using that for output).
> > 
> > SeaBIOS logging is slow (or more likely, serial output is slow).
> > And sgabios is useful for debugging.
> 
> Ah, I see.  debuglevel=1 prints too much and debuglevel=0 has no logging
> at all.  We'd need seabios log at least the version banner to serial
> even with debuglevel=0 to replace sgabios.
> 
> https://www.kraxel.org/cgit/qemu/log/?h=work/stripped-seabios
> 
> Not hooked into -kernel yet, so you have to use "-bios bios-kboot.bin".
> 
> Comments?

I think we were working on the same thing ...  Attached is my
version.

Note that you must enable at least CONFIG_MPTABLE else virtio-scsi
does not work in the guest.  I also enabled ACPI & SMBIOS & PIRTABLE.

Rich.

Comments

Gerd Hoffmann April 1, 2016, 11:32 a.m. UTC | #1
Hi,

> I think we were working on the same thing ...  Attached is my
> version.
> 
> Note that you must enable at least CONFIG_MPTABLE else virtio-scsi
> does not work in the guest.  I also enabled ACPI & SMBIOS & PIRTABLE.

They are enabled by default, no need to explicitly say so ;)

cheers,
  Gerd
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 1d076a9..c4e939d 100644
--- a/Makefile
+++ b/Makefile
@@ -389,7 +389,8 @@  common  de-ch  es     fo  fr-ca  hu     ja  mk  nl-be      pt  sl     tr \
 bepo    cz
 
 ifdef INSTALL_BLOBS
-BLOBS=bios.bin bios-256k.bin sgabios.bin vgabios.bin vgabios-cirrus.bin \
+BLOBS=bios.bin bios-256k.bin bios-fast.bin \
+sgabios.bin vgabios.bin vgabios-cirrus.bin \
 vgabios-stdvga.bin vgabios-vmware.bin vgabios-qxl.bin vgabios-virtio.bin \
 acpi-dsdt.aml \
 ppc_rom.bin openbios-sparc32 openbios-sparc64 openbios-ppc QEMU,tcx.bin QEMU,cgthree.bin \
diff --git a/roms/Makefile b/roms/Makefile
index 7bd1252..26b0586 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -61,9 +61,11 @@  default:
 	@echo "  slof           -- update slof.bin"
 	@echo "  u-boot.e500    -- update u-boot.e500"
 
-bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
+bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k \
+      build-seabios-config-seabios-fast
 	cp seabios/builds/seabios-128k/bios.bin ../pc-bios/bios.bin
 	cp seabios/builds/seabios-256k/bios.bin ../pc-bios/bios-256k.bin
+	cp seabios/builds/seabios-fast/bios.bin ../pc-bios/bios-fast.bin
 
 seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants))
 
diff --git a/roms/config.seabios-fast b/roms/config.seabios-fast
new file mode 100644
index 0000000..98a4c27
--- /dev/null
+++ b/roms/config.seabios-fast
@@ -0,0 +1,12 @@ 
+# The most fastest SeaBIOS that can boot Linux using -kernel.
+CONFIG_USB=n
+CONFIG_DRIVES=n
+CONFIG_KEYBOARD=n
+CONFIG_MOUSE=n
+CONFIG_WRITABLE_UPPERMEMORY=y
+CONFIG_TCGBIOS=n
+CONFIG_PIRTABLE=y
+CONFIG_MPTABLE=y
+CONFIG_SMBIOS=y
+CONFIG_ACPI=y
+CONFIG_DEBUG_LEVEL=0