diff mbox series

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

Message ID 20210819192802.2151226-2-festevam@denx.de
State Superseded
Delegated to: Stefano Babic
Headers show
Series [v3,1/2] imx8mm-evk: Generate a single bootable flash.bin again | expand

Commit Message

Fabio Estevam Aug. 19, 2021, 7:28 p.m. UTC
Clean the binaries generated by binman on imx8mm-evk:
spl.* mkimage*.mkimage imx-boot.*

Reported-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
Changes since v2:
- None. Newly introducedin this series.

 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Heiko Thiery Aug. 20, 2021, 5:34 a.m. UTC | #1
Hi Fabio,

Am Do., 19. Aug. 2021 um 21:28 Uhr schrieb Fabio Estevam <festevam@denx.de>:
>
> Clean the binaries generated by binman on imx8mm-evk:
> spl.* mkimage*.mkimage imx-boot.*
>
> Reported-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> Signed-off-by: Fabio Estevam <festevam@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 Thiery Aug. 20, 2021, 6:52 a.m. UTC | #2
Hi,

Am Fr., 20. Aug. 2021 um 07:34 Uhr schrieb Heiko Thiery
<heiko.thiery@gmail.com>:
>
> Hi Fabio,
>
> Am Do., 19. Aug. 2021 um 21:28 Uhr schrieb Fabio Estevam <festevam@denx.de>:
> >
> > Clean the binaries generated by binman on imx8mm-evk:
> > spl.* mkimage*.mkimage imx-boot.*
> >
> > Reported-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> > Signed-off-by: Fabio Estevam <festevam@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

While looking at it a second time, I noticed that itb.fit.fit and
itb.fit.itb were also created by binman.
diff mbox series

Patch

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.*
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl \