qemu-devel
[Top][All Lists]
Advanced

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

[PATCH 6/6] meson: replace pc-bios/Makefile


From: marcandre . lureau
Subject: [PATCH 6/6] meson: replace pc-bios/Makefile
Date: Sat, 19 Sep 2020 00:47:59 +0400

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Add an alias target "update-dtb" to recompile the device-tree "sources"
to the "blob" format.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 pc-bios/Makefile    | 19 -------------------
 pc-bios/meson.build | 12 ++++++++++++
 2 files changed, 12 insertions(+), 19 deletions(-)
 delete mode 100644 pc-bios/Makefile

diff --git a/pc-bios/Makefile b/pc-bios/Makefile
deleted file mode 100644
index 315288df84..0000000000
--- 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 d25585ca97..f004df7a4d 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -92,6 +92,18 @@ endif
 subdir('descriptors')
 subdir('keymaps')
 
+dtc = find_program('dtc', required: false)
+if dtc.found()
+  t = []
+  foreach f: ['bamboo.dts', 'canyonlands.dts', 'petalogix-ml605.dts', 
'petalogix-s3adsp1800.dts']
+    t += custom_target(f,
+                       input: f,
+                       output: '@BASENAME@' + '.dtb',
+                       command: [dtc, '-I', 'dts', '-O', 'dtb', '-o', 
'@OUTPUT@', '@INPUT@'])
+  endforeach
+  alias_target('update-dtb', t)
+endif
+
 if host_machine.cpu_family() in ['x86', 'x86_64']
   subproject('optionrom')
 endif
-- 
2.26.2




reply via email to

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