git: 24718d1db0bb - releng/15.0 - dtb: sort by vendor on riscv
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 23 Oct 2025 23:37:22 UTC
The branch releng/15.0 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=24718d1db0bba5fa55b36efcf5acdbe9c91e9e1b
commit 24718d1db0bba5fa55b36efcf5acdbe9c91e9e1b
Author: Mitchell Horne <mhorne@FreeBSD.org>
AuthorDate: 2025-10-20 14:24:45 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-23 23:32:37 +0000
dtb: sort by vendor on riscv
Just like arm64, our DTS comes from Linux and is correctly sorted into
subdirectories by vendor. Enable the logic to preserve these directories
in the installation, for example:
/boot/dtb/sifive/hifive-unmatched-a00.dtb
Approved by: re (cperciva)
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53116
(cherry picked from commit cf202819af2337c0b652ac9290964c2ef7a1ae3c)
(cherry picked from commit 0cc2448fc2a2e194473d04512c1a83db3913de72)
---
sys/conf/dtb.build.mk | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/sys/conf/dtb.build.mk b/sys/conf/dtb.build.mk
index 327d69106244..b81ba439d8ad 100644
--- a/sys/conf/dtb.build.mk
+++ b/sys/conf/dtb.build.mk
@@ -19,9 +19,10 @@ SYSDIR= ${S}
.endif
.for _dts in ${DTS}
-# DTB for aarch64 needs to preserve the immediate parent of the .dts, because
-# these DTS are vendored and should be installed into their vendored directory.
-.if ${MACHINE_CPUARCH} == "aarch64"
+# DTBs for aarch64 and riscv need to preserve the immediate parent of the .dts,
+# because these DTS are vendored and should be installed into their vendored
+# directories.
+.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
DTB+= ${_dts:R:S/$/.dtb/}
.else
DTB+= ${_dts:T:R:S/$/.dtb/}
@@ -58,7 +59,7 @@ _dtbinstall:
# entries in the NO_ROOT case.
test -d ${DESTDIR}${DTBDIR} || ${INSTALL} -d -o ${DTBOWN} -g ${DTBGRP} ${DESTDIR}${DTBDIR}
.for _dtb in ${DTB}
-.if ${MACHINE_CPUARCH} == "aarch64"
+.if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "riscv"
# :H:T here to grab the vendor component of the DTB path in a way that
# allows out-of-tree DTS builds, too. We make the assumption that
# out-of-tree DTS will have a similar directory structure to in-tree,