On Tue, Dec 15, 2020 at 12:29 PM Michael Ellerman <m...@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 <l...@intel.com> > Signed-off-by: Michael Ellerman <m...@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