Skip to contentSkip to conversation

meson: Only install ROMs when building system emulation binaries

RFC PATCH In review Philippe Mathieu-Daudé 2 participants 2 messages Jan 15, 2021 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 meson: Only install ROMs when building system emulation binaries

It is pointless to install ROM blobs for user emulation.

---
RFC because I think it would be better to make the 'blobs' option a 'feature' instead of a boolean so we can set it as 'auto' and then in that case we could do something

blobs = have_system

because currently ./configure still displays:

Install blobs: YES

which is confusing.

---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +3 -1
index 954152c90fe..273b8e6baa9 100644
@@ -2254,7 +2254,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
#1 lore raw
Quoted 7 lines · Philippe Mathieu-Daudé

It is pointless to install ROM blobs for user emulation.

---
RFC because I think it would be better to make the 'blobs' option a 'feature' instead of a boolean so we can set it as 'auto' and then in that case we could do something

Yes it's better to do that and have

install_blobs = get_option('install_blobs').enabled() or
(get_option('install_blobs').auto() and have_system)

And then if get_option('install_blobs').auto() you could install blobs only if the corresponding target is included in target_dirs:

if get_option('install_blobs').enabled() or 'i386-softmmu' in target_dirs or 'x86_64-softmmu' in target_dirs
...
endif

Paolo

Quoted 27 lines

blobs = have_system

because currently ./configure still displays:

Install blobs: YES

which is confusing.

---
  meson.build | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)
meson.build +3 -1
index 954152c90fe..273b8e6baa9 100644
@@ -2254,7 +2254,9 @@
 
  subdir('scripts')
  subdir('tools')
-subdir('pc-bios')
+if have_system
+  subdir('pc-bios')
+endif
  subdir('docs')
  subdir('tests')
  if gtk.found()