From nobody Sat May 4 13:59:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1506425731323169.7886895970139; Tue, 26 Sep 2017 04:35:31 -0700 (PDT) Received: from localhost ([::1]:46834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwo95-0004uM-Hc for importer@patchew.org; Tue, 26 Sep 2017 07:35:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwnsd-0007K7-MD for qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:18:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwnsU-0006rR-NK for qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:18:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39288) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwnsU-0006r9-CO for qemu-devel@nongnu.org; Tue, 26 Sep 2017 07:18:14 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5A6945275A for ; Tue, 26 Sep 2017 11:18:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-102.ams2.redhat.com [10.36.116.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id 078C15C550; Tue, 26 Sep 2017 11:18:10 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 7D9933F113; Tue, 26 Sep 2017 13:18:08 +0200 (CEST) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5A6945275A Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Tue, 26 Sep 2017 13:17:57 +0200 Message-Id: <20170926111757.3628-2-kraxel@redhat.com> In-Reply-To: <20170926111757.3628-1-kraxel@redhat.com> References: <20170926111757.3628-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Tue, 26 Sep 2017 11:18:13 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/1] add Makefile, add configs for seabios X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Gerd Hoffmann Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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 ?=3D +prefix ?=3D /usr/local +datadir :=3D $(DESTDIR)$(prefix)/share/qemu-firmware + +vgabios_variants :=3D stdvga cirrus vmware qxl isavga virtio +vgabios_targets :=3D $(subst -isavga,,$(patsubst %,vgabios-%.bin,$(vgabio= s_variants))) + +# +# cross compiler auto detection +# +path :=3D $(subst :, ,$(PATH)) +system :=3D $(shell uname -s | tr "A-Z" "a-z") + +# first find cross binutils in path +find-cross-ld =3D $(firstword $(wildcard $(patsubst %,%/$(1)-*$(system)*-l= d,$(path)))) +# then check we have cross gcc too +find-cross-gcc =3D $(firstword $(wildcard $(patsubst %ld,%gcc,$(call find-= cross-ld,$(1))))) +# finally strip off path + toolname so we get the prefix +find-cross-prefix =3D $(subst gcc,,$(notdir $(call find-cross-gcc,$(1)))) + +powerpc64_cross_prefix :=3D $(call find-cross-prefix,powerpc64) +powerpc_cross_prefix :=3D $(call find-cross-prefix,powerpc) +x86_64_cross_prefix :=3D $(call find-cross-prefix,x86_64) + +# tag our seabios builds +SEABIOS_EXTRAVERSION=3D"-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=3D/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=3D$(SEABIOS_EXTRAVERSION) \ + CROSS_COMPILE=3D$(x86_64_cross_prefix) \ + KCONFIG_CONFIG=3D$(CURDIR)/repos/seabios/builds/$*/.config \ + OUT=3D$(CURDIR)/repos/seabios/builds/$*/ oldnoconfig + $(MAKE) -C repos/seabios \ + EXTRAVERSION=3D$(SEABIOS_EXTRAVERSION) \ + CROSS_COMPILE=3D$(x86_64_cross_prefix) \ + KCONFIG_CONFIG=3D$(CURDIR)/repos/seabios/builds/$*/.config \ + OUT=3D$(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=3Dy +CONFIG_ROM_SIZE=3D128 +CONFIG_BOOTSPLASH=3Dn +CONFIG_XEN=3Dn +CONFIG_USB_OHCI=3Dn +CONFIG_USB_XHCI=3Dn +CONFIG_USB_UAS=3Dn +CONFIG_SDCARD=3Dn +CONFIG_TCGBIOS=3Dn +CONFIG_MPT_SCSI=3Dn 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=3Dy +CONFIG_ROM_SIZE=3D256 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=3Dy +CONFIG_VGA_CIRRUS=3Dy +CONFIG_VGA_PCI=3Dy 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=3Dy +CONFIG_VGA_BOCHS=3Dy +CONFIG_VGA_PCI=3Dn 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=3Dy +CONFIG_VGA_BOCHS=3Dy +CONFIG_VGA_PCI=3Dy +CONFIG_OVERRIDE_PCI_ID=3Dy +CONFIG_VGA_VID=3D0x1b36 +CONFIG_VGA_DID=3D0x0100 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=3Dy +CONFIG_VGA_BOCHS=3Dy +CONFIG_VGA_PCI=3Dy 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=3Dy +CONFIG_VGA_BOCHS=3Dy +CONFIG_VGA_PCI=3Dy +CONFIG_OVERRIDE_PCI_ID=3Dy +CONFIG_VGA_VID=3D0x1af4 +CONFIG_VGA_DID=3D0x1050 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=3Dy +CONFIG_VGA_BOCHS=3Dy +CONFIG_VGA_PCI=3Dy +CONFIG_OVERRIDE_PCI_ID=3Dy +CONFIG_VGA_VID=3D0x15ad +CONFIG_VGA_DID=3D0x0405 --=20 2.9.3