hvk: support DT overlay (dtbo) files in hvk-dt.sh
authorHugo Villeneuve <hugo@hugovil.com>
Thu, 3 Apr 2025 14:49:46 +0000 (10:49 -0400)
committerHugo Villeneuve <hugo@hugovil.com>
Thu, 3 Apr 2025 14:49:46 +0000 (10:49 -0400)
Signed-off-by: Hugo Villeneuve <hugo@hugovil.com>
scripts/hvk-dt.sh

index 6009f29..97b6757 100755 (executable)
@@ -15,7 +15,19 @@ fi
 # Add .dtb extension to all DTB files:
 dtb_files=""
 for f in ${DTB_FILES}; do
-    dtb_files="${dtb_files} ${dts_subdir}${f}.dtb"
+    found=0
+    for ext in dtb dtbo; do
+        if [ -f ${DTS_SRC}/${f}.${ext} ]; then
+            dtb_files="${dtb_files} ${dts_subdir}${f}.${ext}"
+            found=1
+            break
+        fi
+    done
+
+    if [ ${found} -eq 0 ]; then
+        echo "Missing DT binary file: ${f}"
+        exit 1
+    fi
 done
 
 if [ x"${dtb_files}" != x"" ]; then