qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/1] qemu-firmware repo
@ 2017-09-26 11:17 Gerd Hoffmann
  2017-09-26 11:17 ` [Qemu-devel] [PATCH 1/1] add Makefile, add configs for seabios Gerd Hoffmann
  2017-09-27  7:19 ` [Qemu-devel] [PATCH 0/1] qemu-firmware repo Paolo Bonzini
  0 siblings, 2 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2017-09-26 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

  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

-- 
2.9.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH 1/1] add Makefile, add configs for seabios
  2017-09-26 11:17 [Qemu-devel] [PATCH 0/1] qemu-firmware repo Gerd Hoffmann
@ 2017-09-26 11:17 ` Gerd Hoffmann
  2017-09-27  7:19 ` [Qemu-devel] [PATCH 0/1] qemu-firmware repo Paolo Bonzini
  1 sibling, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2017-09-26 11:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: Gerd Hoffmann

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.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 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

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..bf16c3b562
--- /dev/null
+++ b/Makefile
@@ -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/$*
diff --git a/configs/seabios-128k b/configs/seabios-128k
new file mode 100644
index 0000000000..93203af0de
--- /dev/null
+++ b/configs/seabios-128k
@@ -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
diff --git a/configs/seabios-256k b/configs/seabios-256k
new file mode 100644
index 0000000000..65e5015c2f
--- /dev/null
+++ b/configs/seabios-256k
@@ -0,0 +1,3 @@
+# for qemu machine types 2.0 + newer
+CONFIG_QEMU=y
+CONFIG_ROM_SIZE=256
diff --git a/configs/vga-cirrus b/configs/vga-cirrus
new file mode 100644
index 0000000000..c8fe58239f
--- /dev/null
+++ b/configs/vga-cirrus
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_CIRRUS=y
+CONFIG_VGA_PCI=y
diff --git a/configs/vga-isavga b/configs/vga-isavga
new file mode 100644
index 0000000000..e55e294a0c
--- /dev/null
+++ b/configs/vga-isavga
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=n
diff --git a/configs/vga-qxl b/configs/vga-qxl
new file mode 100644
index 0000000000..d393f0c34f
--- /dev/null
+++ b/configs/vga-qxl
@@ -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
diff --git a/configs/vga-stdvga b/configs/vga-stdvga
new file mode 100644
index 0000000000..7d063b787c
--- /dev/null
+++ b/configs/vga-stdvga
@@ -0,0 +1,3 @@
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_BOCHS=y
+CONFIG_VGA_PCI=y
diff --git a/configs/vga-virtio b/configs/vga-virtio
new file mode 100644
index 0000000000..aa7a15ba11
--- /dev/null
+++ b/configs/vga-virtio
@@ -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
diff --git a/configs/vga-vmware b/configs/vga-vmware
new file mode 100644
index 0000000000..eb10427afd
--- /dev/null
+++ b/configs/vga-vmware
@@ -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
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-26 11:17 [Qemu-devel] [PATCH 0/1] qemu-firmware repo Gerd Hoffmann
  2017-09-26 11:17 ` [Qemu-devel] [PATCH 1/1] add Makefile, add configs for seabios Gerd Hoffmann
@ 2017-09-27  7:19 ` Paolo Bonzini
  2017-09-27  9:11   ` Gerd Hoffmann
  2017-09-27  9:15   ` Daniel P. Berrange
  1 sibling, 2 replies; 8+ messages in thread
From: Paolo Bonzini @ 2017-09-27  7:19 UTC (permalink / raw)
  To: Gerd Hoffmann, qemu-devel

On 26/09/2017 13:17, Gerd Hoffmann wrote:
> 
> 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.

Are you planning to include only submodules, or also "QEMU-native"
firmware such as linuxboot, kvmvapic, s390-ccw, spapr-rtas, etc.?

Thanks,

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-27  7:19 ` [Qemu-devel] [PATCH 0/1] qemu-firmware repo Paolo Bonzini
@ 2017-09-27  9:11   ` Gerd Hoffmann
  2017-09-27  9:15   ` Daniel P. Berrange
  1 sibling, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2017-09-27  9:11 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel

On Wed, 2017-09-27 at 09:19 +0200, Paolo Bonzini wrote:
> On 26/09/2017 13:17, Gerd Hoffmann wrote:
> > 
> > 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.
> 
> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-27  7:19 ` [Qemu-devel] [PATCH 0/1] qemu-firmware repo Paolo Bonzini
  2017-09-27  9:11   ` Gerd Hoffmann
@ 2017-09-27  9:15   ` Daniel P. Berrange
  2017-09-27 10:45     ` Gerd Hoffmann
  2017-09-27 11:34     ` Paolo Bonzini
  1 sibling, 2 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2017-09-27  9:15 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Gerd Hoffmann, qemu-devel

On Wed, Sep 27, 2017 at 09:19:22AM +0200, Paolo Bonzini wrote:
> On 26/09/2017 13:17, Gerd Hoffmann wrote:
> > 
> > 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.
> 
> 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
-- 
|: 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 :|

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-27  9:15   ` Daniel P. Berrange
@ 2017-09-27 10:45     ` Gerd Hoffmann
  2017-09-27 11:34     ` Paolo Bonzini
  1 sibling, 0 replies; 8+ messages in thread
From: Gerd Hoffmann @ 2017-09-27 10:45 UTC (permalink / raw)
  To: Daniel P. Berrange, Paolo Bonzini; +Cc: qemu-devel

  Hi,

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-27  9:15   ` Daniel P. Berrange
  2017-09-27 10:45     ` Gerd Hoffmann
@ 2017-09-27 11:34     ` Paolo Bonzini
  2017-09-27 12:01       ` Daniel P. Berrange
  1 sibling, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2017-09-27 11:34 UTC (permalink / raw)
  To: Daniel P. Berrange; +Cc: Gerd Hoffmann, qemu-devel

On 27/09/2017 11:15, Daniel P. Berrange wrote:
> On Wed, Sep 27, 2017 at 09:19:22AM +0200, Paolo Bonzini wrote:
>> 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.

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.

> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH 0/1] qemu-firmware repo
  2017-09-27 11:34     ` Paolo Bonzini
@ 2017-09-27 12:01       ` Daniel P. Berrange
  0 siblings, 0 replies; 8+ messages in thread
From: Daniel P. Berrange @ 2017-09-27 12:01 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Gerd Hoffmann, qemu-devel

On Wed, Sep 27, 2017 at 01:34:12PM +0200, Paolo Bonzini wrote:
> On 27/09/2017 11:15, Daniel P. Berrange wrote:
> > On Wed, Sep 27, 2017 at 09:19:22AM +0200, Paolo Bonzini wrote:
> >> 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.
> 
> 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.

> 
> > 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
-- 
|: 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 :|

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-09-27 12:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-26 11:17 [Qemu-devel] [PATCH 0/1] qemu-firmware repo Gerd Hoffmann
2017-09-26 11:17 ` [Qemu-devel] [PATCH 1/1] add Makefile, add configs for seabios Gerd Hoffmann
2017-09-27  7:19 ` [Qemu-devel] [PATCH 0/1] qemu-firmware repo Paolo Bonzini
2017-09-27  9:11   ` Gerd Hoffmann
2017-09-27  9:15   ` Daniel P. Berrange
2017-09-27 10:45     ` Gerd Hoffmann
2017-09-27 11:34     ` Paolo Bonzini
2017-09-27 12:01       ` Daniel P. Berrange

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).