qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 00/13] blobs: Only install required (system emulation) files
@ 2021-03-23 15:51 Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
                   ` (12 more replies)
  0 siblings, 13 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé

When building a subset of targets, we don't need to install
a bunch of unrelated files. This series restrict the installed
blobs to what is simply required.
Combined with Paolo's series converting pc-bios/Makefile to
Meson, this should reduce the (CI) build cycles some more.

RFC because there is probably a nicer way to do this with Meson.

Philippe Mathieu-Daudé (13):
  blobs: Use Meson source_set to store blob files
  blobs: Only install EDK2 license file if EDK2 blobs are installed
  blobs: Only install qemu-nsis.bmp on Windows host
  blobs: Only install PALcode blob if alpha system target is built
  blobs: Only install npcm7xx bootrom if ARM system targets are built
  blobs: Only install PA-RISC SeaBIOS if hppa system target is built
  blobs: Only install DT blobs if microblaze system targets are built
  blobs: Only install blobs if powerpc system targets are built
  blobs: Only install firmware blobs if riscv system targets are built
  blobs: Only install s390x firmwares if s390x system target is built
  blobs: Only install SPARC firmwares if sparc system targets are built
  blobs: Only install x86 blobs if x86 system targets are built
  meson: Only build ROM/BIOS when system emulation is built

 meson.build         |  22 +++++++-
 pc-bios/meson.build | 125 +++++++++++++++++++++++++++++++-------------
 2 files changed, 111 insertions(+), 36 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 25+ messages in thread

* [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 16:22   ` Paolo Bonzini
  2021-03-23 15:51 ` [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed Philippe Mathieu-Daudé
                   ` (11 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé

As we want to conditionally install blob files,
declare them using a source set.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 pc-bios/meson.build | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index f2b32598af7..1c4074bcb0d 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -1,3 +1,5 @@
+blobs_ss = ss.source_set()
+
 if install_edk2_blobs
   fds = [
     'edk2-aarch64-code.fd',
@@ -22,7 +24,7 @@
   endforeach
 endif
 
-blobs = files(
+blobs_ss.add(files(
   'bios.bin',
   'bios-256k.bin',
   'bios-microvm.bin',
@@ -81,10 +83,12 @@
   'opensbi-riscv32-generic-fw_dynamic.elf',
   'opensbi-riscv64-generic-fw_dynamic.elf',
   'npcm7xx_bootrom.bin',
-)
+))
+
+blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-  install_data(blobs, install_dir: qemu_datadir)
+  install_data(blobs_ss.sources(), install_dir: qemu_datadir)
 endif
 
 subdir('descriptors')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 16:15   ` Laszlo Ersek
  2021-03-23 15:51 ` [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host Philippe Mathieu-Daudé
                   ` (10 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Laszlo Ersek,
	Philippe Mathieu-Daudé, Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Laszlo Ersek <lersek@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 pc-bios/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 1c4074bcb0d..d270d8516c9 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -22,6 +22,8 @@
                   install_dir: qemu_datadir,
                   command: [ bzip2, '-dc', '@INPUT0@' ])
   endforeach
+
+  blobs_ss.add(files('edk2-licenses.txt'))
 endif
 
 blobs_ss.add(files(
@@ -76,7 +78,6 @@
   'u-boot.e500',
   'u-boot-sam460-20100605.bin',
   'qemu_vga.ndrv',
-  'edk2-licenses.txt',
   'hppa-firmware.img',
   'opensbi-riscv32-generic-fw_dynamic.bin',
   'opensbi-riscv64-generic-fw_dynamic.bin',
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 15:57   ` Stefan Weil
  2021-03-23 15:51 ` [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built Philippe Mathieu-Daudé
                   ` (9 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé, Stefan Weil

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Stefan Weil <sw@weilnetz.de>
---
 pc-bios/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index d270d8516c9..007cf9d2afb 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -60,7 +60,6 @@
   'efi-virtio.rom',
   'efi-e1000e.rom',
   'efi-vmxnet3.rom',
-  'qemu-nsis.bmp',
   'bamboo.dtb',
   'canyonlands.dtb',
   'petalogix-s3adsp1800.dtb',
@@ -86,6 +85,12 @@
   'npcm7xx_bootrom.bin',
 ))
 
+if host_machine.system() == 'windows'
+  blobs_ss.add(files(
+    'qemu-nsis.bmp',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 16:29   ` Paolo Bonzini
  2021-03-23 15:51 ` [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built Philippe Mathieu-Daudé
                   ` (8 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Richard Henderson,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Richard Henderson <richard.henderson@linaro.org>
---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 5c85a15364d..b5b8892fe7a 100644
--- a/meson.build
+++ b/meson.build
@@ -93,9 +93,11 @@
 
 edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
 install_edk2_blobs = false
+install_blobs_alpha = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
+    install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 007cf9d2afb..29085912d7d 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -73,7 +73,6 @@
   's390-netboot.img',
   'slof.bin',
   'skiboot.lid',
-  'palcode-clipper',
   'u-boot.e500',
   'u-boot-sam460-20100605.bin',
   'qemu_vga.ndrv',
@@ -91,6 +90,12 @@
   ))
 endif
 
+if install_blobs_alpha
+  blobs_ss.add(files(
+    'palcode-clipper',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (3 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 16:29   ` Paolo Bonzini
  2021-03-23 15:51 ` [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built Philippe Mathieu-Daudé
                   ` (7 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Philippe Mathieu-Daudé,
	Havard Skinnemoen, Tyrone Ting, qemu-arm, Paolo Bonzini

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Havard Skinnemoen <hskinnemoen@google.com>
Cc: Tyrone Ting <kfting@nuvoton.com>
Cc: qemu-arm@nongnu.org
---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index b5b8892fe7a..10c21ef52af 100644
--- a/meson.build
+++ b/meson.build
@@ -94,10 +94,12 @@
 edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
 install_edk2_blobs = false
 install_blobs_alpha = false
+install_blobs_arm = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
     install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
+    install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 29085912d7d..635485931b9 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -81,7 +81,6 @@
   'opensbi-riscv64-generic-fw_dynamic.bin',
   'opensbi-riscv32-generic-fw_dynamic.elf',
   'opensbi-riscv64-generic-fw_dynamic.elf',
-  'npcm7xx_bootrom.bin',
 ))
 
 if host_machine.system() == 'windows'
@@ -96,6 +95,12 @@
   ))
 endif
 
+if install_blobs_arm
+  blobs_ss.add(files(
+    'npcm7xx_bootrom.bin',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (4 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 23:09   ` Helge Deller
  2021-03-23 15:51 ` [RFC PATCH 07/13] blobs: Only install DT blobs if microblaze system targets are built Philippe Mathieu-Daudé
                   ` (6 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Richard Henderson,
	Philippe Mathieu-Daudé,
	Helge Deller

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Helge Deller <deller@gmx.de>
---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 10c21ef52af..a7f3b60d08e 100644
--- a/meson.build
+++ b/meson.build
@@ -95,11 +95,13 @@
 install_edk2_blobs = false
 install_blobs_alpha = false
 install_blobs_arm = false
+install_blobs_hppa = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
     install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
     install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
+    install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 635485931b9..c494c334e26 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -76,7 +76,6 @@
   'u-boot.e500',
   'u-boot-sam460-20100605.bin',
   'qemu_vga.ndrv',
-  'hppa-firmware.img',
   'opensbi-riscv32-generic-fw_dynamic.bin',
   'opensbi-riscv64-generic-fw_dynamic.bin',
   'opensbi-riscv32-generic-fw_dynamic.elf',
@@ -101,6 +100,12 @@
   ))
 endif
 
+if install_blobs_hppa
+  blobs_ss.add(files(
+    'hppa-firmware.img',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 07/13] blobs: Only install DT blobs if microblaze system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (5 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 08/13] blobs: Only install blobs if powerpc " Philippe Mathieu-Daudé
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé,
	Edgar E . Iglesias

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index a7f3b60d08e..e3418815b04 100644
--- a/meson.build
+++ b/meson.build
@@ -96,12 +96,14 @@
 install_blobs_alpha = false
 install_blobs_arm = false
 install_blobs_hppa = false
+install_blobs_microblaze = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
     install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
     install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
     install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
+    install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index c494c334e26..a6185feff58 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -62,8 +62,6 @@
   'efi-vmxnet3.rom',
   'bamboo.dtb',
   'canyonlands.dtb',
-  'petalogix-s3adsp1800.dtb',
-  'petalogix-ml605.dtb',
   'multiboot.bin',
   'linuxboot.bin',
   'linuxboot_dma.bin',
@@ -106,6 +104,13 @@
   ))
 endif
 
+if install_blobs_microblaze
+  blobs_ss.add(files(
+    'petalogix-s3adsp1800.dtb',
+    'petalogix-ml605.dtb',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 08/13] blobs: Only install blobs if powerpc system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (6 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 07/13] blobs: Only install DT blobs if microblaze system targets are built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 23:09   ` David Gibson
  2021-03-23 15:51 ` [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv " Philippe Mathieu-Daudé
                   ` (4 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Mark Cave-Ayland, Greg Kurz,
	Philippe Mathieu-Daudé,
	Hervé Poussineau, qemu-ppc, Cédric Le Goater,
	Paolo Bonzini, David Gibson

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: David Gibson <david@gibson.dropbear.id.au>
Cc: Greg Kurz <groug@kaod.org>
Cc: qemu-ppc@nongnu.org
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Hervé Poussineau <hpoussin@reactos.org>
Cc: Cédric Le Goater <clg@kaod.org>
Cc: BALATON Zoltan <balaton@eik.bme.hu>
---
 meson.build         |  2 ++
 pc-bios/meson.build | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/meson.build b/meson.build
index e3418815b04..6f5561c2212 100644
--- a/meson.build
+++ b/meson.build
@@ -97,6 +97,7 @@
 install_blobs_arm = false
 install_blobs_hppa = false
 install_blobs_microblaze = false
+install_blobs_ppc = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -104,6 +105,7 @@
     install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
     install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
     install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
+    install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a6185feff58..73d02a57628 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -43,7 +43,6 @@
   'vgabios-ati.bin',
   'openbios-sparc32',
   'openbios-sparc64',
-  'openbios-ppc',
   'QEMU,tcx.bin',
   'QEMU,cgthree.bin',
   'pxe-e1000.rom',
@@ -60,8 +59,6 @@
   'efi-virtio.rom',
   'efi-e1000e.rom',
   'efi-vmxnet3.rom',
-  'bamboo.dtb',
-  'canyonlands.dtb',
   'multiboot.bin',
   'linuxboot.bin',
   'linuxboot_dma.bin',
@@ -69,11 +66,6 @@
   'pvh.bin',
   's390-ccw.img',
   's390-netboot.img',
-  'slof.bin',
-  'skiboot.lid',
-  'u-boot.e500',
-  'u-boot-sam460-20100605.bin',
-  'qemu_vga.ndrv',
   'opensbi-riscv32-generic-fw_dynamic.bin',
   'opensbi-riscv64-generic-fw_dynamic.bin',
   'opensbi-riscv32-generic-fw_dynamic.elf',
@@ -111,6 +103,19 @@
   ))
 endif
 
+if install_blobs_ppc
+  blobs_ss.add(files(
+    'bamboo.dtb',
+    'canyonlands.dtb',
+    'openbios-ppc',
+    'qemu_vga.ndrv',
+    'slof.bin',
+    'skiboot.lid',
+    'u-boot.e500',
+    'u-boot-sam460-20100605.bin',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (7 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 08/13] blobs: Only install blobs if powerpc " Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 21:28   ` Alistair Francis
  2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
                   ` (3 subsequent siblings)
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, qemu-riscv, Sagar Karandikar, Bastian Koppelmann,
	Philippe Mathieu-Daudé,
	Palmer Dabbelt, Paolo Bonzini, Alistair Francis

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Palmer Dabbelt <palmer@dabbelt.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: qemu-riscv@nongnu.org
---
 meson.build         |  2 ++
 pc-bios/meson.build | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 6f5561c2212..4b614b30ed9 100644
--- a/meson.build
+++ b/meson.build
@@ -98,6 +98,7 @@
 install_blobs_hppa = false
 install_blobs_microblaze = false
 install_blobs_ppc = false
+install_blobs_riscv = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -106,6 +107,7 @@
     install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
     install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
     install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
+    install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 73d02a57628..504f03ec925 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -66,10 +66,6 @@
   'pvh.bin',
   's390-ccw.img',
   's390-netboot.img',
-  'opensbi-riscv32-generic-fw_dynamic.bin',
-  'opensbi-riscv64-generic-fw_dynamic.bin',
-  'opensbi-riscv32-generic-fw_dynamic.elf',
-  'opensbi-riscv64-generic-fw_dynamic.elf',
 ))
 
 if host_machine.system() == 'windows'
@@ -116,6 +112,15 @@
   ))
 endif
 
+if install_blobs_riscv
+  blobs_ss.add(files(
+    'opensbi-riscv32-generic-fw_dynamic.bin',
+    'opensbi-riscv64-generic-fw_dynamic.bin',
+    'opensbi-riscv32-generic-fw_dynamic.elf',
+    'opensbi-riscv64-generic-fw_dynamic.elf',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (8 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv " Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-24  5:52   ` Thomas Huth
  2021-03-30 16:47   ` Cornelia Huck
  2021-03-23 15:51 ` [RFC PATCH 11/13] blobs: Only install SPARC firmwares if sparc system targets are built Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  12 siblings, 2 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-s390x, Paolo Bonzini, Thomas Huth, Cornelia Huck,
	Philippe Mathieu-Daudé

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Cornelia Huck <cohuck@redhat.com>
Cc: Thomas Huth <thuth@redhat.com>
Cc: qemu-s390x@nongnu.org
---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index 4b614b30ed9..fccda30ffc7 100644
--- a/meson.build
+++ b/meson.build
@@ -99,6 +99,7 @@
 install_blobs_microblaze = false
 install_blobs_ppc = false
 install_blobs_riscv = false
+install_blobs_s390x = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -108,6 +109,7 @@
     install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
     install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
     install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
+    install_blobs_s390x = install_blobs_s390x or target in ['s390x-softmmu']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 504f03ec925..27c0f316dee 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -64,8 +64,6 @@
   'linuxboot_dma.bin',
   'kvmvapic.bin',
   'pvh.bin',
-  's390-ccw.img',
-  's390-netboot.img',
 ))
 
 if host_machine.system() == 'windows'
@@ -121,6 +119,13 @@
   ))
 endif
 
+if install_blobs_s390x
+  blobs_ss.add(files(
+    's390-ccw.img',
+    's390-netboot.img',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 11/13] blobs: Only install SPARC firmwares if sparc system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (9 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 12/13] blobs: Only install x86 blobs if x86 " Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built Philippe Mathieu-Daudé
  12 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Mark Cave-Ayland,
	Philippe Mathieu-Daudé,
	Artyom Tarasenko

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Cc: Artyom Tarasenko <atar4qemu@gmail.com>
---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/meson.build b/meson.build
index fccda30ffc7..addea8c39d7 100644
--- a/meson.build
+++ b/meson.build
@@ -100,6 +100,7 @@
 install_blobs_ppc = false
 install_blobs_riscv = false
 install_blobs_s390x = false
+install_blobs_sparc = false
 if get_option('install_blobs')
   foreach target : target_dirs
     install_edk2_blobs = install_edk2_blobs or target in edk2_targets
@@ -110,6 +111,7 @@
     install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
     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']
   endforeach
 endif
 
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 27c0f316dee..89efe4359e4 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -41,8 +41,6 @@
   'vgabios-ramfb.bin',
   'vgabios-bochs-display.bin',
   'vgabios-ati.bin',
-  'openbios-sparc32',
-  'openbios-sparc64',
   'QEMU,tcx.bin',
   'QEMU,cgthree.bin',
   'pxe-e1000.rom',
@@ -126,6 +124,13 @@
   ))
 endif
 
+if install_blobs_sparc
+  blobs_ss.add(files(
+    'openbios-sparc32',
+    'openbios-sparc64',
+  ))
+endif
+
 blobs_ss = blobs_ss.apply(config_host, strict: false)
 
 if get_option('install_blobs')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 12/13] blobs: Only install x86 blobs if x86 system targets are built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (10 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 11/13] blobs: Only install SPARC firmwares if sparc system targets are built Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 15:51 ` [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built Philippe Mathieu-Daudé
  12 siblings, 0 replies; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel
  Cc: Thomas Huth, Eduardo Habkost, Michael S . Tsirkin,
	Philippe Mathieu-Daudé,
	Paolo Bonzini

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 --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')
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built
  2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
                   ` (11 preceding siblings ...)
  2021-03-23 15:51 ` [RFC PATCH 12/13] blobs: Only install x86 blobs if x86 " Philippe Mathieu-Daudé
@ 2021-03-23 15:51 ` Philippe Mathieu-Daudé
  2021-03-23 16:15   ` Thomas Huth
  12 siblings, 1 reply; 25+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-03-23 15:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé

As it is pointless to build ROMs/BIOS for user-only emulation,
restrict this directory to system-mode emulation.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index e484670c5b7..457a07047b1 100644
--- a/meson.build
+++ b/meson.build
@@ -2378,7 +2378,9 @@
 
 subdir('scripts')
 subdir('tools')
-subdir('pc-bios')
+if have_system
+  subdir('pc-bios')
+endif
 subdir('docs')
 subdir('tests')
 if gtk.found()
-- 
2.26.2



^ permalink raw reply related	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host
  2021-03-23 15:51 ` [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host Philippe Mathieu-Daudé
@ 2021-03-23 15:57   ` Stefan Weil
  0 siblings, 0 replies; 25+ messages in thread
From: Stefan Weil @ 2021-03-23 15:57 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini, Thomas Huth


[-- Attachment #1.1.1: Type: text/plain, Size: 964 bytes --]

Am 23.03.21 um 16:51 schrieb Philippe Mathieu-Daudé:

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Stefan Weil <sw@weilnetz.de>
> ---
>   pc-bios/meson.build | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index d270d8516c9..007cf9d2afb 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -60,7 +60,6 @@
>     'efi-virtio.rom',
>     'efi-e1000e.rom',
>     'efi-vmxnet3.rom',
> -  'qemu-nsis.bmp',
>     'bamboo.dtb',
>     'canyonlands.dtb',
>     'petalogix-s3adsp1800.dtb',
> @@ -86,6 +85,12 @@
>     'npcm7xx_bootrom.bin',
>   ))
>   
> +if host_machine.system() == 'windows'
> +  blobs_ss.add(files(
> +    'qemu-nsis.bmp',
> +  ))
> +endif
> +
>   blobs_ss = blobs_ss.apply(config_host, strict: false)
>   
>   if get_option('install_blobs')


Thanks!

Reviewed-by: Stefan Weil <sw@weilnetz.de>



[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 15051 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed
  2021-03-23 15:51 ` [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed Philippe Mathieu-Daudé
@ 2021-03-23 16:15   ` Laszlo Ersek
  0 siblings, 0 replies; 25+ messages in thread
From: Laszlo Ersek @ 2021-03-23 16:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Philippe Mathieu-Daudé

On 03/23/21 16:51, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Laszlo Ersek <lersek@redhat.com>
> Cc: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  pc-bios/meson.build | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 1c4074bcb0d..d270d8516c9 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -22,6 +22,8 @@
>                    install_dir: qemu_datadir,
>                    command: [ bzip2, '-dc', '@INPUT0@' ])
>    endforeach
> +
> +  blobs_ss.add(files('edk2-licenses.txt'))
>  endif
>  
>  blobs_ss.add(files(
> @@ -76,7 +78,6 @@
>    'u-boot.e500',
>    'u-boot-sam460-20100605.bin',
>    'qemu_vga.ndrv',
> -  'edk2-licenses.txt',
>    'hppa-firmware.img',
>    'opensbi-riscv32-generic-fw_dynamic.bin',
>    'opensbi-riscv64-generic-fw_dynamic.bin',
> 

Acked-by: Laszlo Ersek <lersek@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built
  2021-03-23 15:51 ` [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built Philippe Mathieu-Daudé
@ 2021-03-23 16:15   ` Thomas Huth
  0 siblings, 0 replies; 25+ messages in thread
From: Thomas Huth @ 2021-03-23 16:15 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Paolo Bonzini

On 23/03/2021 16.51, Philippe Mathieu-Daudé wrote:
> As it is pointless to build ROMs/BIOS for user-only emulation,
> restrict this directory to system-mode emulation.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   meson.build | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index e484670c5b7..457a07047b1 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2378,7 +2378,9 @@
>   
>   subdir('scripts')
>   subdir('tools')
> -subdir('pc-bios')
> +if have_system
> +  subdir('pc-bios')
> +endif
>   subdir('docs')
>   subdir('tests')
>   if gtk.found()
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files
  2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
@ 2021-03-23 16:22   ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2021-03-23 16:22 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Thomas Huth

On 23/03/21 16:51, Philippe Mathieu-Daudé wrote:
> As we want to conditionally install blob files,
> declare them using a source set.
> 
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>   pc-bios/meson.build | 10 +++++++---
>   1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index f2b32598af7..1c4074bcb0d 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -1,3 +1,5 @@
> +blobs_ss = ss.source_set()
> +
>   if install_edk2_blobs
>     fds = [
>       'edk2-aarch64-code.fd',
> @@ -22,7 +24,7 @@
>     endforeach
>   endif
>   
> -blobs = files(
> +blobs_ss.add(files(
>     'bios.bin',
>     'bios-256k.bin',
>     'bios-microvm.bin',
> @@ -81,10 +83,12 @@
>     'opensbi-riscv32-generic-fw_dynamic.elf',
>     'opensbi-riscv64-generic-fw_dynamic.elf',
>     'npcm7xx_bootrom.bin',
> -)
> +))
> +
> +blobs_ss = blobs_ss.apply(config_host, strict: false)
>   
>   if get_option('install_blobs')
> -  install_data(blobs, install_dir: qemu_datadir)
> +  install_data(blobs_ss.sources(), install_dir: qemu_datadir)
>   endif
>   
>   subdir('descriptors')
> 

If you have no conditions, you can also use an array.

Paolo



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built
  2021-03-23 15:51 ` [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built Philippe Mathieu-Daudé
@ 2021-03-23 16:29   ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2021-03-23 16:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Thomas Huth, Richard Henderson

On 23/03/21 16:51, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Richard Henderson <richard.henderson@linaro.org>
> ---
>   meson.build         | 2 ++
>   pc-bios/meson.build | 7 ++++++-
>   2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/meson.build b/meson.build
> index 5c85a15364d..b5b8892fe7a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -93,9 +93,11 @@
>   
>   edk2_targets = [ 'arm-softmmu', 'aarch64-softmmu', 'i386-softmmu', 'x86_64-softmmu' ]
>   install_edk2_blobs = false
> +install_blobs_alpha = false
>   if get_option('install_blobs')
>     foreach target : target_dirs
>       install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> +    install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
What if you had something like

blob_targets = {
   ...,
   'palcode-clipper': ['alpha-softmmu'],
   'npcm7xx_bootrom.bin': ['arm-softmmu', 'aarch64-softmmu'],
   ...
}

and then

if get_option('install_blobs')
   foreach file, targets: blob_targets
     if file.endswith('.bz2') and not install_edk2_blobs
       continue
     endif
     foreach target : targets
       if (target in target_dirs)
         if file.endswith('.bz2')
           custom_target(...)
         elif install_edk2_blobs
           install_data(file, install_dir: qemu_datadir)
         endif
         break
       endif
     endforeach
   endforeach
endif

This simplifies the per-arch patches noticeably, since they only have to 
add a single line.

Paolo

>     endforeach
>   endif
>   
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 007cf9d2afb..29085912d7d 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -73,7 +73,6 @@
>     's390-netboot.img',
>     'slof.bin',
>     'skiboot.lid',
> -  'palcode-clipper',
>     'u-boot.e500',
>     'u-boot-sam460-20100605.bin',
>     'qemu_vga.ndrv',
> @@ -91,6 +90,12 @@
>     ))
>   endif
>   
> +if install_blobs_alpha
> +  blobs_ss.add(files(
> +    'palcode-clipper',
> +  ))
> +endif
> +
>   blobs_ss = blobs_ss.apply(config_host, strict: false)
>   
>   if get_option('install_blobs')
> 



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built
  2021-03-23 15:51 ` [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built Philippe Mathieu-Daudé
@ 2021-03-23 16:29   ` Paolo Bonzini
  0 siblings, 0 replies; 25+ messages in thread
From: Paolo Bonzini @ 2021-03-23 16:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Tyrone Ting, Thomas Huth, qemu-arm, Havard Skinnemoen

On 23/03/21 16:51, Philippe Mathieu-Daudé wrote:
>       install_edk2_blobs = install_edk2_blobs or target in edk2_targets
>       install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
> +    install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
>     endforeach

Typo (hppa instead of alpha).

Paolo



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv system targets are built
  2021-03-23 15:51 ` [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv " Philippe Mathieu-Daudé
@ 2021-03-23 21:28   ` Alistair Francis
  0 siblings, 0 replies; 25+ messages in thread
From: Alistair Francis @ 2021-03-23 21:28 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, open list:RISC-V, Sagar Karandikar,
	Bastian Koppelmann, qemu-devel@nongnu.org Developers,
	Palmer Dabbelt, Paolo Bonzini, Alistair Francis

On Tue, Mar 23, 2021 at 12:41 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
> Cc: Palmer Dabbelt <palmer@dabbelt.com>
> Cc: Alistair Francis <Alistair.Francis@wdc.com>
> Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
> Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
> Cc: qemu-riscv@nongnu.org
> ---
>  meson.build         |  2 ++
>  pc-bios/meson.build | 13 +++++++++----
>  2 files changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/meson.build b/meson.build
> index 6f5561c2212..4b614b30ed9 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -98,6 +98,7 @@
>  install_blobs_hppa = false
>  install_blobs_microblaze = false
>  install_blobs_ppc = false
> +install_blobs_riscv = false
>  if get_option('install_blobs')
>    foreach target : target_dirs
>      install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> @@ -106,6 +107,7 @@
>      install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
>      install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
>      install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
> +    install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
>    endforeach
>  endif
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 73d02a57628..504f03ec925 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -66,10 +66,6 @@
>    'pvh.bin',
>    's390-ccw.img',
>    's390-netboot.img',
> -  'opensbi-riscv32-generic-fw_dynamic.bin',
> -  'opensbi-riscv64-generic-fw_dynamic.bin',
> -  'opensbi-riscv32-generic-fw_dynamic.elf',
> -  'opensbi-riscv64-generic-fw_dynamic.elf',
>  ))
>
>  if host_machine.system() == 'windows'
> @@ -116,6 +112,15 @@
>    ))
>  endif
>
> +if install_blobs_riscv
> +  blobs_ss.add(files(
> +    'opensbi-riscv32-generic-fw_dynamic.bin',
> +    'opensbi-riscv64-generic-fw_dynamic.bin',
> +    'opensbi-riscv32-generic-fw_dynamic.elf',
> +    'opensbi-riscv64-generic-fw_dynamic.elf',
> +  ))
> +endif
> +
>  blobs_ss = blobs_ss.apply(config_host, strict: false)
>
>  if get_option('install_blobs')
> --
> 2.26.2
>
>


^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built
  2021-03-23 15:51 ` [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built Philippe Mathieu-Daudé
@ 2021-03-23 23:09   ` Helge Deller
  0 siblings, 0 replies; 25+ messages in thread
From: Helge Deller @ 2021-03-23 23:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Richard Henderson

On 3/23/21 4:51 PM, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Helge Deller <deller@gmx.de>

Acked-by: Helge Deller <deller@gmx.de>


> ---
>   meson.build         | 2 ++
>   pc-bios/meson.build | 7 ++++++-
>   2 files changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/meson.build b/meson.build
> index 10c21ef52af..a7f3b60d08e 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -95,11 +95,13 @@
>   install_edk2_blobs = false
>   install_blobs_alpha = false
>   install_blobs_arm = false
> +install_blobs_hppa = false
>   if get_option('install_blobs')
>     foreach target : target_dirs
>       install_edk2_blobs = install_edk2_blobs or target in edk2_targets
>       install_blobs_alpha = install_blobs_alpha or target in ['alpha-softmmu']
>       install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
> +    install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
>     endforeach
>   endif
>
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 635485931b9..c494c334e26 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -76,7 +76,6 @@
>     'u-boot.e500',
>     'u-boot-sam460-20100605.bin',
>     'qemu_vga.ndrv',
> -  'hppa-firmware.img',
>     'opensbi-riscv32-generic-fw_dynamic.bin',
>     'opensbi-riscv64-generic-fw_dynamic.bin',
>     'opensbi-riscv32-generic-fw_dynamic.elf',
> @@ -101,6 +100,12 @@
>     ))
>   endif
>
> +if install_blobs_hppa
> +  blobs_ss.add(files(
> +    'hppa-firmware.img',
> +  ))
> +endif
> +
>   blobs_ss = blobs_ss.apply(config_host, strict: false)
>
>   if get_option('install_blobs')
>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 08/13] blobs: Only install blobs if powerpc system targets are built
  2021-03-23 15:51 ` [RFC PATCH 08/13] blobs: Only install blobs if powerpc " Philippe Mathieu-Daudé
@ 2021-03-23 23:09   ` David Gibson
  0 siblings, 0 replies; 25+ messages in thread
From: David Gibson @ 2021-03-23 23:09 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Thomas Huth, Mark Cave-Ayland, qemu-devel, Greg Kurz, qemu-ppc,
	Cédric Le Goater, Paolo Bonzini, Hervé Poussineau

[-- Attachment #1: Type: text/plain, Size: 3043 bytes --]

On Tue, Mar 23, 2021 at 04:51:27PM +0100, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: David Gibson <david@gibson.dropbear.id.au>
> Cc: Greg Kurz <groug@kaod.org>
> Cc: qemu-ppc@nongnu.org
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Cc: Hervé Poussineau <hpoussin@reactos.org>
> Cc: Cédric Le Goater <clg@kaod.org>
> Cc: BALATON Zoltan <balaton@eik.bme.hu>
> ---
>  meson.build         |  2 ++
>  pc-bios/meson.build | 21 +++++++++++++--------
>  2 files changed, 15 insertions(+), 8 deletions(-)

Acked-by: David Gibson <david@gibson.dropbear.id.au>

> 
> diff --git a/meson.build b/meson.build
> index e3418815b04..6f5561c2212 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -97,6 +97,7 @@
>  install_blobs_arm = false
>  install_blobs_hppa = false
>  install_blobs_microblaze = false
> +install_blobs_ppc = false
>  if get_option('install_blobs')
>    foreach target : target_dirs
>      install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> @@ -104,6 +105,7 @@
>      install_blobs_arm = install_blobs_hppa or target in ['arm-softmmu', 'aarch64-softmmu']
>      install_blobs_hppa = install_blobs_hppa or target in ['hppa-softmmu']
>      install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
> +    install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
>    endforeach
>  endif
>  
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index a6185feff58..73d02a57628 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -43,7 +43,6 @@
>    'vgabios-ati.bin',
>    'openbios-sparc32',
>    'openbios-sparc64',
> -  'openbios-ppc',
>    'QEMU,tcx.bin',
>    'QEMU,cgthree.bin',
>    'pxe-e1000.rom',
> @@ -60,8 +59,6 @@
>    'efi-virtio.rom',
>    'efi-e1000e.rom',
>    'efi-vmxnet3.rom',
> -  'bamboo.dtb',
> -  'canyonlands.dtb',
>    'multiboot.bin',
>    'linuxboot.bin',
>    'linuxboot_dma.bin',
> @@ -69,11 +66,6 @@
>    'pvh.bin',
>    's390-ccw.img',
>    's390-netboot.img',
> -  'slof.bin',
> -  'skiboot.lid',
> -  'u-boot.e500',
> -  'u-boot-sam460-20100605.bin',
> -  'qemu_vga.ndrv',
>    'opensbi-riscv32-generic-fw_dynamic.bin',
>    'opensbi-riscv64-generic-fw_dynamic.bin',
>    'opensbi-riscv32-generic-fw_dynamic.elf',
> @@ -111,6 +103,19 @@
>    ))
>  endif
>  
> +if install_blobs_ppc
> +  blobs_ss.add(files(
> +    'bamboo.dtb',
> +    'canyonlands.dtb',
> +    'openbios-ppc',
> +    'qemu_vga.ndrv',
> +    'slof.bin',
> +    'skiboot.lid',
> +    'u-boot.e500',
> +    'u-boot-sam460-20100605.bin',
> +  ))
> +endif
> +
>  blobs_ss = blobs_ss.apply(config_host, strict: false)
>  
>  if get_option('install_blobs')

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built
  2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
@ 2021-03-24  5:52   ` Thomas Huth
  2021-03-30 16:47   ` Cornelia Huck
  1 sibling, 0 replies; 25+ messages in thread
From: Thomas Huth @ 2021-03-24  5:52 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Paolo Bonzini, qemu-s390x, Cornelia Huck

On 23/03/2021 16.51, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: qemu-s390x@nongnu.org
> ---
>   meson.build         | 2 ++
>   pc-bios/meson.build | 9 +++++++--
>   2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 4b614b30ed9..fccda30ffc7 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -99,6 +99,7 @@
>   install_blobs_microblaze = false
>   install_blobs_ppc = false
>   install_blobs_riscv = false
> +install_blobs_s390x = false
>   if get_option('install_blobs')
>     foreach target : target_dirs
>       install_edk2_blobs = install_edk2_blobs or target in edk2_targets
> @@ -108,6 +109,7 @@
>       install_blobs_microblaze = install_blobs_microblaze or target in ['microblaze-softmmu', 'microblazeel-softmmu']
>       install_blobs_ppc = install_blobs_ppc or (target.startswith('ppc') and target.endswith('softmmu'))
>       install_blobs_riscv = install_blobs_riscv or target in ['riscv32-softmmu', 'riscv64-softmmu']
> +    install_blobs_s390x = install_blobs_s390x or target in ['s390x-softmmu']
>     endforeach
>   endif
>   
> diff --git a/pc-bios/meson.build b/pc-bios/meson.build
> index 504f03ec925..27c0f316dee 100644
> --- a/pc-bios/meson.build
> +++ b/pc-bios/meson.build
> @@ -64,8 +64,6 @@
>     'linuxboot_dma.bin',
>     'kvmvapic.bin',
>     'pvh.bin',
> -  's390-ccw.img',
> -  's390-netboot.img',
>   ))
>   
>   if host_machine.system() == 'windows'
> @@ -121,6 +119,13 @@
>     ))
>   endif
>   
> +if install_blobs_s390x
> +  blobs_ss.add(files(
> +    's390-ccw.img',
> +    's390-netboot.img',
> +  ))
> +endif
> +
>   blobs_ss = blobs_ss.apply(config_host, strict: false)
>   
>   if get_option('install_blobs')
> 

Reviewed-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

* Re: [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built
  2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
  2021-03-24  5:52   ` Thomas Huth
@ 2021-03-30 16:47   ` Cornelia Huck
  1 sibling, 0 replies; 25+ messages in thread
From: Cornelia Huck @ 2021-03-30 16:47 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-s390x, Paolo Bonzini, Thomas Huth, qemu-devel

On Tue, 23 Mar 2021 16:51:29 +0100
Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:

> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> Cc: Cornelia Huck <cohuck@redhat.com>
> Cc: Thomas Huth <thuth@redhat.com>
> Cc: qemu-s390x@nongnu.org
> ---
>  meson.build         | 2 ++
>  pc-bios/meson.build | 9 +++++++--
>  2 files changed, 9 insertions(+), 2 deletions(-)

Acked-by: Cornelia Huck <cohuck@redhat.com>



^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2021-03-30 16:48 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 15:51 [RFC PATCH 00/13] blobs: Only install required (system emulation) files Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files Philippe Mathieu-Daudé
2021-03-23 16:22   ` Paolo Bonzini
2021-03-23 15:51 ` [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed Philippe Mathieu-Daudé
2021-03-23 16:15   ` Laszlo Ersek
2021-03-23 15:51 ` [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host Philippe Mathieu-Daudé
2021-03-23 15:57   ` Stefan Weil
2021-03-23 15:51 ` [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built Philippe Mathieu-Daudé
2021-03-23 16:29   ` Paolo Bonzini
2021-03-23 15:51 ` [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built Philippe Mathieu-Daudé
2021-03-23 16:29   ` Paolo Bonzini
2021-03-23 15:51 ` [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built Philippe Mathieu-Daudé
2021-03-23 23:09   ` Helge Deller
2021-03-23 15:51 ` [RFC PATCH 07/13] blobs: Only install DT blobs if microblaze system targets are built Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 08/13] blobs: Only install blobs if powerpc " Philippe Mathieu-Daudé
2021-03-23 23:09   ` David Gibson
2021-03-23 15:51 ` [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv " Philippe Mathieu-Daudé
2021-03-23 21:28   ` Alistair Francis
2021-03-23 15:51 ` [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built Philippe Mathieu-Daudé
2021-03-24  5:52   ` Thomas Huth
2021-03-30 16:47   ` Cornelia Huck
2021-03-23 15:51 ` [RFC PATCH 11/13] blobs: Only install SPARC firmwares if sparc system targets are built Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 12/13] blobs: Only install x86 blobs if x86 " Philippe Mathieu-Daudé
2021-03-23 15:51 ` [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built Philippe Mathieu-Daudé
2021-03-23 16:15   ` Thomas Huth

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).