* [PATCH] powerpc/boot: Fix build of dts/fsl
@ 2020-12-15 3:29 Michael Ellerman
2020-12-15 18:02 ` Masahiro Yamada
2020-12-22 13:11 ` Michael Ellerman
0 siblings, 2 replies; 5+ messages in thread
From: Michael Ellerman @ 2020-12-15 3:29 UTC (permalink / raw)
To: masahiroy; +Cc: linuxppc-dev
The lkp robot reported that some configs fail to build, for example
mpc85xx_smp_defconfig, with:
cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory
This bisects to:
cc8a51ca6f05 ("kbuild: always create directories of targets")
Although that commit claims to be about in-tree builds, it somehow
breaks out-of-tree builds. But presumably it's just exposing a latent
bug in our Makefiles.
We can fix it by adding to targets for dts/fsl in the same way that we
do for dts.
Fixes: cc8a51ca6f05 ("kbuild: always create directories of targets")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/boot/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 68a7534454cd..c3e084cceaed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -372,6 +372,8 @@ initrd-y := $(filter-out $(image-y), $(initrd-y))
targets += $(image-y) $(initrd-y)
targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \
$(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y))))
+targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \
+ $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(image-y))))
$(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] powerpc/boot: Fix build of dts/fsl 2020-12-15 3:29 [PATCH] powerpc/boot: Fix build of dts/fsl Michael Ellerman @ 2020-12-15 18:02 ` Masahiro Yamada 2020-12-16 2:41 ` Michael Ellerman 2020-12-22 13:11 ` Michael Ellerman 1 sibling, 1 reply; 5+ messages in thread From: Masahiro Yamada @ 2020-12-15 18:02 UTC (permalink / raw) To: Michael Ellerman; +Cc: linuxppc-dev On Tue, Dec 15, 2020 at 12:29 PM Michael Ellerman <mpe@ellerman.id.au> wrote: > > The lkp robot reported that some configs fail to build, for example > mpc85xx_smp_defconfig, with: > > cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory > > This bisects to: > cc8a51ca6f05 ("kbuild: always create directories of targets") > > Although that commit claims to be about in-tree builds, it somehow > breaks out-of-tree builds. But presumably it's just exposing a latent > bug in our Makefiles. > > We can fix it by adding to targets for dts/fsl in the same way that we > do for dts. > > Fixes: cc8a51ca6f05 ("kbuild: always create directories of targets") > Reported-by: kernel test robot <lkp@intel.com> > Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > --- > arch/powerpc/boot/Makefile | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > index 68a7534454cd..c3e084cceaed 100644 > --- a/arch/powerpc/boot/Makefile > +++ b/arch/powerpc/boot/Makefile > @@ -372,6 +372,8 @@ initrd-y := $(filter-out $(image-y), $(initrd-y)) > targets += $(image-y) $(initrd-y) > targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > $(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y)))) > +targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > + $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(image-y)))) > > $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz > > -- > 2.25.1 > Some freescale dts files are right under arch/powerpc/boot/dts/, but some are in the fsl/ subdirectory. I do not understand the policy. If "fsl/" is a very special case, I just thought we could add a new syntax, fslimage-y, but I do not mind either way. fslimage-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(fslimage-y)))) This Makefile is wrong over-all anyway. -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/boot: Fix build of dts/fsl 2020-12-15 18:02 ` Masahiro Yamada @ 2020-12-16 2:41 ` Michael Ellerman 2020-12-16 5:23 ` Masahiro Yamada 0 siblings, 1 reply; 5+ messages in thread From: Michael Ellerman @ 2020-12-16 2:41 UTC (permalink / raw) To: Masahiro Yamada; +Cc: linuxppc-dev Masahiro Yamada <masahiroy@kernel.org> writes: > On Tue, Dec 15, 2020 at 12:29 PM Michael Ellerman <mpe@ellerman.id.au> wrote: >> >> The lkp robot reported that some configs fail to build, for example >> mpc85xx_smp_defconfig, with: >> >> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory >> >> This bisects to: >> cc8a51ca6f05 ("kbuild: always create directories of targets") >> >> Although that commit claims to be about in-tree builds, it somehow >> breaks out-of-tree builds. But presumably it's just exposing a latent >> bug in our Makefiles. >> >> We can fix it by adding to targets for dts/fsl in the same way that we >> do for dts. >> >> Fixes: cc8a51ca6f05 ("kbuild: always create directories of targets") >> Reported-by: kernel test robot <lkp@intel.com> >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> >> --- >> arch/powerpc/boot/Makefile | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile >> index 68a7534454cd..c3e084cceaed 100644 >> --- a/arch/powerpc/boot/Makefile >> +++ b/arch/powerpc/boot/Makefile >> @@ -372,6 +372,8 @@ initrd-y := $(filter-out $(image-y), $(initrd-y)) >> targets += $(image-y) $(initrd-y) >> targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ >> $(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y)))) >> +targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ >> + $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(image-y)))) >> >> $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz >> > > > Some freescale dts files are right under arch/powerpc/boot/dts/, > but some are in the fsl/ subdirectory. > I do not understand the policy. There isn't a policy. Best I can tell Kumar felt like it would be cleaner to have a separate directory for (some of) the Freescale DTS files, when he initially submitted them ~9 years ago. > If "fsl/" is a very special case, > I just thought we could add a new syntax, fslimage-y, > but I do not mind either way. OK. If you don't mind I'll merge my patch as a quick fix for now. Then we can probably move all the fsl/ files up one level and avoid the problem entirely in future. > fslimage-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads > > targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, > $(fslimage-y)))) > > > This Makefile is wrong over-all anyway. Excellent. cheers ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/boot: Fix build of dts/fsl 2020-12-16 2:41 ` Michael Ellerman @ 2020-12-16 5:23 ` Masahiro Yamada 0 siblings, 0 replies; 5+ messages in thread From: Masahiro Yamada @ 2020-12-16 5:23 UTC (permalink / raw) To: Michael Ellerman; +Cc: linuxppc-dev On Wed, Dec 16, 2020 at 11:41 AM Michael Ellerman <mpe@ellerman.id.au> wrote: > > Masahiro Yamada <masahiroy@kernel.org> writes: > > On Tue, Dec 15, 2020 at 12:29 PM Michael Ellerman <mpe@ellerman.id.au> wrote: > >> > >> The lkp robot reported that some configs fail to build, for example > >> mpc85xx_smp_defconfig, with: > >> > >> cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory > >> > >> This bisects to: > >> cc8a51ca6f05 ("kbuild: always create directories of targets") > >> > >> Although that commit claims to be about in-tree builds, it somehow > >> breaks out-of-tree builds. But presumably it's just exposing a latent > >> bug in our Makefiles. > >> > >> We can fix it by adding to targets for dts/fsl in the same way that we > >> do for dts. > >> > >> Fixes: cc8a51ca6f05 ("kbuild: always create directories of targets") > >> Reported-by: kernel test robot <lkp@intel.com> > >> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> > >> --- > >> arch/powerpc/boot/Makefile | 2 ++ > >> 1 file changed, 2 insertions(+) > >> > >> diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile > >> index 68a7534454cd..c3e084cceaed 100644 > >> --- a/arch/powerpc/boot/Makefile > >> +++ b/arch/powerpc/boot/Makefile > >> @@ -372,6 +372,8 @@ initrd-y := $(filter-out $(image-y), $(initrd-y)) > >> targets += $(image-y) $(initrd-y) > >> targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > >> $(patsubst $(x).%, dts/%.dtb, $(filter $(x).%, $(image-y)))) > >> +targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > >> + $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, $(image-y)))) > >> > >> $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz > >> > > > > > > Some freescale dts files are right under arch/powerpc/boot/dts/, > > but some are in the fsl/ subdirectory. > > I do not understand the policy. > > There isn't a policy. Best I can tell Kumar felt like it would be > cleaner to have a separate directory for (some of) the Freescale DTS > files, when he initially submitted them ~9 years ago. > > > > If "fsl/" is a very special case, > > I just thought we could add a new syntax, fslimage-y, > > but I do not mind either way. > > OK. If you don't mind I'll merge my patch as a quick fix for now. > > Then we can probably move all the fsl/ files up one level and avoid the > problem entirely in future. Yes. I think it is OK. As for PPC, most of the DT files are freescale. Even if you separated DT files in vendor directories, the majority would go into fsl/. > > fslimage-$(CONFIG_MPC8540_ADS) += cuImage.mpc8540ads > > > > targets += $(foreach x, dtbImage uImage cuImage simpleImage treeImage, \ > > $(patsubst $(x).%, dts/fsl/%.dtb, $(filter $(x).%, > > $(fslimage-y)))) > > > > > > This Makefile is wrong over-all anyway. > > Excellent. You can pass V=2 to see why targets under arch/powerpc/boot/ are needlessly rebuilt. This Makefile is already too cluttered, and I do not have much time to look into it. -- Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] powerpc/boot: Fix build of dts/fsl 2020-12-15 3:29 [PATCH] powerpc/boot: Fix build of dts/fsl Michael Ellerman 2020-12-15 18:02 ` Masahiro Yamada @ 2020-12-22 13:11 ` Michael Ellerman 1 sibling, 0 replies; 5+ messages in thread From: Michael Ellerman @ 2020-12-22 13:11 UTC (permalink / raw) To: Michael Ellerman, masahiroy; +Cc: linuxppc-dev On Tue, 15 Dec 2020 14:29:06 +1100, Michael Ellerman wrote: > The lkp robot reported that some configs fail to build, for example > mpc85xx_smp_defconfig, with: > > cc1: fatal error: opening output file arch/powerpc/boot/dts/fsl/.mpc8540ads.dtb.dts.tmp: No such file or directory > > This bisects to: > cc8a51ca6f05 ("kbuild: always create directories of targets") > > [...] Applied to powerpc/fixes. [1/1] powerpc/boot: Fix build of dts/fsl https://git.kernel.org/powerpc/c/b36f835b636908e4122f2e17310b1dbc380a3b19 cheers ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-22 13:27 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-12-15 3:29 [PATCH] powerpc/boot: Fix build of dts/fsl Michael Ellerman 2020-12-15 18:02 ` Masahiro Yamada 2020-12-16 2:41 ` Michael Ellerman 2020-12-16 5:23 ` Masahiro Yamada 2020-12-22 13:11 ` Michael Ellerman
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).