[PATCH v4] Improve handoff prepare on SoCFPGA
Simon Glass
sjg at chromium.org
Wed Apr 22 04:54:31 CEST 2026
Hi Brian,
On 2026-04-21T00:47:19, Sune Brian <briansune at gmail.com> wrote:
> Improve handoff prepare on SoCFPGA
>
> There are some cases that the Python scripts
> are run and the qts files are not replaced.
>
> This patch introduces:
> 1) TMP folder for Python script
> 2) TMP folder will automatically remove on exit
> 3) If PY script fails, the replace will not conduct.
> 4) Only when PY script passed the replace with keep
> or without keep will be done via NEW HANDOFF_KEEP=xxx
> 5) When keep is selected the old files are renamed to
> xxx.h.handoff.<timestamp>
>
> As such this ensure qts folder h files are properly
> updated.
>
> Signed-off-by: Brian Sune <briansune at gmail.com>
>
> arch/arm/mach-socfpga/config.mk | 27 ++++++++++++++++++++++++---
> 1 file changed, 24 insertions(+), 3 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
Some thoughts though.
We try to add a change log for each revision and use imperative
present tense (Introduce a temp folder... rather than This patch
introduces...). Spell out Python script rather than PY script, and
reword as prose or a bullet list instead of 1), 2), ... You could also
explain *why* the qts files were sometimes not being replaced - the
motivation paragraph currently just says some cases without saying
what goes wrong.
The message says kept files are renamed to xxx.h.handoff.<timestamp>
but the code uses .h.handoff_backup.<timestamp> - they should match.
> diff --git a/arch/arm/mach-socfpga/config.mk b/arch/arm/mach-socfpga/config.mk
> @@ -43,6 +43,27 @@ socfpga_g5_handoff_prepare:
> + if [ -n '$${HANDOFF_KEEP+x}' ] && [ '$${HANDOFF_KEEP:-1}' != '0' ]; then \
How about:
if [ '$${HANDOFF_KEEP:-0}' != '0' ] ; then \
Regards,
Simon
More information about the U-Boot
mailing list