* [PATCH v1] Improve handosff prepare on SoCFPGA @ 2026-04-11 17:27 Brian Sune 2026-04-20 5:02 ` Chee, Tien Fong 0 siblings, 1 reply; 3+ messages in thread From: Brian Sune @ 2026-04-11 17:27 UTC (permalink / raw) To: u-boot, Tom Rini; +Cc: Brian Sune 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@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 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] Improve handosff prepare on SoCFPGA 2026-04-11 17:27 [PATCH v1] Improve handosff prepare on SoCFPGA Brian Sune @ 2026-04-20 5:02 ` Chee, Tien Fong 2026-04-20 5:30 ` Sune Brian 0 siblings, 1 reply; 3+ messages in thread From: Chee, Tien Fong @ 2026-04-20 5:02 UTC (permalink / raw) To: Brian Sune, u-boot, Tom Rini Hi Brian, On 12/4/2026 1:27 am, Brian Sune wrote: > 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@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; \ Thanks for tackling stale qts/*.h when the BSP generator does not refresh outputs. Concern: the series deletes existing board/.../qts/*.h before running cv_bsp_generator.py, while the recipe still continues on generator failure (|| … continuing). If Python fails or produces no headers, the tree can be left without the previous QTS headers but the build still proceeds, that is a regression risk. Nits: rm -r …/*.h on plain files is unusual; rm -f is clearer. Suggestion: generate into a temporary directory (e.g. mktemp -d under qts/), and only replace existing *.h after a successful run (optionally copy the old set to qts/.handoff_backup.<timestamp>/ first for diff). That keeps the “stale vs new” comparison you want without breaking builds when generation fails. Best regards, Tien Fong ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] Improve handosff prepare on SoCFPGA 2026-04-20 5:02 ` Chee, Tien Fong @ 2026-04-20 5:30 ` Sune Brian 0 siblings, 0 replies; 3+ messages in thread From: Sune Brian @ 2026-04-20 5:30 UTC (permalink / raw) To: Chee, Tien Fong; +Cc: u-boot, Tom Rini On Mon, Apr 20, 2026 at 1:02 PM Chee, Tien Fong <tien.fong.chee@altera.com> wrote: > > Hi Brian, > > > On 12/4/2026 1:27 am, Brian Sune wrote: > > 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@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; \ > > > Thanks for tackling stale qts/*.h when the BSP generator does not refresh outputs. > Hi T.F., The idea was intended for the preparation phase, not the build phase. aka > make prepare So if the preparation phase is having issues, users should take care before cont'd. As handoff script originally is a preparation not build operation. However, I think it is better to do a file check after py script. > Concern: the series deletes existing board/.../qts/*.h before running cv_bsp_generator.py, while the recipe still continues on generator failure (|| … continuing). If Python fails or produces no headers, the tree can be left without the previous QTS headers but the build still proceeds, that is a regression risk. > You are right I included an extra repeat flag on file rm. Bad habit on -r on very things. > Nits: rm -r …/*.h on plain files is unusual; rm -f is clearer. > > Suggestion: generate into a temporary directory (e.g. mktemp -d under qts/), and only replace existing *.h after a successful run (optionally copy the old set to qts/.handoff_backup.<timestamp>/ first for diff). That keeps the “stale vs new” comparison you want without breaking builds when generation fails. Release a 2nd patch on both modifications. Thanks, Brian > Best regards, > > Tien Fong ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-20 5:30 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-04-11 17:27 [PATCH v1] Improve handosff prepare on SoCFPGA Brian Sune 2026-04-20 5:02 ` Chee, Tien Fong 2026-04-20 5:30 ` Sune Brian
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.