[PATCH v3 2/2] Makefile: Clean the i.MX8MM artifacts

Heiko Thiery heiko.thiery at gmail.com
Fri Aug 20 07:34:49 CEST 2021


Hi Fabio,

Am Do., 19. Aug. 2021 um 21:28 Uhr schrieb Fabio Estevam <festevam at denx.de>:
>
> Clean the binaries generated by binman on imx8mm-evk:
> spl.* mkimage*.mkimage imx-boot.*
>
> Reported-by: Frieder Schrempf <frieder.schrempf at kontron.de>
> Signed-off-by: Fabio Estevam <festevam at denx.de>
> ---
> Changes since v2:
> - None. Newly introducedin this series.
>
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 3c8437d21a..7096fdf895 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2095,7 +2095,8 @@ CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \
>                boot* u-boot* MLO* SPL System.map fit-dtb.blob* \
>                u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \
>                lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \
> -              idbloader.img flash.bin flash.log defconfig keep-syms-lto.c
> +              idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \
> +              spl.* mkimage*.mkimage imx-boot.*

it might be useful to use one variable for all BINMAN clean files.
Otherwise it is difficult to understand by whom the files were
created.

Something like that:

--- a/Makefile
+++ b/Makefile
@@ -2091,12 +2091,14 @@ CLEAN_DIRS  += $(MODVERDIR) \
               $(foreach d, spl tpl, $(patsubst %,$d/%, \
                        $(filter-out include, $(shell ls -1 $d 2>/dev/null))))

+BINMAN_CLEAN_FILES = spl.* mkimage*.mkimage
+
 CLEAN_FILES += include/bmp_logo.h include/bmp_logo_data.h tools/version.h \
               boot* u-boot* MLO* SPL System.map fit-dtb.blob* \
               u-boot-ivt.img.log u-boot-dtb.imx.log SPL.log u-boot.imx.log \
               lpc32xx-* bl31.c bl31.elf bl31_*.bin image.map tispl.bin* \
               idbloader.img flash.bin flash.log defconfig keep-syms-lto.c \
-              spl.* mkimage*.mkimage imx-boot.*
+              imx-boot.* $(BINMAN_CLEAN_FILES)
+


I had the idea, if binman could create a list with the created files.
This could then be used to set the files to be deleted. I think of
other users where the output files have a different name. Then the
files could be deleted "automatically" with clean.

-- 
Heiko


More information about the U-Boot mailing list