[PATCH v1] Improve handosff prepare on SoCFPGA

Brian Sune briansune at gmail.com
Sat Apr 11 19:27:30 CEST 2026


There are some cases that the Python scripts
are run and the qts files are not replaced.
Make sure qts folder h files are removed before
handoff script runs.

Signed-off-by: Brian Sune <briansune at gmail.com>
---
 arch/arm/mach-socfpga/config.mk | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-socfpga/config.mk b/arch/arm/mach-socfpga/config.mk
index 1ca1d33cb16..d9d9d4f2373 100644
--- a/arch/arm/mach-socfpga/config.mk
+++ b/arch/arm/mach-socfpga/config.mk
@@ -43,6 +43,11 @@ socfpga_g5_handoff_prepare:
 			exit 0; \
 		fi; \
 		echo "[INFO] Found hiof file: $$HIOF_FILE"; \
+		echo "[INFO] Clean old BSP files..."; \
+		if ls "$$BOARD_DIR/qts"/*.h >/dev/null 2>&1; then \
+			rm -r "$$BOARD_DIR/qts"/*.h; \
+			echo "[INFO] Removed old BSP files..."; \
+		fi; \
 		echo "[INFO] Running BSP generator..."; \
 		python3 $(srctree)/tools/cv_bsp_generator/cv_bsp_generator.py -i "$$HANDOFF_PATH" -o "$$BOARD_DIR/qts" || echo "[WARN] BSP generator failed, continuing..."; \
 		echo "[DONE] SoCFPGA QTS handoff conversion complete."
-- 
2.34.1



More information about the U-Boot mailing list