configure: move install_blobs from configure to meson

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

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2020-10-16 03:32:52 -04:00
parent b37f357abf
commit c8d5450bba
5 changed files with 14 additions and 31 deletions

26
configure vendored
View File

@ -362,8 +362,7 @@ cocoa="auto"
softmmu="yes" softmmu="yes"
linux_user="no" linux_user="no"
bsd_user="no" bsd_user="no"
blobs="yes" blobs="true"
edk2_blobs="no"
pkgversion="" pkgversion=""
pie="" pie=""
qom_cast_debug="yes" qom_cast_debug="yes"
@ -1205,7 +1204,7 @@ for opt do
;; ;;
--enable-membarrier) membarrier="yes" --enable-membarrier) membarrier="yes"
;; ;;
--disable-blobs) blobs="no" --disable-blobs) blobs="false"
;; ;;
--with-pkgversion=*) pkgversion="$optarg" --with-pkgversion=*) pkgversion="$optarg"
;; ;;
@ -2221,18 +2220,6 @@ case " $target_list " in
;; ;;
esac 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_not_found() {
feature=$1 feature=$1
remedy=$2 remedy=$2
@ -6276,9 +6263,6 @@ fi
if test "$vhost_user_fs" = "yes" ; then if test "$vhost_user_fs" = "yes" ; then
echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak echo "CONFIG_VHOST_USER_FS=y" >> $config_host_mak
fi fi
if test "$blobs" = "yes" ; then
echo "INSTALL_BLOBS=yes" >> $config_host_mak
fi
if test "$iovec" = "yes" ; then if test "$iovec" = "yes" ; then
echo "CONFIG_IOVEC=y" >> $config_host_mak echo "CONFIG_IOVEC=y" >> $config_host_mak
fi fi
@ -6755,10 +6739,6 @@ if test "$fuzzing" != "no"; then
fi fi
echo "FUZZ_EXE_LDFLAGS=$FUZZ_EXE_LDFLAGS" >> $config_host_mak 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 if test "$rng_none" = "yes"; then
echo "CONFIG_RNG_NONE=y" >> $config_host_mak echo "CONFIG_RNG_NONE=y" >> $config_host_mak
fi fi
@ -6995,7 +6975,7 @@ NINJA=$ninja $meson setup \
-Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \ -Dgettext=$gettext -Dxkbcommon=$xkbcommon -Du2f=$u2f \
-Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \ -Dcapstone=$capstone -Dslirp=$slirp -Dfdt=$fdt \
-Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\ -Diconv=$iconv -Dcurses=$curses -Dlibudev=$libudev\
-Ddocs=$docs -Dsphinx_build=$sphinx_build \ -Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
$cross_arg \ $cross_arg \
"$PWD" "$source_path" "$PWD" "$source_path"

View File

@ -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 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 += {'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 += {'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 += {'KVM support': config_all.has_key('CONFIG_KVM')}
summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')} summary_info += {'HAX support': config_all.has_key('CONFIG_HAX')}
summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')} summary_info += {'HVF support': config_all.has_key('CONFIG_HVF')}

View File

@ -11,6 +11,8 @@ option('docs', type : 'feature', value : 'auto',
description: 'Documentations build support') description: 'Documentations build support')
option('gettext', type : 'boolean', value : true, option('gettext', type : 'boolean', value : true,
description: 'Localization of the GTK+ user interface') 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', option('sparse', type : 'feature', value : 'auto',
description: 'sparse checker') description: 'sparse checker')

View File

@ -9,6 +9,6 @@ foreach f: [
configure_file(input: files(f), configure_file(input: files(f),
output: f, output: f,
configuration: {'DATADIR': qemu_datadir}, configuration: {'DATADIR': qemu_datadir},
install: install_blobs, install: get_option('install_blobs'),
install_dir: qemu_datadir / 'firmware') install_dir: qemu_datadir / 'firmware')
endforeach endforeach

View File

@ -1,7 +1,8 @@
bzip2 = find_program('bzip2') if 'arm-softmmu' in target_dirs or \
'aarch64-softmmu' in target_dirs or \
install_blobs = 'INSTALL_BLOBS' in config_host 'i386-softmmu' in target_dirs or \
if 'DECOMPRESS_EDK2_BLOBS' in config_host 'x86_64-softmmu' in target_dirs
bzip2 = find_program('bzip2', required: true)
fds = [ fds = [
'edk2-aarch64-code.fd', 'edk2-aarch64-code.fd',
'edk2-arm-code.fd', 'edk2-arm-code.fd',
@ -18,7 +19,7 @@ if 'DECOMPRESS_EDK2_BLOBS' in config_host
output: f, output: f,
input: '@0@.bz2'.format(f), input: '@0@.bz2'.format(f),
capture: true, capture: true,
install: install_blobs, install: get_option('install_blobs'),
install_dir: qemu_datadir, install_dir: qemu_datadir,
command: [ bzip2, '-dc', '@INPUT0@' ]) command: [ bzip2, '-dc', '@INPUT0@' ])
endforeach endforeach
@ -85,7 +86,7 @@ blobs = files(
'npcm7xx_bootrom.bin', 'npcm7xx_bootrom.bin',
) )
if install_blobs if get_option('install_blobs')
install_data(blobs, install_dir: qemu_datadir) install_data(blobs, install_dir: qemu_datadir)
endif endif