]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
pc-bios: Move device tree files in their own subdir
authorBALATON Zoltan <balaton@eik.bme.hu>
Wed, 23 Apr 2025 10:02:21 +0000 (12:02 +0200)
committerPhilippe Mathieu-Daudé <philmd@linaro.org>
Fri, 25 Apr 2025 15:09:58 +0000 (17:09 +0200)
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>
13 files changed:
MAINTAINERS
pc-bios/dtb/bamboo.dtb [moved from pc-bios/bamboo.dtb with 100% similarity]
pc-bios/dtb/bamboo.dts [moved from pc-bios/bamboo.dts with 100% similarity]
pc-bios/dtb/canyonlands.dtb [moved from pc-bios/canyonlands.dtb with 100% similarity]
pc-bios/dtb/canyonlands.dts [moved from pc-bios/canyonlands.dts with 100% similarity]
pc-bios/dtb/meson.build [new file with mode: 0644]
pc-bios/dtb/petalogix-ml605.dtb [moved from pc-bios/petalogix-ml605.dtb with 100% similarity]
pc-bios/dtb/petalogix-ml605.dts [moved from pc-bios/petalogix-ml605.dts with 100% similarity]
pc-bios/dtb/petalogix-s3adsp1800.dtb [moved from pc-bios/petalogix-s3adsp1800.dtb with 100% similarity]
pc-bios/dtb/petalogix-s3adsp1800.dts [moved from pc-bios/petalogix-s3adsp1800.dts with 100% similarity]
pc-bios/meson.build
qemu.nsi
system/datadir.c

index 661a47db5acc18addd16c2433ba3b623b45a5de8..d82d962f1a43c4b4a21c1a9c02b8b0caca79fc8c 100644 (file)
@@ -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
similarity index 100%
rename from pc-bios/bamboo.dtb
rename to pc-bios/dtb/bamboo.dtb
similarity index 100%
rename from pc-bios/bamboo.dts
rename to pc-bios/dtb/bamboo.dts
diff --git a/pc-bios/dtb/meson.build b/pc-bios/dtb/meson.build
new file mode 100644 (file)
index 0000000..7a71835
--- /dev/null
@@ -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
index 34d6616c32b44ce7b9f49b9eac307cbd9d1b6bab..34d8cc4f338c6a098c8e2710f13d33cadcd90aaf 100644 (file)
@@ -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')
index b186f223e14078e8600b20732c0e082fb77badc6..d419986ca062ec03c09f431cfd96bcc93713ce1a 100644 (file)
--- 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
index e450b84ce91b6dbced4e606a5758b230c035cb08..f96f8fc2646ecd952d69c5eccbcc7f3215aa51e6 100644 (file)
@@ -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;