qemu-firmware repo
cover qemu-firmware repo
Hi,
Ok, we want for varios reasons separate the firmware from the main qemu repo. Here is my attempt to create such a repo. For starters only seabios has been added here.
You can find the repo with currently three patches here:
https://www.kraxel.org/cgit/qemu-firmware/
This "series" is only patch #2 of the repo. Havn't found a way to convince git-format-patch to include the initial commit of a repo. But patch #1 (the initial commit) only adds the seabios submodule, patch #3 adds the binary blobs, so patch #2 actually is the most interesting one.
Comments?
cheers,
Gerd
Gerd Hoffmann (1):
add Makefile, add configs for seabios
Makefile | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ configs/seabios-128k | 12 ++++++++ configs/seabios-256k | 3 ++ configs/vga-cirrus | 3 ++ configs/vga-isavga | 3 ++ configs/vga-qxl | 6 ++++ configs/vga-stdvga | 3 ++ configs/vga-virtio | 6 ++++ configs/vga-vmware | 6 ++++ 9 files changed, 122 insertions(+) create mode 100644 Makefile create mode 100644 configs/seabios-128k create mode 100644 configs/seabios-256k create mode 100644 configs/vga-cirrus create mode 100644 configs/vga-isavga create mode 100644 configs/vga-qxl create mode 100644 configs/vga-stdvga create mode 100644 configs/vga-virtio create mode 100644 configs/vga-vmware
Signature · 1 line
2.9.3
PATCH 1/1 add Makefile, add configs for seabios
Largely identical to roms/Makefile in qemu repo. Paths have been adapted to qemu-firmware repo layout. seabios submodule is updated automatically for builds. "make install" target has been added.
"make help" text is more verbose.
--- Makefile | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++ configs/seabios-128k | 12 ++++++++ configs/seabios-256k | 3 ++ configs/vga-cirrus | 3 ++ configs/vga-isavga | 3 ++ configs/vga-qxl | 6 ++++ configs/vga-stdvga | 3 ++ configs/vga-virtio | 6 ++++ configs/vga-vmware | 6 ++++ 9 files changed, 122 insertions(+) create mode 100644 Makefile create mode 100644 configs/seabios-128k create mode 100644 configs/seabios-256k create mode 100644 configs/vga-cirrus create mode 100644 configs/vga-isavga create mode 100644 configs/vga-qxl create mode 100644 configs/vga-stdvga create mode 100644 configs/vga-virtio create mode 100644 configs/vga-vmware
Makefile new file +80 -0
@@ -0,0 +1,80 @@ +# directories +DESTDIR ?= +prefix ?= /usr/local +datadir := $(DESTDIR)$(prefix)/share/qemu-firmware + +vgabios_variants := stdvga cirrus vmware qxl isavga virtio +vgabios_targets := $(subst -isavga,,$(patsubst %,vgabios-%.bin,$(vgabios_variants))) + +# +# cross compiler auto detection +# +path := $(subst :, ,$(PATH)) +system := $(shell uname -s | tr "A-Z" "a-z") + +# first find cross binutils in path +find-cross-ld = $(firstword $(wildcard $(patsubst %,%/$(1)-*$(system)*-ld,$(path)))) +# then check we have cross gcc too +find-cross-gcc = $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-cross-ld,$(1))))) +# finally strip off path + toolname so we get the prefix +find-cross-prefix = $(subst gcc,,$(notdir $(call find-cross-gcc,$(1)))) + +powerpc64_cross_prefix := $(call find-cross-prefix,powerpc64) +powerpc_cross_prefix := $(call find-cross-prefix,powerpc) +x86_64_cross_prefix := $(call find-cross-prefix,x86_64) + +# tag our seabios builds +SEABIOS_EXTRAVERSION="-prebuilt.qemu-project.org" + +default help: + @echo + @echo "nothing is done by default" + @echo + @echo "build targets:" + @echo " bios -- update bios.bin (seabios)" + @echo " vgabios -- update vgabios binaries (seabios)" + @echo + @echo "other targets:" + @echo " clean -- cleanup" + @echo " install -- install blobs to $(datadir)" + @echo + @echo "You can set DESTDIR and prefix on the command line to" + @echo "to change the install target directory, for example:" + @echo "$ make prefix=/usr install" + @echo + +install: + mkdir -p $(datadir) + cp -v blobs/*.bin $(datadir) + +bios: build-seabios-config-seabios-128k build-seabios-config-seabios-256k + cp repos/seabios/builds/seabios-128k/bios.bin blobs/bios.bin + cp repos/seabios/builds/seabios-256k/bios.bin blobs/bios-256k.bin + +vgabios: $(patsubst %,vgabios-%,$(vgabios_variants)) + +vgabios-isavga: build-seabios-config-vga-isavga + cp repos/seabios/builds/vga-isavga/vgabios.bin blobs/vgabios.bin + +vgabios-%: build-seabios-config-vga-% + cp repos/seabios/builds/vga-$*/vgabios.bin blobs/vgabios-$*.bin + +build-seabios-config-%: configs/% submodule-seabios + mkdir -p repos/seabios/builds/$* + cp $< repos/seabios/builds/$*/.config + $(MAKE) -C repos/seabios \ + EXTRAVERSION=$(SEABIOS_EXTRAVERSION) \ + CROSS_COMPILE=$(x86_64_cross_prefix) \ + KCONFIG_CONFIG=$(CURDIR)/repos/seabios/builds/$*/.config \ + OUT=$(CURDIR)/repos/seabios/builds/$*/ oldnoconfig + $(MAKE) -C repos/seabios \ + EXTRAVERSION=$(SEABIOS_EXTRAVERSION) \ + CROSS_COMPILE=$(x86_64_cross_prefix) \ + KCONFIG_CONFIG=$(CURDIR)/repos/seabios/builds/$*/.config \ + OUT=$(CURDIR)/repos/seabios/builds/$*/ all + +clean: + rm -rf repos/seabios/.config repos/seabios/out repos/seabios/builds + +submodule-%: + git submodule update --init repos/$*
configs/seabios-128k new file +12 -0
@@ -0,0 +1,12 @@ +# for qemu machine types 1.7 + older +# need to turn off features (xhci,uas) to make it fit into 128k +CONFIG_QEMU=y +CONFIG_ROM_SIZE=128 +CONFIG_BOOTSPLASH=n +CONFIG_XEN=n +CONFIG_USB_OHCI=n +CONFIG_USB_XHCI=n +CONFIG_USB_UAS=n +CONFIG_SDCARD=n +CONFIG_TCGBIOS=n +CONFIG_MPT_SCSI=n
configs/seabios-256k new file +3 -0
@@ -0,0 +1,3 @@ +# for qemu machine types 2.0 + newer +CONFIG_QEMU=y +CONFIG_ROM_SIZE=256
configs/vga-cirrus new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_CIRRUS=y +CONFIG_VGA_PCI=y
configs/vga-isavga new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_BOCHS=y +CONFIG_VGA_PCI=n
configs/vga-qxl new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_BOCHS=y +CONFIG_VGA_PCI=y +CONFIG_OVERRIDE_PCI_ID=y +CONFIG_VGA_VID=0x1b36 +CONFIG_VGA_DID=0x0100
configs/vga-stdvga new file +3 -0
@@ -0,0 +1,3 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_BOCHS=y +CONFIG_VGA_PCI=y
configs/vga-virtio new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_BOCHS=y +CONFIG_VGA_PCI=y +CONFIG_OVERRIDE_PCI_ID=y +CONFIG_VGA_VID=0x1af4 +CONFIG_VGA_DID=0x1050
configs/vga-vmware new file +6 -0
@@ -0,0 +1,6 @@ +CONFIG_BUILD_VGABIOS=y +CONFIG_VGA_BOCHS=y +CONFIG_VGA_PCI=y +CONFIG_OVERRIDE_PCI_ID=y +CONFIG_VGA_VID=0x15ad +CONFIG_VGA_DID=0x0405
Signature · 1 line
2.9.3
Quoted 5 lines · Gerd Hoffmann
Ok, we want for varios reasons separate the firmware from the main qemu repo. Here is my attempt to create such a repo. For starters only seabios has been added here.
Quoted 8 lines
You can find the repo with currently three patches here:
https://www.kraxel.org/cgit/qemu-firmware/This "series" is only patch #2 of the repo. Havn't found a way to convince git-format-patch to include the initial commit of a repo. But patch #1 (the initial commit) only adds the seabios submodule, patch #3 adds the binary blobs, so patch #2 actually is the most interesting one.
Are you planning to include only submodules, or also "QEMU-native" firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?
Thanks,
Paolo
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Gerd Hoffmann
Ok, we want for varios reasons separate the firmware from the main qemu repo. Here is my attempt to create such a repo. For starters only seabios has been added here.
You can find the repo with currently three patches here:
https://www.kraxel.org/cgit/qemu-firmware/
Quoted 8 lines
Quoted 5 lines
This "series" is only patch #2 of the repo. Havn't found a way to convince git-format-patch to include the initial commit of a repo. But patch #1 (the initial commit) only adds the seabios submodule, patch #3 adds the binary blobs, so patch #2 actually is the most interesting one.
Are you planning to include only submodules, or also "QEMU-native" firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?
The submodules are my priority.
I think it makes sense for all firmware where we have pre-built binaries committed to the qemu repo, even if the source is in the qemu repo too. But maybe it's easier to keep those in qemu. They tend to be small and they are also not problematic license-wise.
cheers,
Gerd
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Gerd Hoffmann
Ok, we want for varios reasons separate the firmware from the main qemu repo. Here is my attempt to create such a repo. For starters only seabios has been added here.
You can find the repo with currently three patches here:
https://www.kraxel.org/cgit/qemu-firmware/
Quoted 8 lines
Quoted 5 lines
This "series" is only patch #2 of the repo. Havn't found a way to convince git-format-patch to include the initial commit of a repo. But patch #1 (the initial commit) only adds the seabios submodule, patch #3 adds the binary blobs, so patch #2 actually is the most interesting one.
Are you planning to include only submodules, or also "QEMU-native" firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?
The submodules make sense to split out because distro vendors buld them independently of QEMU, and would rather not have them in the tarballs, so they have a clearer path to license compliance and legal export certification.
The other bits of mention are all built normally as part of QEMU and not subject to these problems, so I don't see a benefit to splitting them out of QEMU. In fact putting those bits in the qemu-firmware repo would re-introduce the problem we're trying to solve because distros would then need to get linuxboox, kvmvapi etc from a tarball of qemu-firmware which would once again include all the bits they don't want to have.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
Hi,
Quoted 2 lines
The other bits of mention are all built normally as part of QEMU and not subject to these problems,
Sure? As far I know no firmware is build automatically as cross compilers might be needed to do that for guest arch != host arch.
But yes, we don't have licensing issues (we ship the sources too), so keeping them in the main repo isn't that a big issue.
cheers,
Gerd
Quoted 4 lines · Daniel P. Berrange
Quoted 2 lines · Paolo Bonzini
Are you planning to include only submodules, or also "QEMU-native" firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?
Quoted 8 lines
The submodules make sense to split out because distro vendors buld them independently of QEMU, and would rather not have them in the tarballs, so they have a clearer path to license compliance and legal export certification.
The other bits of mention are all built normally as part of QEMU and not subject to these problems, so I don't see a benefit to splitting them out of QEMU.
They aren't rebuilt in general. You end up with x86 builds of qemu-system-x86 rebuilding linuxboot, ppc builds of qemu-system-ppc rebuilding spapr-rtas, etc. (search configure for "roms="). In fact, QEMU has a special exception in Fedora just because these are too hard to untangle.
So the advantage would be the ability to introduce better infrastructure for cross compilation, without complicating further the QEMU build system.
Quoted 5 lines
putting those bits in the qemu-firmware
repo would re-introduce the problem we're trying to solve because distros would then need to get linuxboox, kvmvapi etc from a tarball of qemu-firmware which would once again include all the bits they don't want to have.
This is true. We could distribute a qemu-firmware tarball with just the QEMU-specific bits, and a qemu-firmware-all tarball with also those that are built separately.
Paolo
Quoted 14 lines · Paolo Bonzini
Quoted 4 lines · Daniel P. Berrange
Quoted 2 lines · Paolo Bonzini
Are you planning to include only submodules, or also "QEMU-native" firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?
Quoted 8 lines
The submodules make sense to split out because distro vendors buld them independently of QEMU, and would rather not have them in the tarballs, so they have a clearer path to license compliance and legal export certification.
The other bits of mention are all built normally as part of QEMU and not subject to these problems, so I don't see a benefit to splitting them out of QEMU.
Quoted 8 lines
They aren't rebuilt in general. You end up with x86 builds of qemu-system-x86 rebuilding linuxboot, ppc builds of qemu-system-ppc rebuilding spapr-rtas, etc. (search configure for "roms="). In fact, QEMU has a special exception in Fedora just because these are too hard to untangle.
So the advantage would be the ability to introduce better infrastructure for cross compilation, without complicating further the QEMU build system.
Ah I see.
Quoted 10 lines
Quoted 6 lines
putting those bits in the qemu-firmware
repo would re-introduce the problem we're trying to solve because distros would then need to get linuxboox, kvmvapi etc from a tarball of qemu-firmware which would once again include all the bits they don't want to have.This is true. We could distribute a qemu-firmware tarball with just the QEMU-specific bits, and a qemu-firmware-all tarball with also those that are built separately.
Yep, as long as there's a tarball for the QEMU bits that does not contain the 3rd party bits, that would work.
Regards,
Daniel
Signature · 3 lines
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|