Skip to contentSkip to conversation

Improve handosff prepare on SoCFPGA

PATCH Superseded Brian Sune 1 participant 1 message Apr 20

Subsystems (3)

v2 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Brian Sune

author
#0 lore raw

PATCH v2 1/1 Improve handosff prepare on SoCFPGA

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.

---
 arch/arm/mach-socfpga/config.mk | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
arch/arm/mach-socfpga/config.mk +9 -1
index 1ca1d33cb16..d4998298741 100644
@@ -43,6 +43,14 @@ 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 "$$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..."; \
+		if ! python3 $(srctree)/tools/cv_bsp_generator/cv_bsp_generator.py -i "$$HANDOFF_PATH" -o "$$BOARD_DIR/qts"; then \
+			echo "[ERR] BSP generator failed!"; \
+			exit 1; \
+		fi; \
 		echo "[DONE] SoCFPGA QTS handoff conversion complete."
Signature · 1 line
2.34.1