From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PATCH 05/10] meson: compile bundled device trees
Date: Tue, 29 Aug 2023 10:29:26 +0200 [thread overview]
Message-ID: <20230829082931.67601-6-pbonzini@redhat.com> (raw)
In-Reply-To: <20230829082931.67601-1-pbonzini@redhat.com>
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
diff --git a/pc-bios/Makefile b/pc-bios/Makefile
deleted file mode 100644
index 315288df84e..00000000000
--- a/pc-bios/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# NOTE: only compilable with x86 cross compile tools
-#
-include ../config-host.mak
-
-DEFINES=
-
-TARGETS=
-
-all: $(TARGETS)
-
-%.o: %.S
- $(CC) $(DEFINES) -c -o $@ $<
-
-%.dtb: %.dts
- dtc -I dts -O dtb -o $@ $<
-
-clean:
- rm -f $(TARGETS) *.o *~
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a7224ef4699..e67fa433a1b 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -57,10 +57,6 @@ blobs = [
'efi-e1000e.rom',
'efi-vmxnet3.rom',
'qemu-nsis.bmp',
- 'bamboo.dtb',
- 'canyonlands.dtb',
- 'petalogix-s3adsp1800.dtb',
- 'petalogix-ml605.dtb',
'multiboot.bin',
'multiboot_dma.bin',
'linuxboot.bin',
@@ -84,6 +80,27 @@ blobs = [
'vof-nvram.bin',
]
+dtc = find_program('dtc', required: false)
+foreach f : [
+ 'bamboo.dts',
+ 'canyonlands.dts',
+ 'petalogix-s3adsp1800.dts',
+ 'petalogix-ml605.dts',
+]
+ out = fs.replace_suffix(f, '.dtb')
+ 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
--
2.41.0
next prev parent reply other threads:[~2023-08-29 8:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-29 8:29 [PATCH 00/10] configure cleanups for QEMU 8.2 Paolo Bonzini
2023-08-29 8:29 ` [PATCH 01/10] meson: do not unnecessarily use cmake for dependencies Paolo Bonzini
2023-08-29 17:14 ` Daniel P. Berrangé
2023-08-29 8:29 ` [PATCH 02/10] meson: update unsupported host/CPU messages Paolo Bonzini
2023-08-29 10:34 ` Daniel P. Berrangé
2023-08-31 8:20 ` Paolo Bonzini
2023-08-31 8:51 ` Daniel P. Berrangé
2023-08-29 8:29 ` [PATCH 03/10] configure: remove HOST_CC Paolo Bonzini
2023-08-29 17:12 ` Daniel P. Berrangé
2023-08-29 18:40 ` Richard Henderson
2023-08-29 8:29 ` [PATCH 04/10] configure: create native file with contents of $host_cc Paolo Bonzini
2023-08-29 16:54 ` Peter Maydell
2023-08-29 17:14 ` Daniel P. Berrangé
2023-08-31 8:26 ` Paolo Bonzini
2023-08-29 18:45 ` Richard Henderson
2023-08-29 8:29 ` Paolo Bonzini [this message]
2023-08-29 14:25 ` [PATCH 05/10] meson: compile bundled device trees Philippe Mathieu-Daudé
2023-08-29 18:48 ` Richard Henderson
2023-08-29 18:47 ` Richard Henderson
2023-08-29 8:29 ` [PATCH 06/10] contrib/plugins: use an independent makefile Paolo Bonzini
2023-08-29 17:16 ` Daniel P. Berrangé
2023-08-29 8:29 ` [PATCH 07/10] meson: do not use config_host to pick tap implementations Paolo Bonzini
2023-08-29 14:26 ` Philippe Mathieu-Daudé
2023-08-29 17:05 ` Daniel P. Berrangé
2023-08-29 8:29 ` [PATCH 08/10] configure, meson: move simple OS definitions to meson Paolo Bonzini
2023-08-29 14:28 ` Philippe Mathieu-Daudé
2023-08-29 8:29 ` [PATCH 09/10] configure: remove $linux and $mingw32 variables Paolo Bonzini
2023-08-29 14:28 ` Philippe Mathieu-Daudé
2023-08-29 17:05 ` Daniel P. Berrangé
2023-08-29 8:29 ` [PATCH 10/10] configure: move --enable-debug-tcg to meson Paolo Bonzini
2023-08-29 16:57 ` Peter Maydell
2023-08-29 18:52 ` Richard Henderson
2023-08-31 8:17 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230829082931.67601-6-pbonzini@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).