From nobody Mon Feb 9 20:34:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.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 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1556040251; cv=none; d=zoho.com; s=zohoarc; b=c2h7FttQxgV71LR3u9Yt8E+VTwizFKIQhVZchnbInE8Z60vRFcK1c36+HE+r+JxC662nze/r1J5x1ojn4Hva8tQQjwuJt9WISMFzvVUk0U1OOkIrdpl9AYDSZgqj3Ji0yhvKO1U+/5nhrfB/49gdzqWwVkCes8JgJVb4FFczaWI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556040251; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=NqPxV1WE4Mx/m6klp6Gi40cYnIu7GzivctUXmVJ2TCo=; b=WwgAbP3qULOFfdMnYgsNiN6Z3UC/zc96T9yiV07TTSJbfgtz//nopwUGExjqms63CFMt3LIG6UlvgDj5QnfM4WsSTEhzu7ZjliphIhKPOQJuQBWlMbuo6tIkezNqxNSMPTr2zZyOqw9JC7JZ22mqWGlm83DYCxkMGHkrx0kVlK8= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1556040251405119.26603409966378; Tue, 23 Apr 2019 10:24:11 -0700 (PDT) Received: from localhost ([127.0.0.1]:57072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIz9G-0002ZH-Aj for importer@patchew.org; Tue, 23 Apr 2019 13:24:02 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hIz2U-0005mM-Tr for qemu-devel@nongnu.org; Tue, 23 Apr 2019 13:17:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hIz2T-0006Qm-71 for qemu-devel@nongnu.org; Tue, 23 Apr 2019 13:17:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37126) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hIz2S-0006M1-TB for qemu-devel@nongnu.org; Tue, 23 Apr 2019 13:17:01 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EA6CD300272A; Tue, 23 Apr 2019 17:16:50 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-125-214.rdu2.redhat.com [10.10.125.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id 130F019729; Tue, 23 Apr 2019 17:16:43 +0000 (UTC) From: Laszlo Ersek To: berrange@redhat.com, eblake@redhat.com, f4bug@amsat.org, imammedo@redhat.com, kraxel@redhat.com, mprivozn@redhat.com, mst@redhat.com, peter.maydell@linaro.org, philmd@redhat.com, qemu-devel@nongnu.org Date: Tue, 23 Apr 2019 19:15:19 +0200 Message-Id: <20190423171520.4511-12-lersek@redhat.com> In-Reply-To: <20190423171520.4511-1-lersek@redhat.com> References: <20190423171520.4511-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 23 Apr 2019 17:16:51 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 11/12] Makefile: install the edk2 firmware images and their descriptors 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: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Decompress and install the edk2 firmware blobs as part of "make install", unless blob installation was disabled with configure's "--disable-blobs" option. Additionally, decompress the blobs as a pre-requisite for building softmmu binaries -- this is helpful for both "make check" and other ad-hoc tests one might want to run in the build directory. Signed-off-by: Laszlo Ersek Reviewed-by: Michal Privoznik Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Michael S. Tsirkin Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Igor Mammedov --- Notes: pull: =20 - pick up Phil's T-b =20 - pick up Igor's R-b =20 v4: =20 - no change =20 v3: =20 - pick up Michal's R-b =20 - pick up Phil's R-b =20 - pick up Michael's R-b =20 - Decompress fd.bz2 files with bzip2 rather than fd.xz files with xz, so that decompression at "make install" time succeed on older build OSes too [Peter]. Note that "BUNZIP2" matches the name of the actual command "bunzip2" (i.e. it is sensible), and that it consists of 7 characters, satisfying the quiet-command limit. =20 - do not pick up Phil's T-b, consequently =20 - do not pick up Igor's T-b for the same reason =20 v2: =20 - adapt to tracking the edk2 flash device files in compressed form [Dan, Michael, Phil] =20 - do not pick up Michal's and Michael's R-b's due to the above change configure | 1 + Makefile | 29 +++++++++++++++++++- .gitignore | 1 + 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 1c563a70276a..e1ad87b697e0 100755 --- a/configure +++ b/configure @@ -7892,6 +7892,7 @@ for bios_file in \ $source_path/pc-bios/*.img \ $source_path/pc-bios/openbios-* \ $source_path/pc-bios/u-boot.* \ + $source_path/pc-bios/edk2-*.fd.bz2 \ $source_path/pc-bios/palcode-* do LINKS=3D"$LINKS pc-bios/$(basename $bios_file)" diff --git a/Makefile b/Makefile index 04a0d4505085..626a04d305cc 100644 --- a/Makefile +++ b/Makefile @@ -296,6 +296,10 @@ ui/input-keymap-%.c: $(KEYCODEMAP_GEN) $(KEYCODEMAP_CS= V) $(SRC_PATH)/ui/Makefile $(KEYCODEMAP_GEN): .git-submodule-status $(KEYCODEMAP_CSV): .git-submodule-status =20 +edk2-decompressed =3D $(basename $(wildcard pc-bios/edk2-*.fd.bz2)) +pc-bios/edk2-%.fd: pc-bios/edk2-%.fd.bz2 + $(call quiet-command,bzip2 -d -c $< > $@,"BUNZIP2",$<) + # Don't try to regenerate Makefile or configure # We don't generate any of them Makefile: ; @@ -445,6 +449,7 @@ $(SOFTMMU_SUBDIR_RULES): $(block-obj-y) $(SOFTMMU_SUBDIR_RULES): $(crypto-obj-y) $(SOFTMMU_SUBDIR_RULES): $(io-obj-y) $(SOFTMMU_SUBDIR_RULES): config-all-devices.mak +$(SOFTMMU_SUBDIR_RULES): $(edk2-decompressed) =20 subdir-%: $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $* V=3D"$(V)" TARGET_= DIR=3D"$*/" all,) @@ -633,6 +638,7 @@ clean: ! -path ./roms/edk2/ArmPkg/Library/GccLto/liblto-arm.a \ ! -path ./roms/edk2/BaseTools/Source/Python/UPT/Dll/sqlite3.dll \ -exec rm {} + + rm -f $(edk2-decompressed) rm -f $(filter-out %.tlb,$(TOOLS)) $(HELPERS-y) qemu-ga TAGS cscope.* *.p= od *~ */*~ rm -f fsdev/*.pod scsi/*.pod rm -f qemu-img-cmds.h @@ -723,9 +729,14 @@ spapr-rtas.bin slof.bin skiboot.lid \ palcode-clipper \ u-boot.e500 u-boot-sam460-20100605.bin \ qemu_vga.ndrv \ +edk2-licenses.txt \ hppa-firmware.img + +DESCS=3D50-edk2-i386-secure.json 50-edk2-x86_64-secure.json \ +60-edk2-aarch64.json 60-edk2-arm.json 60-edk2-i386.json 60-edk2-x86_64.json else BLOBS=3D +DESCS=3D endif =20 # Note that we manually filter-out the non-Sphinx documentation which @@ -786,7 +797,8 @@ endif =20 ICON_SIZES=3D16x16 24x24 32x32 48x48 64x64 128x128 256x256 512x512 =20 -install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-local= statedir +install: all $(if $(BUILD_DOCS),install-doc) install-datadir install-local= statedir \ + $(if $(INSTALL_BLOBS),$(edk2-decompressed)) ifneq ($(TOOLS),) $(call install-prog,$(subst qemu-ga,qemu-ga$(EXESUF),$(TOOLS)),$(DESTDIR)= $(bindir)) endif @@ -808,6 +820,21 @@ ifneq ($(BLOBS),) set -e; for x in $(BLOBS); do \ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \ done +endif +ifdef INSTALL_BLOBS + set -e; for x in $(edk2-decompressed); do \ + $(INSTALL_DATA) $$x "$(DESTDIR)$(qemu_datadir)"; \ + done +endif +ifneq ($(DESCS),) + $(INSTALL_DIR) "$(DESTDIR)$(qemu_datadir)/firmware" + set -e; tmpf=3D$$(mktemp); trap 'rm -f -- "$$tmpf"' EXIT; \ + for x in $(DESCS); do \ + sed -e 's,@DATADIR@,$(DESTDIR)$(qemu_datadir),' \ + "$(SRC_PATH)/pc-bios/descriptors/$$x" > "$$tmpf"; \ + $(INSTALL_DATA) "$$tmpf" \ + "$(DESTDIR)$(qemu_datadir)/firmware/$$x"; \ + done endif for s in $(ICON_SIZES); do \ mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps"; \ diff --git a/.gitignore b/.gitignore index 8f782218044e..fd6e6c38c7b9 100644 --- a/.gitignore +++ b/.gitignore @@ -97,6 +97,7 @@ *.gcno *.gcov /pc-bios/bios-pq/status +/pc-bios/edk2-*.fd /pc-bios/vgabios-pq/status /pc-bios/optionrom/linuxboot.asm /pc-bios/optionrom/linuxboot.bin --=20 2.19.1.3.g30247aa5d201