qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 12/17] configure: move install_blobs from configure to meson
Date: Mon, 26 Oct 2020 09:51:26 -0400	[thread overview]
Message-ID: <20201026135131.3006712-13-pbonzini@redhat.com> (raw)
In-Reply-To: <20201026135131.3006712-1-pbonzini@redhat.com>

Move the conditions under which edk2 blobs are decompressed
and installed to pc-bios/meson.build.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure                       | 26 +++-----------------------
 meson.build                     |  2 +-
 meson_options.txt               |  2 ++
 pc-bios/descriptors/meson.build |  2 +-
 pc-bios/meson.build             | 13 +++++++------
 5 files changed, 14 insertions(+), 31 deletions(-)

diff --git a/configure b/configure
index 6bd2cafb33..55e07c82dd 100755
--- a/configure
+++ b/configure
@@ -362,8 +362,7 @@ cocoa="auto"
 softmmu="yes"
 linux_user="no"
 bsd_user="no"
-blobs="yes"
-edk2_blobs="no"
+blobs="true"
 pkgversion=""
 pie=""
 qom_cast_debug="yes"
@@ -1205,7 +1204,7 @@ for opt do
   ;;
   --enable-membarrier) membarrier="yes"
   ;;
-  --disable-blobs) blobs="no"
+  --disable-blobs) blobs="false"
   ;;
   --with-pkgversion=*) pkgversion="$optarg"
   ;;
@@ -2221,18 +2220,6 @@ case " $target_list " in
   ;;
 esac
 
-for target in $target_list; do
-  case "$target" in
-    arm-softmmu | aarch64-softmmu | i386-softmmu | x86_64-softmmu)
-      edk2_blobs="yes"
-      ;;
-  esac
-done
-# The EDK2 binaries are compressed with bzip2
-if test "$edk2_blobs" = "yes" && ! has bzip2; then
-  error_exit "The bzip2 program is required for building QEMU"
-fi
-
 feature_not_found() {
   feature=$1
   remedy=$2
@@ -6276,9 +6263,6 @@ fi
 if test "$vhost_user_fs" = "yes" ; then
   echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
 fi
-if test "$blobs" = "yes" ; then
-  echo "INSTALL_BLOBS=yes" >> $config_host_mak
-fi
 if test "$iovec" = "yes" ; then
   echo "CONFIG_IOVEC=y" >> $config_host_mak
 fi
@@ -6755,10 +6739,6 @@ if test "$fuzzing" != "no"; then
 fi
 echo "FUZZ_EXE_LDFLAGS=$FUZZ_EXE_LDFLAGS" >> $config_host_mak
 
-if test "$edk2_blobs" = "yes" ; then
-  echo "DECOMPRESS_EDK2_BLOBS=y" >> $config_host_mak
-fi
-
 if test "$rng_none" = "yes"; then
   echo "CONFIG_RNG_NONE=y" >> $config_host_mak
 fi
@@ -6995,7 +6975,7 @@ NINJA=$ninja $meson setup \
         -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \
         -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \
         -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
-        -Ddocs=$docs -Dsphinx_build=$sphinx_build \
+        -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
         $cross_arg \
         "$PWD" "$source_path"
 
diff --git a/meson.build b/meson.build
index 4b6cca9238..342b8bcab5 100644
--- a/meson.build
+++ b/meson.build
@@ -2052,7 +2052,7 @@ summary_info += {'netmap support':    config_host.has_key('CONFIG_NETMAP')}
 summary_info += {'Linux AIO support': config_host.has_key('CONFIG_LINUX_AIO')}
 summary_info += {'Linux io_uring support': config_host.has_key('CONFIG_LINUX_IO_URING')}
 summary_info += {'ATTR/XATTR support': config_host.has_key('CONFIG_ATTR')}
-summary_info += {'Install blobs':     config_host.has_key('INSTALL_BLOBS')}
+summary_info += {'Install blobs':     get_option('install_blobs')}
 summary_info += {'KVM support':       config_all.has_key('CONFIG_KVM')}
 summary_info += {'HAX support':       config_all.has_key('CONFIG_HAX')}
 summary_info += {'HVF support':       config_all.has_key('CONFIG_HVF')}
diff --git a/meson_options.txt b/meson_options.txt
index 02b446013a..48ab4ce7d0 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -11,6 +11,8 @@ option('docs', type : 'feature', value : 'auto',
        description: 'Documentations build support')
 option('gettext', type : 'boolean', value : true,
        description: 'Localization of the GTK+ user interface')
+option('install_blobs', type : 'boolean', value : true,
+       description: 'install provided firmware blobs')
 option('sparse', type : 'feature', value : 'auto',
        description: 'sparse checker')
 
diff --git a/pc-bios/descriptors/meson.build b/pc-bios/descriptors/meson.build
index a200e5ebc3..7040834573 100644
--- a/pc-bios/descriptors/meson.build
+++ b/pc-bios/descriptors/meson.build
@@ -9,6 +9,6 @@ foreach f: [
   configure_file(input: files(f),
                  output: f,
                  configuration: {'DATADIR': qemu_datadir},
-                 install: install_blobs,
+                 install: get_option('install_blobs'),
                  install_dir: qemu_datadir / 'firmware')
 endforeach
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 03df50c485..fab323af84 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -1,7 +1,8 @@
-bzip2 = find_program('bzip2')
-
-install_blobs = 'INSTALL_BLOBS' in config_host
-if 'DECOMPRESS_EDK2_BLOBS' in config_host
+if 'arm-softmmu' in target_dirs or \
+    'aarch64-softmmu' in target_dirs or \
+    'i386-softmmu' in target_dirs or \
+    'x86_64-softmmu' in target_dirs
+  bzip2 = find_program('bzip2', required: true)
   fds = [
     'edk2-aarch64-code.fd',
     'edk2-arm-code.fd',
@@ -18,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host
                   output: f,
                   input: '@0@.bz2'.format(f),
                   capture: true,
-                  install: install_blobs,
+                  install: get_option('install_blobs'),
                   install_dir: qemu_datadir,
                   command: [ bzip2, '-dc', '@INPUT0@' ])
   endforeach
@@ -85,7 +86,7 @@ blobs = files(
   'npcm7xx_bootrom.bin',
 )
 
-if install_blobs
+if get_option('install_blobs')
   install_data(blobs, install_dir: qemu_datadir)
 endif
 
-- 
2.26.2




  parent reply	other threads:[~2020-10-26 14:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-26 13:51 [PULL 00/17] Build system changes and misc fixes for QEMU 5.2 soft freeze Paolo Bonzini
2020-10-26 13:51 ` [PULL 01/17] build: fix macOS --enable-modules build Paolo Bonzini
2020-10-27  9:27   ` Philippe Mathieu-Daudé
2020-10-27 13:27     ` Paolo Bonzini
2020-10-27 15:21       ` Gerd Hoffmann
2020-10-27 15:33         ` Gerd Hoffmann
2020-10-26 13:51 ` [PULL 02/17] meson: rewrite curses/iconv test Paolo Bonzini
2020-10-26 13:51 ` [PULL 03/17] do not use colons in test names Paolo Bonzini
2020-10-26 13:51 ` [PULL 04/17] hw/core/qdev-clock: add a reference on aliased clocks Paolo Bonzini
2020-10-26 13:51 ` [PULL 05/17] qtest: unbreak non-TCG builds in bios-tables-test Paolo Bonzini
2020-10-26 13:51 ` [PULL 06/17] replay: do not build if TCG is not available Paolo Bonzini
2020-10-26 13:51 ` [PULL 07/17] Remove deprecated -no-kvm option Paolo Bonzini
2020-10-26 13:51 ` [PULL 08/17] Makefile: separate meson rerun from the rest of the ninja invocation Paolo Bonzini
2020-10-26 13:51 ` [PULL 09/17] configure: allow configuring localedir Paolo Bonzini
2020-10-26 13:51 ` [PULL 10/17] configure: move directory options from config-host.mak to meson Paolo Bonzini
2020-10-26 13:51 ` [PULL 11/17] configure: remove unused variable from config-host.mak Paolo Bonzini
2020-10-26 13:51 ` Paolo Bonzini [this message]
2020-10-26 13:51 ` [PULL 13/17] WHPX: Fix WHPX build break Paolo Bonzini
2020-10-26 13:51 ` [PULL 14/17] win32: boot broken when bind & data dir are the same Paolo Bonzini
2020-10-26 13:51 ` [PULL 15/17] machine: remove deprecated -machine enforce-config-section option Paolo Bonzini
2020-10-26 13:51 ` [PULL 16/17] machine: move UP defaults to class_base_init Paolo Bonzini
2020-10-26 13:51 ` [PULL 17/17] machine: move SMP initialization from vl.c Paolo Bonzini
2020-10-26 17:18 ` [PULL 00/17] Build system changes and misc fixes for QEMU 5.2 soft freeze Peter Maydell
2020-10-26 18:59   ` 罗勇刚(Yonggang Luo)
2020-10-26 20:58     ` Paolo Bonzini
2020-10-26 21:04       ` 罗勇刚(Yonggang Luo)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201026135131.3006712-13-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).