From a5320c8e56f4c6a5fe7c013a71be5515be14d75a Mon Sep 17 00:00:00 2001
From: Anders Roxell <anders.roxell@linaro.org>
Date: Tue, 9 Dec 2025 11:56:53 +0100
Subject: [PATCH 8/8] kbuild: backend tuxmake: Add dtbs_check support

The TuxMake backend did not support the dtbs_check parameter, which
allows running Device Tree validation as part of the build process. Jobs
with dtbs_check parameter would ignore it when using backend=tuxmake,
only building kernel and modules without DTB validation.

Add conditional dtbs_check target to TuxMake command when dtbs_check
parameter is True. The backend now appends "dtbs_check" to the build
targets (after "kernel modules"), enabling Device Tree validation
alongside regular builds. When dtbs_check is False or not set, only
kernel and modules are built as before.

Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 kernelci/kbuild.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernelci/kbuild.py b/kernelci/kbuild.py
index a7bb0abf9737..c0f8cff182fa 100644
--- a/kernelci/kbuild.py
+++ b/kernelci/kbuild.py
@@ -813,6 +813,11 @@ trap 'case $stage in
                 print(f"[_build_with_tuxmake] WARNING: Fragment file not found: {fragfile}")
 
         cmd_parts.append("kernel modules")
+        if self._dtbs_check:
+            cmd_parts.append("dtbs_check")
+            print("[_build_with_tuxmake] Building kernel, modules, and dtbs_check targets")
+        else:
+            print("[_build_with_tuxmake] Building kernel and modules targets")
 
         tuxmake_cmd = " ".join(cmd_parts)
         print(f"[_build_with_tuxmake] Command: {tuxmake_cmd}")
-- 
2.51.0

