Skip to contentSkip to conversation

blobs: Only install required (system emulation) files

RFC PATCH In review Philippe Mathieu-Daudé 9 participants 25 messages Mar 23, 2021 – Mar 30, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

cover blobs: Only install required (system emulation) files

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(-)
Signature · 1 line
2.26.2
#1 lore raw

RFC PATCH 1/13 blobs: Use Meson source_set to store blob files

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

---
 pc-bios/meson.build | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
pc-bios/meson.build +7 -3
index f2b32598af7..1c4074bcb0d 100644
@@ -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')
Signature · 1 line
2.26.2
#2 lore raw

Re: [RFC PATCH 01/13] blobs: Use Meson source_set to store blob files

Quoted 33 lines · Philippe Mathieu-Daudé

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

---
  pc-bios/meson.build | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
pc-bios/meson.build +3 -2
index f2b32598af7..1c4074bcb0d 100644
@@ -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',
-)

pc-bios/meson.build line 94

Quoted 10 lines
pc-bios/meson.build +4 -1
+))
+
+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

#3 lore raw

RFC PATCH 2/13 blobs: Only install EDK2 license file if EDK2 blobs are installed

In reply to Philippe Mathieu-Daudé

---
Cc: Laszlo Ersek <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>

---
 pc-bios/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
pc-bios/meson.build +2 -1
index 1c4074bcb0d..d270d8516c9 100644
@@ -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',
Signature · 1 line
2.26.2
Acked-by on v1 2/13
#4 lore raw

Re: [RFC PATCH 02/13] blobs: Only install EDK2 license file if EDK2 blobs are installed

Quoted 23 lines · Philippe Mathieu-Daudé

---
Cc: Laszlo Ersek <[email protected]>
Cc: Philippe Mathieu-Daudé <[email protected]>

---
 pc-bios/meson.build | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
pc-bios/meson.build +2 -0
index 1c4074bcb0d..d270d8516c9 100644
@@ -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(

pc-bios/meson.build line 83

Quoted 7 lines
pc-bios/meson.build +0 -1
@@ -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',
#5 lore raw

RFC PATCH 3/13 blobs: Only install qemu-nsis.bmp on Windows host

In reply to Philippe Mathieu-Daudé

---
Cc: Stefan Weil <[email protected]>

---
 pc-bios/meson.build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
pc-bios/meson.build +6 -1
index d270d8516c9..007cf9d2afb 100644
@@ -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')
Signature · 1 line
2.26.2
Reviewed-by on v1 3/13
#6 lore raw

Re: [RFC PATCH 03/13] blobs: Only install qemu-nsis.bmp on Windows host

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

Quoted 22 lines

---
Cc: Stefan Weil <[email protected]>

---
  pc-bios/meson.build | 7 ++++++-
  1 file changed, 6 insertions(+), 1 deletion(-)
pc-bios/meson.build +0 -1
index d270d8516c9..007cf9d2afb 100644
@@ -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',
  ))

pc-bios/meson.build line 96

Quoted 10 lines
pc-bios/meson.build +6 -0
 
+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!

#7 lore raw

RFC PATCH 4/13 blobs: Only install PALcode blob if alpha system target is built

In reply to Philippe Mathieu-Daudé

---
Cc: Richard Henderson <[email protected]>

---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
meson.build +2 -0
index 5c85a15364d..b5b8892fe7a 100644
@@ -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
 
pc-bios/meson.build +6 -1
index 007cf9d2afb..29085912d7d 100644
@@ -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')
Signature · 1 line
2.26.2
#8 lore raw

Re: [RFC PATCH 04/13] blobs: Only install PALcode blob if alpha system target is built

Quoted 13 lines · Philippe Mathieu-Daudé

---
Cc: Richard Henderson <[email protected]>

---
  meson.build         | 2 ++
  pc-bios/meson.build | 7 ++++++-
  2 files changed, 8 insertions(+), 1 deletion(-)
meson.build +0 -0
index 5c85a15364d..b5b8892fe7a 100644

meson.build line 100

Quoted 8 lines
meson.build +2 -0
@@ -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

Quoted 29 lines
meson.build +0 -0
    endforeach
  endif
 
pc-bios/meson.build +6 -1
index 007cf9d2afb..29085912d7d 100644
@@ -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')
#9 lore raw

RFC PATCH 5/13 blobs: Only install npcm7xx bootrom if ARM system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: Havard Skinnemoen <[email protected]>
Cc: Tyrone Ting <[email protected]>
Cc: [email protected]

---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
meson.build +2 -0
index b5b8892fe7a..10c21ef52af 100644
@@ -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
 
pc-bios/meson.build +6 -1
index 29085912d7d..635485931b9 100644
@@ -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')
Signature · 1 line
2.26.2
#10 lore raw

Re: [RFC PATCH 05/13] blobs: Only install npcm7xx bootrom if ARM system targets are built

Quoted 4 lines · Philippe Mathieu-Daudé

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

#11 lore raw

RFC PATCH 6/13 blobs: Only install PA-RISC SeaBIOS if hppa system target is built

In reply to Philippe Mathieu-Daudé

---
Cc: Richard Henderson <[email protected]>
Cc: Helge Deller <[email protected]>

---
 meson.build         | 2 ++
 pc-bios/meson.build | 7 ++++++-
 2 files changed, 8 insertions(+), 1 deletion(-)
meson.build +2 -0
index 10c21ef52af..a7f3b60d08e 100644
@@ -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
 
pc-bios/meson.build +6 -1
index 635485931b9..c494c334e26 100644
@@ -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')
Signature · 1 line
2.26.2
Acked-by on v1 6/13
#12 lore raw

Re: [RFC PATCH 06/13] blobs: Only install PA-RISC SeaBIOS if hppa system target is built

Quoted 4 lines · Philippe Mathieu-Daudé

---
Cc: Richard Henderson <[email protected]>
Cc: Helge Deller <[email protected]>

Quoted 49 lines
---
  meson.build         | 2 ++
  pc-bios/meson.build | 7 ++++++-
  2 files changed, 8 insertions(+), 1 deletion(-)
meson.build +2 -0
index 10c21ef52af..a7f3b60d08e 100644
@@ -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
 
pc-bios/meson.build +6 -1
index 635485931b9..c494c334e26 100644
@@ -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')
#13 lore raw

RFC PATCH 7/13 blobs: Only install DT blobs if microblaze system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: Edgar E. Iglesias <[email protected]>

---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
meson.build +2 -0
index a7f3b60d08e..e3418815b04 100644
@@ -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
 
pc-bios/meson.build +7 -2
index c494c334e26..a6185feff58 100644
@@ -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')
Signature · 1 line
2.26.2
#14 lore raw

RFC PATCH 8/13 blobs: Only install blobs if powerpc system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: David Gibson <[email protected]>
Cc: Greg Kurz <[email protected]>
Cc: [email protected]
Cc: Mark Cave-Ayland <[email protected]>
Cc: Hervé Poussineau <[email protected]>
Cc: Cédric Le Goater <[email protected]>
Cc: BALATON Zoltan <[email protected]>

---
 meson.build         |  2 ++
 pc-bios/meson.build | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)
meson.build +2 -0
index e3418815b04..6f5561c2212 100644
@@ -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
 
pc-bios/meson.build +13 -8
index a6185feff58..73d02a57628 100644
@@ -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')
Signature · 1 line
2.26.2
Acked-by on v1 8/13
#15 lore raw

Re: [RFC PATCH 08/13] blobs: Only install blobs if powerpc system targets are built

Quoted 9 lines · Philippe Mathieu-Daudé

---
Cc: David Gibson <[email protected]>
Cc: Greg Kurz <[email protected]>
Cc: [email protected]
Cc: Mark Cave-Ayland <[email protected]>
Cc: Hervé Poussineau <[email protected]>
Cc: Cédric Le Goater <[email protected]>
Cc: BALATON Zoltan <[email protected]>

Quoted 4 lines
---
 meson.build         |  2 ++
 pc-bios/meson.build | 21 +++++++++++++--------
 2 files changed, 15 insertions(+), 8 deletions(-)
Quoted 74 lines
meson.build +2 -0
index e3418815b04..6f5561c2212 100644
@@ -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
 
pc-bios/meson.build +13 -8
index a6185feff58..73d02a57628 100644
@@ -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')
Signature · 4 lines
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
#16 lore raw

RFC PATCH 9/13 blobs: Only install firmware blobs if riscv system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: Palmer Dabbelt <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Sagar Karandikar <[email protected]>
Cc: Bastian Koppelmann <[email protected]>
Cc: [email protected]

---
 meson.build         |  2 ++
 pc-bios/meson.build | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
meson.build +2 -0
index 6f5561c2212..4b614b30ed9 100644
@@ -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
 
pc-bios/meson.build +9 -4
index 73d02a57628..504f03ec925 100644
@@ -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')
Signature · 1 line
2.26.2
Reviewed-by on v1 9/13
#17 lore raw

Re: [RFC PATCH 09/13] blobs: Only install firmware blobs if riscv system targets are built

Quoted 2 lines · Philippe Mathieu-Daudé

Alistair

Quoted 66 lines

---
Cc: Palmer Dabbelt <[email protected]>
Cc: Alistair Francis <[email protected]>
Cc: Sagar Karandikar <[email protected]>
Cc: Bastian Koppelmann <[email protected]>
Cc: [email protected]

---
 meson.build         |  2 ++
 pc-bios/meson.build | 13 +++++++++----
 2 files changed, 11 insertions(+), 4 deletions(-)
meson.build +2 -0
index 6f5561c2212..4b614b30ed9 100644
@@ -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
 
pc-bios/meson.build +9 -5
index 73d02a57628..504f03ec925 100644
@@ -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

#18 lore raw

RFC PATCH 10/13 blobs: Only install s390x firmwares if s390x system target is built

In reply to Philippe Mathieu-Daudé

---
Cc: Cornelia Huck <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: [email protected]

---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
meson.build +2 -0
index 4b614b30ed9..fccda30ffc7 100644
@@ -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
 
pc-bios/meson.build +7 -2
index 504f03ec925..27c0f316dee 100644
@@ -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')
Signature · 1 line
2.26.2
Reviewed-by on v1 10/13
#19 lore raw

Re: [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built

Quoted 48 lines · Philippe Mathieu-Daudé

---
Cc: Cornelia Huck <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: [email protected]

---
  meson.build         | 2 ++
  pc-bios/meson.build | 9 +++++++--
  2 files changed, 9 insertions(+), 2 deletions(-)
meson.build +2 -0
index 4b614b30ed9..fccda30ffc7 100644
@@ -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
 
pc-bios/meson.build +0 -2
index 504f03ec925..27c0f316dee 100644
@@ -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
 

pc-bios/meson.build line 131

Quoted 10 lines
pc-bios/meson.build +7 -0
+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')
Acked-by on v1 10/13
#20 lore raw

Re: [RFC PATCH 10/13] blobs: Only install s390x firmwares if s390x system target is built

In reply to Philippe Mathieu-Daudé
Quoted 9 lines · On Tue, 23 Mar 2021 16:51:29 +0100 Philippe Mathieu-Daudé <[email protected]>…

---
Cc: Cornelia Huck <[email protected]>
Cc: Thomas Huth <[email protected]>
Cc: [email protected]

---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
#21 lore raw

RFC PATCH 11/13 blobs: Only install SPARC firmwares if sparc system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: Mark Cave-Ayland <[email protected]>
Cc: Artyom Tarasenko <[email protected]>

---
 meson.build         | 2 ++
 pc-bios/meson.build | 9 +++++++--
 2 files changed, 9 insertions(+), 2 deletions(-)
meson.build +2 -0
index fccda30ffc7..addea8c39d7 100644
@@ -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
 
pc-bios/meson.build +7 -2
index 27c0f316dee..89efe4359e4 100644
@@ -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')
Signature · 1 line
2.26.2
#22 lore raw

RFC PATCH 12/13 blobs: Only install x86 blobs if x86 system targets are built

In reply to Philippe Mathieu-Daudé

---
Cc: Paolo Bonzini <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Michael S. Tsirkin <[email protected]>
Cc: Marcel Apfelbaum <[email protected]>

---
 meson.build         |  2 ++
 pc-bios/meson.build | 23 ++++++++++++++---------
 2 files changed, 16 insertions(+), 9 deletions(-)
meson.build +2 -0
index addea8c39d7..e484670c5b7 100644
@@ -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
 
pc-bios/meson.build +14 -9
index 89efe4359e4..d21187545cf 100644
@@ -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')
Signature · 1 line
2.26.2
#23 lore raw

RFC PATCH 13/13 meson: Only build ROM/BIOS when system emulation is built

In reply to Philippe Mathieu-Daudé

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

---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +3 -1
index e484670c5b7..457a07047b1 100644
@@ -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()
Signature · 1 line
2.26.2
Reviewed-by on v1 13/13
#24 lore raw

Re: [RFC PATCH 13/13] meson: Only build ROM/BIOS when system emulation is built

Quoted 14 lines · Philippe Mathieu-Daudé

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

---
  meson.build | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +0 -0
index e484670c5b7..457a07047b1 100644

meson.build line 2386

Quoted 10 lines
meson.build +3 -1
@@ -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()