[PATCH v3] Improve handosff prepare on SoCFPGA
Simon Glass
sjg at chromium.org
Mon Apr 20 21:32:43 CEST 2026
Hi Brian,
On 2026-04-20T07:46:01, Brian Sune <briansune at gmail.com> wrote:
> 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.
>
> Signed-off-by: Brian Sune <briansune at gmail.com>
>
> arch/arm/mach-socfpga/config.mk | 29 ++++++++++++++++++++++++++---
> 1 file changed, 26 insertions(+), 3 deletions(-)
Typo in commit message: "handosff" should be "handoff".
> diff --git a/arch/arm/mach-socfpga/config.mk b/arch/arm/mach-socfpga/config.mk
> @@ -8,6 +8,8 @@ else ifeq ($(CONFIG_ARCH_SOCFPGA_ARRIA5),y)
> +HANDOFF_KEEP ?= 0
> diff --git a/arch/arm/mach-socfpga/config.mk b/arch/arm/mach-socfpga/config.mk
> @@ -43,6 +45,27 @@ socfpga_g5_handoff_prepare:
> + if [ -n "$$HANDOFF_KEEP" ]; then \
HANDOFF_KEEP defaults to "0", so -n "0" is always true. I suspect you want:
if [ "$$HANDOFF_KEEP" != "0" ]; then \
Otherwise the 'preserve' path is always taken and the 'clean' path is dead code.
You could also have an empty variable meaning don't keep.
> diff --git a/arch/arm/mach-socfpga/config.mk b/arch/arm/mach-socfpga/config.mk
> @@ -43,6 +45,27 @@ socfpga_g5_handoff_prepare:
> + trap 'rm -rf "$$TEMP_DIR"' EXIT;
The trap is set after TEMP_DIR has already been used. If the python
script or mv fails partway through, the temporary directory won't be
cleaned up. You could move the trap to immediately after mktemp
Regards,
Simon
More information about the U-Boot
mailing list