On 29/8/23 10:29, Paolo Bonzini wrote:
If dtc is available, compile the .dts files in the pc-bios directory
instead of using the precompiled binaries.

Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
---
  pc-bios/Makefile    | 19 -------------------
  pc-bios/meson.build | 25 +++++++++++++++++++++----
  2 files changed, 21 insertions(+), 23 deletions(-)
  delete mode 100644 pc-bios/Makefile


+dtc = find_program('dtc', required: false)
+foreach f : [
+  'bamboo.dts',
+  'canyonlands.dts',
+  'petalogix-s3adsp1800.dts',
+  'petalogix-ml605.dts',
+]
+  out = fs.replace_suffix(f, '.dtb')

Does that work when building from read-only source directory?

+  if dtc.found()
+    custom_target(f,
+        build_by_default: have_system,
+        input: files(f),
+        output: out,
+        install: get_option('install_blobs'),
+        install_dir: qemu_datadir,
+        command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' 
])
+  else
+    blobs += out
+  endif
+endforeach
+
  if get_option('install_blobs')
    install_data(blobs, install_dir: qemu_datadir)
  endif


Reply via email to