[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 24/51] meson: compile bundled device trees
From: |
Paolo Bonzini |
Subject: |
[PULL 24/51] meson: compile bundled device trees |
Date: |
Thu, 7 Sep 2023 14:59:33 +0200 |
If dtc is available, compile the .dts files in the pc-bios directory
instead of using the precompiled binaries.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
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
- [PULL 14/51] contrib/plugins: remove -soname argument, (continued)
- [PULL 14/51] contrib/plugins: remove -soname argument, Paolo Bonzini, 2023/09/07
- [PULL 07/51] os-posix.c: create and export os_set_runas(), Paolo Bonzini, 2023/09/07
- [PULL 12/51] softmmu/vl.c: inline include/qemu/qemu-options.h into vl.c, Paolo Bonzini, 2023/09/07
- [PULL 15/51] contrib/plugins/cache: Fix string format, Paolo Bonzini, 2023/09/07
- [PULL 17/51] contrib/plugins/howvec: Fix string format, Paolo Bonzini, 2023/09/07
- [PULL 16/51] contrib/plugins/drcov: Fix string format, Paolo Bonzini, 2023/09/07
- [PULL 21/51] meson: update unsupported host/CPU messages, Paolo Bonzini, 2023/09/07
- [PULL 25/51] configure: remove boolean variables for targets, Paolo Bonzini, 2023/09/07
- [PULL 11/51] os-posix.c: remove unneeded #includes, Paolo Bonzini, 2023/09/07
- [PULL 20/51] meson: do not unnecessarily use cmake for dependencies, Paolo Bonzini, 2023/09/07
- [PULL 24/51] meson: compile bundled device trees,
Paolo Bonzini <=
- Re: [PULL 24/51] meson: compile bundled device trees, Philippe Mathieu-Daudé, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Michael Tokarev, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, BALATON Zoltan, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Michael Tokarev, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, BALATON Zoltan, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Philippe Mathieu-Daudé, 2023/09/11
- Re: [PULL 24/51] meson: compile bundled device trees, Peter Maydell, 2023/09/11
[PULL 13/51] util/async-teardown.c: move to softmmu/, only build it when system build is requested, Paolo Bonzini, 2023/09/07
[PULL 18/51] contrib/plugins/lockstep: Fix string format, Paolo Bonzini, 2023/09/07
[PULL 19/51] contrib/plugins: add Darwin support, Paolo Bonzini, 2023/09/07