[PATCH v7] Add optimized Makefile support for SoCFPGA handoff
Sune Brian
briansune at gmail.com
Wed Nov 19 12:13:44 CET 2025
typo aligned on both so it wont be an issue from first place.
However indeed should be fixed to let user readable.
Remove: else ifeq ($(CONFIG_TARGET_SOCFPGA_ARRIA10),y)
is enough meanwhile when users don't place any folder or path
parameter it will simply bypassed.
Brian
> +ifeq ($(CONFIG_TARGET_SOCFPGA_CYCLONE5),y)
> +archprepare: socfpga_g5_hanoff_prepare
>
>
> Typo: socfpga_g5_hanoff_prepar, it should be socfpga_g5_handoff_prepare
>
>
> +else ifeq ($(CONFIG_TARGET_SOCFPGA_ARRIA5),y)
> +archprepare: socfpga_g5_hanoff_prepare
> +else ifeq ($(CONFIG_TARGET_SOCFPGA_ARRIA10),y)
>
>
> You are binding the rule to:
> Cyclone V
> Arria V
> Arria 10
>
> However, cv_bsp_generator.py applies only to Cyclone V and Arria V.
> Arria 10 does not use .hiof and does not use the CV BSP generator.
>
> So this part should not include Arria 10
>
>
> +archprepare: socfpga_g5_hanoff_prepare
> +endif
> +
> +socfpga_g5_hanoff_prepare:
> + @SOCFAMILY="$(SOCFAMILY)"; \
> + if [ -z "$$SOCFAMILY" ]; then \
> + exit 0; \
> + fi; \
> + echo "[INFO] SOC family detected: $$SOCFAMILY";
> + @set -- $$(awk -F'"' ' \
> + /^CONFIG_SYS_VENDOR=/ {v=$$2} \
> + /^CONFIG_SYS_BOARD=/ {b=$$2} \
> + END {print v, b}' .config); \
> + VENDOR=$$1; \
> + BOARD=$$2; \
> + if [ -z "$$VENDOR" ] || [ -z "$$BOARD" ]; then \
> + exit 0; \
> + fi; \
> + BOARD_DIR=$(src)/board/$$VENDOR/$$BOARD; \
> + if [ "$$HANDOFF_PATH" ]; then \
> + echo "[INFO] Using manually specified handoff folder: $$HANDOFF_PATH"; \
> + else \
> + HANDOFF_BASE=$$BOARD_DIR/hps_isw_handoff; \
> + if [ ! -d "$$HANDOFF_BASE" ]; then \
> + exit 0; \
> + fi; \
> + HANDOFF_PATH=$$(ls -d "$$HANDOFF_BASE"/*/ 2>/dev/null | head -n1); \
> + if [ -z "$$HANDOFF_PATH" ]; then \
> + exit 0; \
> + fi; \
> + echo "[INFO] Auto-detected handoff folder: $$HANDOFF_PATH"; \
> + fi; \
> + HIOF_FILE=$$HANDOFF_PATH/$$(basename $$HANDOFF_PATH).hiof; \
> + if [ ! -f "$$HIOF_FILE" ]; then \
> + echo "[WARN] No .hiof file found in $$HANDOFF_PATH, skipping BSP generation."; \
> + exit 0; \
> + fi; \
> + echo "[INFO] Found hiof file: $$HIOF_FILE"; \
> + echo "[INFO] Running BSP generator..."; \
> + python3 $(src)/tools/cv_bsp_generator/cv_bsp_generator.py -i "$$HANDOFF_PATH" -o "$$BOARD_DIR/qts" || echo "[WARN] BSP generator failed, continuing..."; \
>
>
> Arria 10 boards require the A10-specific filter script under: arch/arm/mach-socfpga/qts-filter-a10.sh
>
> Invocation pattern: qts-filter-a10.sh <handoff-input-directory> <output-qts-dir>
>
> It processes a set of A10-specific XML and RBF inputs such as:
>
> pinmux.xml
> arria10_hps.xml
> pll.xml
> emif.xml
> core.rbf
> other Qsys-exported XML files
>
> Because of this, the .hiof detection logic you added will always fail on Arria 10, and the QTS conversion will silently be skipped.
>
>
> + echo "[DONE] SoCFPGA QTS handoff conversion complete."
>
>
> Thanks.
>
> Tien Fong
More information about the U-Boot
mailing list