summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2025-04-23 12:02:21 +0200
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-04-25 17:09:58 +0200
commit12963e79ca461db7b098c8eb00bb21cf88a250a4 (patch)
treef344bffac4ad7feee51a9331bc608baf611abfa5
parentfcb1ad456c58ba2304127b0131ac0b48895b2a3b (diff)
downloadfocaccia-qemu-12963e79ca461db7b098c8eb00bb21cf88a250a4.tar.gz
focaccia-qemu-12963e79ca461db7b098c8eb00bb21cf88a250a4.zip
pc-bios: Move device tree files in their own subdir
We have several device tree files already and may have more in the
future so add a new dtb subdirectory and move device tree files there
so they are not mixed with ROM binaries.

Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <57f179bd3904c1f2ca062ca4d4ff9592bb4f4daa.1745402140.git.balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-rw-r--r--MAINTAINERS2
-rw-r--r--pc-bios/dtb/bamboo.dtb (renamed from pc-bios/bamboo.dtb)bin3211 -> 3211 bytes
-rw-r--r--pc-bios/dtb/bamboo.dts (renamed from pc-bios/bamboo.dts)0
-rw-r--r--pc-bios/dtb/canyonlands.dtb (renamed from pc-bios/canyonlands.dtb)bin9779 -> 9779 bytes
-rw-r--r--pc-bios/dtb/canyonlands.dts (renamed from pc-bios/canyonlands.dts)0
-rw-r--r--pc-bios/dtb/meson.build23
-rw-r--r--pc-bios/dtb/petalogix-ml605.dtb (renamed from pc-bios/petalogix-ml605.dtb)bin9882 -> 9882 bytes
-rw-r--r--pc-bios/dtb/petalogix-ml605.dts (renamed from pc-bios/petalogix-ml605.dts)0
-rw-r--r--pc-bios/dtb/petalogix-s3adsp1800.dtb (renamed from pc-bios/petalogix-s3adsp1800.dtb)bin8161 -> 8161 bytes
-rw-r--r--pc-bios/dtb/petalogix-s3adsp1800.dts (renamed from pc-bios/petalogix-s3adsp1800.dts)0
-rw-r--r--pc-bios/meson.build23
-rw-r--r--qemu.nsi2
-rw-r--r--system/datadir.c4
13 files changed, 29 insertions, 25 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 661a47db5a..d82d962f1a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1581,7 +1581,7 @@ F: hw/pci-host/ppc440_pcix.c
 F: hw/display/sm501*
 F: hw/ide/sii3112.c
 F: hw/rtc/m41t80.c
-F: pc-bios/canyonlands.dt[sb]
+F: pc-bios/dtb/canyonlands.dt[sb]
 F: pc-bios/u-boot-sam460ex-20100605.bin
 F: roms/u-boot-sam460ex
 F: docs/system/ppc/amigang.rst
diff --git a/pc-bios/bamboo.dtb b/pc-bios/dtb/bamboo.dtb
index d12e201aa0..d12e201aa0 100644
--- a/pc-bios/bamboo.dtb
+++ b/pc-bios/dtb/bamboo.dtb
Binary files differdiff --git a/pc-bios/bamboo.dts b/pc-bios/dtb/bamboo.dts
index 62fabcca68..62fabcca68 100644
--- a/pc-bios/bamboo.dts
+++ b/pc-bios/dtb/bamboo.dts
diff --git a/pc-bios/canyonlands.dtb b/pc-bios/dtb/canyonlands.dtb
index 9dce3443ad..9dce3443ad 100644
--- a/pc-bios/canyonlands.dtb
+++ b/pc-bios/dtb/canyonlands.dtb
Binary files differdiff --git a/pc-bios/canyonlands.dts b/pc-bios/dtb/canyonlands.dts
index 0d6ac92d0f..0d6ac92d0f 100644
--- a/pc-bios/canyonlands.dts
+++ b/pc-bios/dtb/canyonlands.dts
diff --git a/pc-bios/dtb/meson.build b/pc-bios/dtb/meson.build
new file mode 100644
index 0000000000..7a71835bca
--- /dev/null
+++ b/pc-bios/dtb/meson.build
@@ -0,0 +1,23 @@
+dtbs = [
+  'bamboo.dtb',
+  'canyonlands.dtb',
+  'petalogix-ml605.dtb',
+  'petalogix-s3adsp1800.dtb',
+]
+
+dtc = find_program('dtc', required: false)
+if dtc.found()
+  foreach out : dtbs
+    f = fs.replace_suffix(out, '.dts')
+    custom_target(f,
+        build_by_default: have_system,
+        input: files(f),
+        output: out,
+        install: get_option('install_blobs'),
+        install_dir: qemu_datadir / 'dtb',
+        command: [ dtc, '-q', '-I', 'dts', '-O', 'dtb',
+                        '-o', '@OUTPUT@', '@INPUT0@' ])
+  endforeach
+else
+    install_data(dtbs, install_dir: qemu_datadir / 'dtb')
+endif
diff --git a/pc-bios/petalogix-ml605.dtb b/pc-bios/dtb/petalogix-ml605.dtb
index 9a05434db7..9a05434db7 100644
--- a/pc-bios/petalogix-ml605.dtb
+++ b/pc-bios/dtb/petalogix-ml605.dtb
Binary files differdiff --git a/pc-bios/petalogix-ml605.dts b/pc-bios/dtb/petalogix-ml605.dts
index b307a29279..b307a29279 100644
--- a/pc-bios/petalogix-ml605.dts
+++ b/pc-bios/dtb/petalogix-ml605.dts
diff --git a/pc-bios/petalogix-s3adsp1800.dtb b/pc-bios/dtb/petalogix-s3adsp1800.dtb
index 2513599438..2513599438 100644
--- a/pc-bios/petalogix-s3adsp1800.dtb
+++ b/pc-bios/dtb/petalogix-s3adsp1800.dtb
Binary files differdiff --git a/pc-bios/petalogix-s3adsp1800.dts b/pc-bios/dtb/petalogix-s3adsp1800.dts
index f53c36f870..f53c36f870 100644
--- a/pc-bios/petalogix-s3adsp1800.dts
+++ b/pc-bios/dtb/petalogix-s3adsp1800.dts
diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index 34d6616c32..34d8cc4f33 100644
--- a/pc-bios/meson.build
+++ b/pc-bios/meson.build
@@ -86,31 +86,10 @@ 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, '-q', '-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
 
 subdir('descriptors')
+subdir('dtb')
 subdir('keymaps')
diff --git a/qemu.nsi b/qemu.nsi
index b186f223e1..d419986ca0 100644
--- a/qemu.nsi
+++ b/qemu.nsi
@@ -204,7 +204,6 @@ Section "Uninstall"
     Delete "$INSTDIR\*.bmp"
     Delete "$INSTDIR\*.bin"
     Delete "$INSTDIR\*.dll"
-    Delete "$INSTDIR\*.dtb"
     Delete "$INSTDIR\*.fd"
     Delete "$INSTDIR\*.img"
     Delete "$INSTDIR\*.lid"
@@ -215,6 +214,7 @@ Section "Uninstall"
     Delete "$INSTDIR\qemu-io.exe"
     Delete "$INSTDIR\qemu.exe"
     Delete "$INSTDIR\qemu-system-*.exe"
+    RMDir /r "$INSTDIR\dtb"
     RMDir /r "$INSTDIR\doc"
     RMDir /r "$INSTDIR\share"
     ; Remove generated files
diff --git a/system/datadir.c b/system/datadir.c
index e450b84ce9..f96f8fc264 100644
--- a/system/datadir.c
+++ b/system/datadir.c
@@ -44,9 +44,11 @@ char *qemu_find_file(QemuFileType type, const char *name)
 
     switch (type) {
     case QEMU_FILE_TYPE_BIOS:
-    case QEMU_FILE_TYPE_DTB:
         subdir = "";
         break;
+    case QEMU_FILE_TYPE_DTB:
+        subdir = "dtb/";
+        break;
     case QEMU_FILE_TYPE_KEYMAP:
         subdir = "keymaps/";
         break;