1
0
mirror of https://xff.cz/git/u-boot/ synced 2026-01-25 04:35:22 +01:00

mach-imx: do not use if_changed more than once per target

doc/develop/makefiles.rst has the following note:

  if_changed should not be used more than once per target.
  It stores the executed command in a corresponding .cmd
  file and multiple calls would result in overwrites and
  unwanted results when the target is up to date and only the
  tests on changed commands trigger execution of commands.

The mach-imx Makefile does not follow this recommandation, so fix it
by implementing a single command that performs both the cpp_cfg
and imx9_check actions.

This change fixes an issue with "tools/buildman/buildman imx8ulp_evk"
failing every other time [1].

[1] https://lists.denx.de/pipermail/u-boot/2024-August/563192.html

Fixes: f637dfe8c4 ("mach-imx: Add i.MX93 binman support.")
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
This commit is contained in:
Jerome Forissier
2024-08-28 17:36:37 +02:00
committed by Fabio Estevam
parent ee2af844ba
commit aec0015a52

View File

@@ -217,8 +217,8 @@ endif
ifeq ($(CONFIG_ARCH_IMX9)$(CONFIG_ARCH_IMX8ULP), y)
quiet_cmd_imx9_check = CHECK $@
cmd_imx9_check = $(srctree)/tools/imx9_image.sh $@
quiet_cmd_cpp_cfg_imx9_check = CHECK $@
cmd_cpp_cfg_imx9_check = $(CPP) $(cpp_flags) -D__ASSEMBLY__ -x c -o $@ $< && $(srctree)/tools/imx9_image.sh $@
SPL: spl/u-boot-spl.bin spl/u-boot-spl.cfgout u-boot-container.cfgout FORCE
@@ -227,15 +227,13 @@ flash.bin: MKIMAGEOUTPUT = flash.log
spl/u-boot-spl.cfgout: $(IMX_CONFIG) FORCE
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cpp_cfg)
$(call if_changed,imx9_check)
$(call if_changed_dep,cpp_cfg_imx9_check)
spl/u-boot-spl-ddr.bin: spl/u-boot-spl.bin spl/u-boot-spl.cfgout FORCE
u-boot-container.cfgout: $(IMX_CONTAINER_CFG) FORCE
$(Q)mkdir -p $(dir $@)
$(call if_changed_dep,cpp_cfg)
$(call if_changed,imx9_check)
$(call if_changed_dep,cpp_cfg_imx9_check)
flash.bin: spl/u-boot-spl-ddr.bin container.cfgout FORCE
$(call if_changed,mkimage)