Re: [PATCH v2 2/9] nios2: build .dtb files in dts directory
From: Ley Foon Tan
Date: Thu Sep 06 2018 - 22:21:41 EST
On Wed, 2018-09-05 at 18:53 -0500, Rob Herring wrote:
> Align nios2 with other architectures which build the dtb files in the
> same directory as the dts files. This is also in line with most other
> build targets which are located in the same directory as the source.
> This move will help enable the 'dtbs' target which builds all the
> dtbs
> regardless of kernel config.
>
> This transition could break some scripts if they expect dtb files in
> the old location.
>
> Cc: Ley Foon Tan <lftan@xxxxxxxxxx>
> Cc: nios2-dev@xxxxxxxxxxxxxxxxxxxxxx
> Signed-off-by: Rob Herring <robh@xxxxxxxxxx>
> ---
> Please ack so I can take the whole series via the DT tree.
>
> Âarch/nios2/MakefileÂÂÂÂÂÂÂÂÂÂ| 4 ++--
> Âarch/nios2/boot/MakefileÂÂÂÂÂ| 4 ----
> Âarch/nios2/boot/dts/Makefile | 1 +
> Â3 files changed, 3 insertions(+), 6 deletions(-)
> Âcreate mode 100644 arch/nios2/boot/dts/Makefile
>
> diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
> index 8673a79dca9c..50eece1c6adb 100644
> --- a/arch/nios2/Makefile
> +++ b/arch/nios2/Makefile
> @@ -59,10 +59,10 @@ archclean:
> ÂÂÂÂÂÂÂÂ$(Q)$(MAKE) $(clean)=$(nios2-boot)
>
> Â%.dtb: | scripts
> -ÂÂÂÂÂÂÂ$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
> +ÂÂÂÂÂÂÂ$(Q)$(MAKE) $(build)=$(nios2-boot)/dts $(nios2-boot)/dts/$@
>
> Âdtbs:
> -ÂÂÂÂÂÂÂ$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
> +ÂÂÂÂÂÂÂ$(Q)$(MAKE) $(build)=$(nios2-boot)/dts
>
> Â$(BOOT_TARGETS): vmlinux
> ÂÂÂÂÂÂÂÂ$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
> diff --git a/arch/nios2/boot/Makefile b/arch/nios2/boot/Makefile
> index 2ba23a679732..007586094dde 100644
> --- a/arch/nios2/boot/Makefile
> +++ b/arch/nios2/boot/Makefile
> @@ -47,10 +47,6 @@ obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) +=
> linked_dtb.o
>
> Âtargets += $(dtb-y)
>
> -# Rule to build device tree blobs with make command
> -$(obj)/%.dtb: $(src)/dts/%.dts FORCE
> -ÂÂÂÂÂÂÂ$(call if_changed_dep,dtc)
> -
> Â$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
>
> Âinstall:
> diff --git a/arch/nios2/boot/dts/Makefile
> b/arch/nios2/boot/dts/Makefile
> new file mode 100644
> index 000000000000..f66554cd5c45
> --- /dev/null
> +++ b/arch/nios2/boot/dts/Makefile
> @@ -0,0 +1 @@
> +# SPDX-License-Identifier: GPL-2.0
> --
> 2.17.1
>
Hi Rob
I have synced your all-dtbs branch from here:Âhttps://git.kernel.org/pu
b/scm/linux/kernel/git/robh/linux.git/log/?h=all-dtbs
It shows error when compile kernel image and also when "make
dtbs_install".
make dtbs_install
make[1]: *** No rule to make target
'arch/nios2/boot/dts/arch/nios2/boot/dts/10m50_devboard.dtb', needed by
'arch/nios2/boot/dts/arch/nios2/boot/dts/10m50_devboard.dtb.S'.ÂÂStop.
Makefile:1229: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2
Regards
Ley Foon