qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 05/10] meson: compile bundled device trees


From: Richard Henderson
Subject: Re: [PATCH 05/10] meson: compile bundled device trees
Date: Tue, 29 Aug 2023 11:48:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0

On 8/29/23 07:25, Philippe Mathieu-Daudé wrote:
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 <pbonzini@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,

Yes, because the output will be in the build directory, and installed from 
there,

+        install: get_option('install_blobs'),
+        install_dir: qemu_datadir,
+        command: [ dtc, '-I', 'dts', '-O', 'dtb', '-o', '@OUTPUT@', '@INPUT0@' 
])
+  else
+    blobs += out

whereas the fallback case copies from the source directory.


r~

+  endif
+endforeach
+
  if get_option('install_blobs')
    install_data(blobs, install_dir: qemu_datadir)
  endif






reply via email to

[Prev in Thread] Current Thread [Next in Thread]