Patchwork [4/8] roms: build two seabios binaries

login
register
mail settings
Submitter Gerd Hoffmann
Date Dec. 2, 2013, 12:24 p.m.
Message ID <1385987083-19917-5-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/295906/
State New
Headers show

Comments

Gerd Hoffmann - Dec. 2, 2013, 12:24 p.m.
Adding xhci support to seabios made it jump over the 128k line.
Changing the bios size breaks migration, so we have to keep a
128k seabios binary for old machine types.  New machine types can
use a large 256k bios which should be big enougth for a while.

This patch updates the seabios build process to build seabios twice,
once full featured and once with xen and xhci turned off so the
resulting binary is small enougth to fit into 128k.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 roms/Makefile            | 7 ++++---
 roms/config.seabios      | 1 -
 roms/config.seabios-128k | 6 ++++++
 roms/config.seabios-256k | 3 +++
 4 files changed, 13 insertions(+), 4 deletions(-)
 delete mode 100644 roms/config.seabios
 create mode 100644 roms/config.seabios-128k
 create mode 100644 roms/config.seabios-256k

Patch

diff --git a/roms/Makefile b/roms/Makefile
index 10d5a65..fc716c1 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -56,9 +56,10 @@  default:
 	@echo "                    the EfiRom utility from edk2 / tianocore)"
 	@echo "  slof           -- update slof.bin"
 
-bios: build-seabios-config-seabios
-	cp seabios/builds/seabios/bios.bin ../pc-bios/bios.bin
-	cp seabios/builds/seabios/*dsdt.aml ../pc-bios/
+bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k
+	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-256k/src/fw/*dsdt.aml ../pc-bios/
 
 seavgabios: $(patsubst %,seavgabios-%,$(vgabios_variants))
 
diff --git a/roms/config.seabios b/roms/config.seabios
deleted file mode 100644
index c373b87..0000000
--- a/roms/config.seabios
+++ /dev/null
@@ -1 +0,0 @@ 
-# empty, default config works for us
diff --git a/roms/config.seabios-128k b/roms/config.seabios-128k
new file mode 100644
index 0000000..41f8381
--- /dev/null
+++ b/roms/config.seabios-128k
@@ -0,0 +1,6 @@ 
+# for qemu machine types 1.7 + older
+# need to turn off features (xhci) to make it fit into 128k
+CONFIG_QEMU=y
+CONFIG_ROM_SIZE=128
+CONFIG_XEN=n
+CONFIG_USB_XHCI=n
diff --git a/roms/config.seabios-256k b/roms/config.seabios-256k
new file mode 100644
index 0000000..65e5015
--- /dev/null
+++ b/roms/config.seabios-256k
@@ -0,0 +1,3 @@ 
+# for qemu machine types 2.0 + newer
+CONFIG_QEMU=y
+CONFIG_ROM_SIZE=256