diff mbox series

[RFC,12/13] blobs: Only install x86 blobs if x86 system targets are built

Message ID 20210323155132.238193-13-f4bug@amsat.org (mailing list archive)
State New, archived
Headers show
Series blobs: Only install required (system emulation) files | expand

Commit Message

Philippe Mathieu-Daudé March 23, 2021, 3:51 p.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
---
 meson.build         |  2 ++
 pc-bios/meson.build | 23 ++++++++++++++---------
 2 files changed, 16 insertions(+), 9 deletions(-)
diff mbox series

Patch

diff --git a/meson.build b/meson.build
index addea8c39d7..e484670c5b7 100644
--- a/meson.build
+++ b/meson.build
@@ -101,6 +101,7 @@ 
 install_blobs_riscv = false
 install_blobs_s390x = false
 install_blobs_sparc = false
+install_blobs_x86 = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -112,6 +113,7 @@ 
     install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
     install_blobs_s390x = install_blobs_s390x or target in ['s390x-softmmu']
     install_blobs_sparc = install_blobs_sparc or target in ['sparc-softmmu', 'sparc64-softmmu']
+    install_blobs_x86 = install_blobs_x86 or target in ['i386-softmmu', 'x86_64-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 89efe4359e4..d21187545cf 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -27,10 +27,6 @@ 
 endif
 
 blobs_ss.add(files(
-  'bios.bin',
-  'bios-256k.bin',
-  'bios-microvm.bin',
-  'qboot.rom',
   'sgabios.bin',
   'vgabios.bin',
   'vgabios-cirrus.bin',
@@ -57,11 +53,6 @@ 
   'efi-virtio.rom',
   'efi-e1000e.rom',
   'efi-vmxnet3.rom',
-  'multiboot.bin',
-  'linuxboot.bin',
-  'linuxboot_dma.bin',
-  'kvmvapic.bin',
-  'pvh.bin',
 ))
 
 if host_machine.system() == 'windows'
@@ -131,6 +122,20 @@ 
   ))
 endif
 
+if install_blobs_x86
+  blobs_ss.add(files(
+    'bios.bin',
+    'bios-256k.bin',
+    'bios-microvm.bin',
+    'qboot.rom',
+    'multiboot.bin',
+    'linuxboot.bin',
+    'linuxboot_dma.bin',
+    'kvmvapic.bin',
+    'pvh.bin',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')