LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
@ 2018-03-15 15:37 Arnd Bergmann
2018-03-16 1:39 ` Frank.Rowand
0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2018-03-15 15:37 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Arnd Bergmann, David Airlie, Niklas Söderlund, Frank Rowand,
dri-devel, linux-renesas-soc, linux-kernel
The *.dtb and *.dtb.S files get removed by 'make' during the build process,
and later seem to be missed during the 'modpost' stage:
rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
WARNING: could not open drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or directory
As a workaround, this adds all those files to the 'extra-y' target list,
but that's really ugly. Any ideas for a better fix?
Fixes: 81c0e3dd8292 ("drm: rcar-du: Fix legacy DT to create LVDS encoder nodes")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpu/drm/rcar-du/Makefile | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/rcar-du/Makefile b/drivers/gpu/drm/rcar-du/Makefile
index 3e58ed93d5b1..e5fc6ec0b8cc 100644
--- a/drivers/gpu/drm/rcar-du/Makefile
+++ b/drivers/gpu/drm/rcar-du/Makefile
@@ -12,6 +12,21 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS) += rcar_du_of.o \
rcar_du_of_lvds_r8a7793.dtb.o \
rcar_du_of_lvds_r8a7795.dtb.o \
rcar_du_of_lvds_r8a7796.dtb.o
+
+extra-y += rcar_du_of_lvds_r8a7790.dtb \
+ rcar_du_of_lvds_r8a7790.dtb \
+ rcar_du_of_lvds_r8a7791.dtb \
+ rcar_du_of_lvds_r8a7793.dtb \
+ rcar_du_of_lvds_r8a7795.dtb \
+ rcar_du_of_lvds_r8a7796.dtb
+
+extra-y += rcar_du_of_lvds_r8a7790.dtb.S \
+ rcar_du_of_lvds_r8a7790.dtb.S \
+ rcar_du_of_lvds_r8a7791.dtb.S \
+ rcar_du_of_lvds_r8a7793.dtb.S \
+ rcar_du_of_lvds_r8a7795.dtb.S \
+ rcar_du_of_lvds_r8a7796.dtb.S
+
rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o
obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o
--
2.9.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-15 15:37 [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build Arnd Bergmann
@ 2018-03-16 1:39 ` Frank.Rowand
2018-03-16 8:25 ` Arnd Bergmann
2018-03-22 14:26 ` Geert Uytterhoeven
0 siblings, 2 replies; 12+ messages in thread
From: Frank.Rowand @ 2018-03-16 1:39 UTC (permalink / raw)
To: arnd, laurent.pinchart
Cc: airlied, niklas.soderlund+renesas, dri-devel, linux-renesas-soc,
linux-kernel, frowand.list
On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann [mailto:arnd@arndb.de] wrote:
>
> The *.dtb and *.dtb.S files get removed by 'make' during the build
> process,
> and later seem to be missed during the 'modpost' stage:
>
> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
> WARNING: could not open
> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
> directory
>
> As a workaround, this adds all those files to the 'extra-y' target list,
> but that's really ugly. Any ideas for a better fix?
Does this work for you (untested, but the way it is done in
drivers/of/unittest-data/Makefile):
.PRECIOUS: \
$(obj)/%.dtb.S \
$(obj)/%.dtb
-Frank
>
> Fixes: 81c0e3dd8292 ("drm: rcar-du: Fix legacy DT to create LVDS encoder
> nodes")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> drivers/gpu/drm/rcar-du/Makefile | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/rcar-du/Makefile
> b/drivers/gpu/drm/rcar-du/Makefile
> index 3e58ed93d5b1..e5fc6ec0b8cc 100644
> --- a/drivers/gpu/drm/rcar-du/Makefile
> +++ b/drivers/gpu/drm/rcar-du/Makefile
> @@ -12,6 +12,21 @@ rcar-du-drm-$(CONFIG_DRM_RCAR_LVDS) += rcar_du_of.o \
> rcar_du_of_lvds_r8a7793.dtb.o
> \
> rcar_du_of_lvds_r8a7795.dtb.o
> \
> rcar_du_of_lvds_r8a7796.dtb.o
> +
> +extra-y +=
> rcar_du_of_lvds_r8a7790.dtb \
> + rcar_du_of_lvds_r8a7790.dtb \
> + rcar_du_of_lvds_r8a7791.dtb \
> + rcar_du_of_lvds_r8a7793.dtb \
> + rcar_du_of_lvds_r8a7795.dtb \
> + rcar_du_of_lvds_r8a7796.dtb
> +
> +extra-y +=
> rcar_du_of_lvds_r8a7790.dtb.S \
> + rcar_du_of_lvds_r8a7790.dtb.S
> \
> + rcar_du_of_lvds_r8a7791.dtb.S
> \
> + rcar_du_of_lvds_r8a7793.dtb.S
> \
> + rcar_du_of_lvds_r8a7795.dtb.S
> \
> + rcar_du_of_lvds_r8a7796.dtb.S
> +
> rcar-du-drm-$(CONFIG_DRM_RCAR_VSP) += rcar_du_vsp.o
>
> obj-$(CONFIG_DRM_RCAR_DU) += rcar-du-drm.o
> --
> 2.9.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-16 1:39 ` Frank.Rowand
@ 2018-03-16 8:25 ` Arnd Bergmann
2018-03-20 13:15 ` Laurent Pinchart
2018-03-22 14:26 ` Geert Uytterhoeven
1 sibling, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2018-03-16 8:25 UTC (permalink / raw)
To: Frank.Rowand
Cc: Laurent Pinchart, David Airlie, niklas.soderlund+renesas,
dri-devel, Linux-Renesas, Linux Kernel Mailing List,
Frank Rowand
On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
> On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann [mailto:arnd@arndb.de] wrote:
>>
>> The *.dtb and *.dtb.S files get removed by 'make' during the build
>> process,
>> and later seem to be missed during the 'modpost' stage:
>>
>> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>> WARNING: could not open
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>> directory
>>
>> As a workaround, this adds all those files to the 'extra-y' target list,
>> but that's really ugly. Any ideas for a better fix?
>
> Does this work for you (untested, but the way it is done in
> drivers/of/unittest-data/Makefile):
>
> .PRECIOUS: \
> $(obj)/%.dtb.S \
> $(obj)/%.dtb
Yes, that works and looks much better than my version.
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-16 8:25 ` Arnd Bergmann
@ 2018-03-20 13:15 ` Laurent Pinchart
2018-03-21 7:38 ` Arnd Bergmann
0 siblings, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2018-03-20 13:15 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Frank.Rowand, David Airlie, niklas.soderlund+renesas, dri-devel,
Linux-Renesas, Linux Kernel Mailing List, Frank Rowand
Hi Arnd,
On Friday, 16 March 2018 10:25:25 EET Arnd Bergmann wrote:
> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
> >> process,
> >> and later seem to be missed during the 'modpost' stage:
> >>
> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
> >> WARNING: could not open
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
> >> directory
> >>
> >> As a workaround, this adds all those files to the 'extra-y' target list,
> >> but that's really ugly. Any ideas for a better fix?
> >
> > Does this work for you (untested, but the way it is done in
> > drivers/of/unittest-data/Makefile):
> >
> > .PRECIOUS: \
> >
> > $(obj)/%.dtb.S \
> > $(obj)/%.dtb
>
> Yes, that works and looks much better than my version.
Thank you for your patch, and sorry for breaking the build. Do you plan to
submit a new version based on Frank's approach ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-20 13:15 ` Laurent Pinchart
@ 2018-03-21 7:38 ` Arnd Bergmann
2018-03-21 9:58 ` Laurent Pinchart
0 siblings, 1 reply; 12+ messages in thread
From: Arnd Bergmann @ 2018-03-21 7:38 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Frank.Rowand, David Airlie, niklas.soderlund+renesas, dri-devel,
Linux-Renesas, Linux Kernel Mailing List, Frank Rowand
On Tue, Mar 20, 2018 at 9:15 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi Arnd,
>
> On Friday, 16 March 2018 10:25:25 EET Arnd Bergmann wrote:
>> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
>> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
>> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
>> >> process,
>> >> and later seem to be missed during the 'modpost' stage:
>> >>
>> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>> >> WARNING: could not open
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>> >> directory
>> >>
>> >> As a workaround, this adds all those files to the 'extra-y' target list,
>> >> but that's really ugly. Any ideas for a better fix?
>> >
>> > Does this work for you (untested, but the way it is done in
>> > drivers/of/unittest-data/Makefile):
>> >
>> > .PRECIOUS: \
>> >
>> > $(obj)/%.dtb.S \
>> > $(obj)/%.dtb
>>
>> Yes, that works and looks much better than my version.
>
> Thank you for your patch, and sorry for breaking the build. Do you plan to
> submit a new version based on Frank's approach ?
I'm currently at Linaro Connect and won't be able to send a tested patch
before mid next week. If you want it earlier, feel free to apply that patch
with my original description and 'Reported-by: Arnd Bergmann <arnd@arndb.de>'.
Arnd
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-21 7:38 ` Arnd Bergmann
@ 2018-03-21 9:58 ` Laurent Pinchart
0 siblings, 0 replies; 12+ messages in thread
From: Laurent Pinchart @ 2018-03-21 9:58 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Frank.Rowand, David Airlie, niklas.soderlund+renesas, dri-devel,
Linux-Renesas, Linux Kernel Mailing List, Frank Rowand
Hi Arnd,
On Wednesday, 21 March 2018 09:38:35 EET Arnd Bergmann wrote:
> On Tue, Mar 20, 2018 at 9:15 PM, Laurent Pinchart wrote:
> > On Friday, 16 March 2018 10:25:25 EET Arnd Bergmann wrote:
> >> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
> >>> On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
> >>>> The *.dtb and *.dtb.S files get removed by 'make' during the build
> >>>> process, and later seem to be missed during the 'modpost' stage:
> >>>>
> >>>> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
> >>>> WARNING: could not open
> >>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
> >>>> directory
> >>>>
> >>>> As a workaround, this adds all those files to the 'extra-y' target
> >>>> list, but that's really ugly. Any ideas for a better fix?
> >>>
> >>> Does this work for you (untested, but the way it is done in
> >>> drivers/of/unittest-data/Makefile):
> >>>
> >>> .PRECIOUS: \
> >>> $(obj)/%.dtb.S \
> >>> $(obj)/%.dtb
> >>
> >> Yes, that works and looks much better than my version.
> >
> > Thank you for your patch, and sorry for breaking the build. Do you plan to
> > submit a new version based on Frank's approach ?
>
> I'm currently at Linaro Connect and won't be able to send a tested patch
> before mid next week. If you want it earlier, feel free to apply that patch
> with my original description and 'Reported-by: Arnd Bergmann
> <arnd@arndb.de>'.
I was about to do so, but realized I can't reproduce the problem here. If you
don't mind I'll let you submit a v2. Alternatively I can work on it if you
give me instruction to reproduce the issue.
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-16 1:39 ` Frank.Rowand
2018-03-16 8:25 ` Arnd Bergmann
@ 2018-03-22 14:26 ` Geert Uytterhoeven
2018-03-22 14:50 ` Laurent Pinchart
2018-03-24 1:31 ` Frank Rowand
1 sibling, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-03-22 14:26 UTC (permalink / raw)
To: Frank.Rowand
Cc: Arnd Bergmann, Laurent Pinchart, David Airlie,
Niklas Söderlund, DRI Development, Linux-Renesas,
Linux Kernel Mailing List, Frank Rowand
Hi Frank,
On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
> On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann [mailto:arnd@arndb.de] wrote:
>>
>> The *.dtb and *.dtb.S files get removed by 'make' during the build
>> process,
>> and later seem to be missed during the 'modpost' stage:
>>
>> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>> WARNING: could not open
>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>> directory
>>
>> As a workaround, this adds all those files to the 'extra-y' target list,
>> but that's really ugly. Any ideas for a better fix?
>
> Does this work for you (untested, but the way it is done in
> drivers/of/unittest-data/Makefile):
>
> .PRECIOUS: \
> $(obj)/%.dtb.S \
> $(obj)/%.dtb
Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
to make dtb.S, like is done for other precious objects?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-22 14:26 ` Geert Uytterhoeven
@ 2018-03-22 14:50 ` Laurent Pinchart
2018-03-22 15:13 ` Geert Uytterhoeven
2018-03-24 1:31 ` Frank Rowand
1 sibling, 1 reply; 12+ messages in thread
From: Laurent Pinchart @ 2018-03-22 14:50 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Frank.Rowand, Arnd Bergmann, David Airlie, Niklas Söderlund,
DRI Development, Linux-Renesas, Linux Kernel Mailing List,
Frank Rowand
Hi Geert,
On Thursday, 22 March 2018 16:26:22 EET Geert Uytterhoeven wrote:
> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
> >> process, and later seem to be missed during the 'modpost' stage:
> >>
> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
> >> WARNING: could not open
> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
> >> directory
> >>
> >> As a workaround, this adds all those files to the 'extra-y' target list,
> >> but that's really ugly. Any ideas for a better fix?
> >
> > Does this work for you (untested, but the way it is done in
> > drivers/of/unittest-data/Makefile):
> >
> > .PRECIOUS: \
> >
> > $(obj)/%.dtb.S \
> > $(obj)/%.dtb
>
> Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
> to make dtb.S, like is done for other precious objects?
Without any implied acknowledgment that keeping those intermediate files is
the right solution (I don't claim to master the kernel build system), I think
such a rule would indeed be better in a core Makefile, as the rules to build
the .dtb.o file comes from the core too. Could another option be to create a
rule to compile a .dtb.o from the .dts file directly without going through
intermediate files that will be removed automatically ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-22 14:50 ` Laurent Pinchart
@ 2018-03-22 15:13 ` Geert Uytterhoeven
2018-03-22 17:47 ` Masahiro Yamada
2018-03-23 13:27 ` Masahiro Yamada
0 siblings, 2 replies; 12+ messages in thread
From: Geert Uytterhoeven @ 2018-03-22 15:13 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Frank.Rowand, Arnd Bergmann, David Airlie, Niklas Söderlund,
DRI Development, Linux-Renesas, Linux Kernel Mailing List,
Frank Rowand, Masahiro Yamada
Hi Laurent,
CC Yamada-san
On Thu, Mar 22, 2018 at 3:50 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Thursday, 22 March 2018 16:26:22 EET Geert Uytterhoeven wrote:
>> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
>> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
>> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
>> >> process, and later seem to be missed during the 'modpost' stage:
>> >>
>> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>> >> WARNING: could not open
>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>> >> directory
>> >>
>> >> As a workaround, this adds all those files to the 'extra-y' target list,
>> >> but that's really ugly. Any ideas for a better fix?
>> >
>> > Does this work for you (untested, but the way it is done in
>> > drivers/of/unittest-data/Makefile):
>> >
>> > .PRECIOUS: \
>> >
>> > $(obj)/%.dtb.S \
>> > $(obj)/%.dtb
>>
>> Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
>> to make dtb.S, like is done for other precious objects?
>
> Without any implied acknowledgment that keeping those intermediate files is
> the right solution (I don't claim to master the kernel build system), I think
Me neither, but I think it is.
Cfr. .y => .tab.c => .tab.o with .tab.c marked PRECIOUS.
> such a rule would indeed be better in a core Makefile, as the rules to build
> the .dtb.o file comes from the core too. Could another option be to create a
> rule to compile a .dtb.o from the .dts file directly without going through
> intermediate files that will be removed automatically ?
Such a rules needs to execute two commands, which is more tricky, considering
error handling.
It's easier (to get right) to have two separate rules, and let make chain them
automatically.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-22 15:13 ` Geert Uytterhoeven
@ 2018-03-22 17:47 ` Masahiro Yamada
2018-03-23 13:27 ` Masahiro Yamada
1 sibling, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-03-22 17:47 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Laurent Pinchart, Frank.Rowand, Arnd Bergmann, David Airlie,
Niklas Söderlund, DRI Development, Linux-Renesas,
Linux Kernel Mailing List, Frank Rowand
2018-03-23 0:13 GMT+09:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> Hi Laurent,
>
> CC Yamada-san
>
> On Thu, Mar 22, 2018 at 3:50 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>> On Thursday, 22 March 2018 16:26:22 EET Geert Uytterhoeven wrote:
>>> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
>>> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
>>> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
>>> >> process, and later seem to be missed during the 'modpost' stage:
>>> >>
>>> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>>> >> WARNING: could not open
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>>> >> directory
>>> >>
>>> >> As a workaround, this adds all those files to the 'extra-y' target list,
>>> >> but that's really ugly. Any ideas for a better fix?
>>> >
>>> > Does this work for you (untested, but the way it is done in
>>> > drivers/of/unittest-data/Makefile):
>>> >
>>> > .PRECIOUS: \
>>> >
>>> > $(obj)/%.dtb.S \
>>> > $(obj)/%.dtb
>>>
>>> Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
>>> to make dtb.S, like is done for other precious objects?
>>
>> Without any implied acknowledgment that keeping those intermediate files is
>> the right solution (I don't claim to master the kernel build system), I think
>
> Me neither, but I think it is.
>
> Cfr. .y => .tab.c => .tab.o with .tab.c marked PRECIOUS.
>
>> such a rule would indeed be better in a core Makefile, as the rules to build
>> the .dtb.o file comes from the core too. Could another option be to create a
>> rule to compile a .dtb.o from the .dts file directly without going through
>> intermediate files that will be removed automatically ?
>
> Such a rules needs to execute two commands, which is more tricky, considering
> error handling.
> It's easier (to get right) to have two separate rules, and let make chain them
> automatically.
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds
This has been in my TODO list for a while,
but I have not had time to finish it.
Some people use .PRECIOUS to suppress file removal,
but it is wrong IMO.
.SECONDARY is the right one, but one problem is,
this does not work with pattern rules.
I will send a patch soon for the core improvement.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-22 15:13 ` Geert Uytterhoeven
2018-03-22 17:47 ` Masahiro Yamada
@ 2018-03-23 13:27 ` Masahiro Yamada
1 sibling, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-03-23 13:27 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Laurent Pinchart, Frank.Rowand, Arnd Bergmann, David Airlie,
Niklas Söderlund, DRI Development, Linux-Renesas,
Linux Kernel Mailing List, Frank Rowand
2018-03-23 0:13 GMT+09:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> Hi Laurent,
>
> CC Yamada-san
>
> On Thu, Mar 22, 2018 at 3:50 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>> On Thursday, 22 March 2018 16:26:22 EET Geert Uytterhoeven wrote:
>>> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
>>> > On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann wrote:
>>> >> The *.dtb and *.dtb.S files get removed by 'make' during the build
>>> >> process, and later seem to be missed during the 'modpost' stage:
>>> >>
>>> >> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>>> >> WARNING: could not open
>>> >> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>>> >> directory
>>> >>
>>> >> As a workaround, this adds all those files to the 'extra-y' target list,
>>> >> but that's really ugly. Any ideas for a better fix?
>>> >
>>> > Does this work for you (untested, but the way it is done in
>>> > drivers/of/unittest-data/Makefile):
>>> >
>>> > .PRECIOUS: \
>>> >
>>> > $(obj)/%.dtb.S \
>>> > $(obj)/%.dtb
>>>
>>> Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
>>> to make dtb.S, like is done for other precious objects?
>>
>> Without any implied acknowledgment that keeping those intermediate files is
>> the right solution (I don't claim to master the kernel build system), I think
>
> Me neither, but I think it is.
>
> Cfr. .y => .tab.c => .tab.o with .tab.c marked PRECIOUS.
>
>> such a rule would indeed be better in a core Makefile, as the rules to build
>> the .dtb.o file comes from the core too. Could another option be to create a
>> rule to compile a .dtb.o from the .dts file directly without going through
>> intermediate files that will be removed automatically ?
>
> Such a rules needs to execute two commands, which is more tricky, considering
> error handling.
> It's easier (to get right) to have two separate rules, and let make chain them
> automatically.
>
> Gr{oetje,eeting}s,
>
> Geert
>
I submit the patches.
I'd like to queue them up for the next merge window,
so your problems will be fixed if Kbuild pull requests are pulled.
The driver Makefile has two problems.
[1] Objects are always rebuilt due to missing 'targets'
[2] Intermediate files are removed due to missing .SECONDARY (or .PRECIOUS)
If you want to fix them by yourself, you can.
But, those issues will be taken care of by the core Makefile.
Specifically, [1] will be fixed by
https://patchwork.kernel.org/patch/10304671/
and [2] by
https://patchwork.kernel.org/patch/10304651/
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build
2018-03-22 14:26 ` Geert Uytterhoeven
2018-03-22 14:50 ` Laurent Pinchart
@ 2018-03-24 1:31 ` Frank Rowand
1 sibling, 0 replies; 12+ messages in thread
From: Frank Rowand @ 2018-03-24 1:31 UTC (permalink / raw)
To: Geert Uytterhoeven, Frank.Rowand
Cc: Arnd Bergmann, Laurent Pinchart, David Airlie,
Niklas Söderlund, DRI Development, Linux-Renesas,
Linux Kernel Mailing List
Hi Geert,
On 03/22/18 07:26, Geert Uytterhoeven wrote:
> Hi Frank,
>
> On Fri, Mar 16, 2018 at 2:39 AM, <Frank.Rowand@sony.com> wrote:
>> On Thursday, March 15, 2018 8:37 AM, Arnd Bergmann [mailto:arnd@arndb.de] wrote:
>>>
>>> The *.dtb and *.dtb.S files get removed by 'make' during the build
>>> process,
>>> and later seem to be missed during the 'modpost' stage:
>>>
>>> rm drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7791.dtb.S
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7795.dtb.S
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7796.dtb.S
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7793.dtb.S
>>> WARNING: could not open
>>> drivers/gpu/drm/rcar-du/rcar_du_of_lvds_r8a7790.dtb.S: No such file or
>>> directory
>>>
>>> As a workaround, this adds all those files to the 'extra-y' target list,
>>> but that's really ugly. Any ideas for a better fix?
>>
>> Does this work for you (untested, but the way it is done in
>> drivers/of/unittest-data/Makefile):
>>
>> .PRECIOUS: \
>> $(obj)/%.dtb.S \
>> $(obj)/%.dtb
>
> Shouldn't that just be moved to scripts/Makefile.lib, just above the rule
> to make dtb.S, like is done for other precious objects?
>
> Gr{oetje,eeting}s,
>
> Geert
>
Thank you for adding Yamada-san (later in this thread).
I acked his patch series that does what you suggest.
-Frank
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2018-03-24 1:31 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-15 15:37 [PATCH] [RFC] drm: rcar-du: keep temporary dtb files around during build Arnd Bergmann
2018-03-16 1:39 ` Frank.Rowand
2018-03-16 8:25 ` Arnd Bergmann
2018-03-20 13:15 ` Laurent Pinchart
2018-03-21 7:38 ` Arnd Bergmann
2018-03-21 9:58 ` Laurent Pinchart
2018-03-22 14:26 ` Geert Uytterhoeven
2018-03-22 14:50 ` Laurent Pinchart
2018-03-22 15:13 ` Geert Uytterhoeven
2018-03-22 17:47 ` Masahiro Yamada
2018-03-23 13:27 ` Masahiro Yamada
2018-03-24 1:31 ` Frank Rowand
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).