meson: unpack edk2 firmware even if --disable-blobs

The edk2 firmware blobs are needed to run bios-tables-test.  Unpack
them if any UEFI-enabled target is selected, so that the test can run.
This is a bit more than is actually necessary, since bios-tables-test
does not run for all UEFI-enabled targets, but it is the easiest
way to write this logic.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210923105529.3845741-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2021-09-23 06:55:28 -04:00
parent 0205c4fa1e
commit e49c0ef6f1
3 changed files with 11 additions and 11 deletions

View File

@ -106,14 +106,14 @@ if targetos != 'darwin'
endif endif
edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ] edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
install_edk2_blobs = false unpack_edk2_blobs = false
if get_option('install_blobs') foreach target : edk2_targets
foreach target : target_dirs if target in target_dirs
install_edk2_blobs = install_edk2_blobs or target in edk2_targets bzip2 = find_program('bzip2', required: get_option('install_blobs'))
endforeach unpack_edk2_blobs = bzip2.found()
endif break
endif
bzip2 = find_program('bzip2', required: install_edk2_blobs) endforeach
################## ##################
# Compiler flags # # Compiler flags #

View File

@ -1,4 +1,4 @@
if install_edk2_blobs if unpack_edk2_blobs and get_option('install_blobs')
foreach f: [ foreach f: [
'50-edk2-i386-secure.json', '50-edk2-i386-secure.json',
'50-edk2-x86_64-secure.json', '50-edk2-x86_64-secure.json',
@ -10,7 +10,7 @@ if install_edk2_blobs
configure_file(input: files(f), configure_file(input: files(f),
output: f, output: f,
configuration: {'DATADIR': get_option('prefix') / qemu_datadir}, configuration: {'DATADIR': get_option('prefix') / qemu_datadir},
install: get_option('install_blobs'), install: true,
install_dir: qemu_datadir / 'firmware') install_dir: qemu_datadir / 'firmware')
endforeach endforeach
endif endif

View File

@ -1,4 +1,4 @@
if install_edk2_blobs if unpack_edk2_blobs
fds = [ fds = [
'edk2-aarch64-code.fd', 'edk2-aarch64-code.fd',
'edk2-arm-code.fd', 'edk2-arm-code.fd',