diff mbox series

[PATHv2,9/9] Makefile: add dtbs to clean

Message ID 20231225153929.8284-10-maxim.uvarov@linaro.org
State New
Headers show
Series net fixes prior lwip | expand

Commit Message

Maxim Uvarov Dec. 25, 2023, 3:39 p.m. UTC
CI test checks that generated dtb has to be cleaned up.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Simon Glass Dec. 26, 2023, 9:50 a.m. UTC | #1
Hi Maxim,

On Mon, Dec 25, 2023 at 3:42 PM Maxim Uvarov <maxim.uvarov@linaro.org> wrote:
>
> CI test checks that generated dtb has to be cleaned up.
>
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 220411a293..ab603191ad 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -2165,7 +2165,8 @@ CLEAN_FILES += include/autoconf.mk* include/bmp_logo.h include/bmp_logo_data.h \
>                mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
>                itb.fit.fit itb.fit.itb itb.map spl.map mkimage-out.rom.mkimage \
>                mkimage.rom.mkimage mkimage-in-simple-bin* rom.map simple-bin* \
> -              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb
> +              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \
> +              ./*/*.dtb *.dtb
>
>  # Directories & files removed with 'make mrproper'
>  MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
> --
> 2.30.2
>

Shouldn't this be handled with CLEAN_FILES in arch/xxx/dts ?

Regards,
Simon
Maxim Uvarov Dec. 26, 2023, 12:27 p.m. UTC | #2
On Tue, 26 Dec 2023 at 15:50, Simon Glass <sjg@chromium.org> wrote:

> Hi Maxim,
>
> On Mon, Dec 25, 2023 at 3:42 PM Maxim Uvarov <maxim.uvarov@linaro.org>
> wrote:
> >
> > CI test checks that generated dtb has to be cleaned up.
> >
> > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> > ---
> >  Makefile | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Makefile b/Makefile
> > index 220411a293..ab603191ad 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -2165,7 +2165,8 @@ CLEAN_FILES += include/autoconf.mk*
> include/bmp_logo.h include/bmp_logo_data.h \
> >                mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
> >                itb.fit.fit itb.fit.itb itb.map spl.map
> mkimage-out.rom.mkimage \
> >                mkimage.rom.mkimage mkimage-in-simple-bin* rom.map
> simple-bin* \
> > -              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb
> > +              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \
> > +              ./*/*.dtb *.dtb
> >
> >  # Directories & files removed with 'make mrproper'
> >  MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
> > --
> > 2.30.2
> >
>
> Shouldn't this be handled with CLEAN_FILES in arch/xxx/dts ?
>
> Regards,
> Simon
>

I don't know. It looks like CLEAN_FILES is almost not used inside ./arch
directory. Only 1 place where it appears:

fgrep -r CLEAN_FILES ./arch/
./arch/arm/mach-rmobile/Makefile:CLEAN_FILES += u-boot-spl.scif

BR,
Maxim.
Tom Rini Dec. 26, 2023, 2:26 p.m. UTC | #3
On Tue, Dec 26, 2023 at 06:27:58PM +0600, Maxim Uvarov wrote:
> On Tue, 26 Dec 2023 at 15:50, Simon Glass <sjg@chromium.org> wrote:
> 
> > Hi Maxim,
> >
> > On Mon, Dec 25, 2023 at 3:42 PM Maxim Uvarov <maxim.uvarov@linaro.org>
> > wrote:
> > >
> > > CI test checks that generated dtb has to be cleaned up.
> > >
> > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> > > ---
> > >  Makefile | 3 ++-
> > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Makefile b/Makefile
> > > index 220411a293..ab603191ad 100644
> > > --- a/Makefile
> > > +++ b/Makefile
> > > @@ -2165,7 +2165,8 @@ CLEAN_FILES += include/autoconf.mk*
> > include/bmp_logo.h include/bmp_logo_data.h \
> > >                mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
> > >                itb.fit.fit itb.fit.itb itb.map spl.map
> > mkimage-out.rom.mkimage \
> > >                mkimage.rom.mkimage mkimage-in-simple-bin* rom.map
> > simple-bin* \
> > > -              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb
> > > +              idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \
> > > +              ./*/*.dtb *.dtb
> > >
> > >  # Directories & files removed with 'make mrproper'
> > >  MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
> > > --
> > > 2.30.2
> > >
> >
> > Shouldn't this be handled with CLEAN_FILES in arch/xxx/dts ?
> >
> > Regards,
> > Simon
> >
> 
> I don't know. It looks like CLEAN_FILES is almost not used inside ./arch
> directory. Only 1 place where it appears:
> 
> fgrep -r CLEAN_FILES ./arch/
> ./arch/arm/mach-rmobile/Makefile:CLEAN_FILES += u-boot-spl.scif

I see that our top-level clean target is missing dtb related targets
like the linux kernel has, and that's how this should be fixed.
Maxim Uvarov Dec. 26, 2023, 2:39 p.m. UTC | #4
On Tue, 26 Dec 2023 at 20:26, Tom Rini <trini@konsulko.com> wrote:

> On Tue, Dec 26, 2023 at 06:27:58PM +0600, Maxim Uvarov wrote:
> > On Tue, 26 Dec 2023 at 15:50, Simon Glass <sjg@chromium.org> wrote:
> >
> > > Hi Maxim,
> > >
> > > On Mon, Dec 25, 2023 at 3:42 PM Maxim Uvarov <maxim.uvarov@linaro.org>
> > > wrote:
> > > >
> > > > CI test checks that generated dtb has to be cleaned up.
> > > >
> > > > Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> > > > ---
> > > >  Makefile | 3 ++-
> > > >  1 file changed, 2 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/Makefile b/Makefile
> > > > index 220411a293..ab603191ad 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -2165,7 +2165,8 @@ CLEAN_FILES += include/autoconf.mk*
> > > include/bmp_logo.h include/bmp_logo_data.h \
> > > >                mkimage-out.spl.mkimage mkimage.spl.mkimage
> imx-boot.map \
> > > >                itb.fit.fit itb.fit.itb itb.map spl.map
> > > mkimage-out.rom.mkimage \
> > > >                mkimage.rom.mkimage mkimage-in-simple-bin* rom.map
> > > simple-bin* \
> > > > -              idbloader-spi.img lib/efi_loader/helloworld_efi.S
> *.itb
> > > > +              idbloader-spi.img lib/efi_loader/helloworld_efi.S
> *.itb \
> > > > +              ./*/*.dtb *.dtb
> > > >
> > > >  # Directories & files removed with 'make mrproper'
> > > >  MRPROPER_DIRS  += include/config include/generated spl tpl vpl \
> > > > --
> > > > 2.30.2
> > > >
> > >
> > > Shouldn't this be handled with CLEAN_FILES in arch/xxx/dts ?
> > >
> > > Regards,
> > > Simon
> > >
> >
> > I don't know. It looks like CLEAN_FILES is almost not used inside ./arch
> > directory. Only 1 place where it appears:
> >
> > fgrep -r CLEAN_FILES ./arch/
> > ./arch/arm/mach-rmobile/Makefile:CLEAN_FILES += u-boot-spl.scif
>
> I see that our top-level clean target is missing dtb related targets
> like the linux kernel has, and that's how this should be fixed.
>
> --
> Tom
>

If I understand right you just refers to kernel's top level Makefile
clean:
find
                -o -name '*.dtb' -o -name '*.dtbo' \

                -o -name '*.dtb.S' -o -name '*.dtbo.S' \
| xargs rm -rf

 I will fix it in that way in v3.

BR,
Maxim.
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 220411a293..ab603191ad 100644
--- a/Makefile
+++ b/Makefile
@@ -2165,7 +2165,8 @@  CLEAN_FILES += include/autoconf.mk* include/bmp_logo.h include/bmp_logo_data.h \
 	       mkimage-out.spl.mkimage mkimage.spl.mkimage imx-boot.map \
 	       itb.fit.fit itb.fit.itb itb.map spl.map mkimage-out.rom.mkimage \
 	       mkimage.rom.mkimage mkimage-in-simple-bin* rom.map simple-bin* \
-	       idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb
+	       idbloader-spi.img lib/efi_loader/helloworld_efi.S *.itb \
+	       ./*/*.dtb *.dtb
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include/generated spl tpl vpl \