Makefile: dts: include directory makefile for DTC_FLAGS
The current Makefile will drop the DTC_FLAGS depending on how you build. For example,
make dtbs
includes correct DTC_FLAGS. However if you run,
make nvidia/tegra210-p2371-2180.dtb
The DTC_FLAGS are dropped. This appears to be caused by the top level Makefile not including the Makefile from the directory where the dts lives.
This normally doesn't matter because most dts files have nothing added from the Makefile. This changes when you have overlays, and the DTC_FLAGS modifier is mandatory for the dtb to work correctly.
This change adds a -f argument which includes the Makefile from the directory where the dts file reside. This change is also required for dtbo files.
--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
@@ -1460,10 +1460,10 @@ endif ifneq ($(dtstree),) %.dtb: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ %.dtbo: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_prepare dtbs_install dtbs_check dtbs: dtbs_prepare
Signature · 1 line
2.25.1
Quoted 8 lines · Daniel Walker
The current
Makefilewill drop theDTC_FLAGSdepending on how you build. For example,make dtbs
includes correct
DTC_FLAGS. However if you run,
Quoted 8 lines
make nvidia/tegra210-p2371-2180.dtb
The
DTC_FLAGSare dropped. This appears to be caused by the top levelMakefilenot including theMakefilefrom the directory where the dts lives.This normally doesn't matter because most dts files have nothing added from the
Makefile. This changes when you have overlays, and theDTC_FLAGSmodifier is mandatory for the dtb to work correctly.
I recently fixed another issue of single target builds.
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
It fixed your issue as well.
Quoted 31 lines
This change adds a -f argument which includes the
Makefilefrom the directory where the dts file reside. This change is also required for dtbo files.Signed-off-by Daniel Walker <[email protected]>--- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)Makefile +2
-3@@ -1460,10 +1460,10 @@ endif ifneq ($(dtstree),) %.dtb: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ %.dtbo: dtbs_prepare - $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ + $(Q)$(MAKE) -f $(srctree)/$(dtstree)/$(dir $@)Makefile $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_prepare dtbs_install dtbs_check dtbs: dtbs_prepare --2.25.1
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 19 lines · Masahiro Yamada
Quoted 8 lines · Daniel Walker
The current
Makefilewill drop theDTC_FLAGSdepending on how you build. For example,make dtbs
includes correct
DTC_FLAGS. However if you run,Quoted 8 lines
make nvidia/tegra210-p2371-2180.dtb
The
DTC_FLAGSare dropped. This appears to be caused by the top levelMakefilenot including theMakefilefrom the directory where the dts lives.This normally doesn't matter because most dts files have nothing added from the
Makefile. This changes when you have overlays, and theDTC_FLAGSmodifier is mandatory for the dtb to work correctly.
Quoted 7 lines
I recently fixed another issue of single target builds.
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/It fixed your issue as well.
Yeah, it fixes the issue I was seeing. Are you planning to resubmit this or is the v2 the final version ?
Daniel
Quoted 25 lines · Daniel Walker
Quoted 23 lines · Masahiro Yamada
Quoted 8 lines · Daniel Walker
The current
Makefilewill drop theDTC_FLAGSdepending on how you build. For example,make dtbs
includes correct
DTC_FLAGS. However if you run,Quoted 8 lines
make nvidia/tegra210-p2371-2180.dtb
The
DTC_FLAGSare dropped. This appears to be caused by the top levelMakefilenot including theMakefilefrom the directory where the dts lives.This normally doesn't matter because most dts files have nothing added from the
Makefile. This changes when you have overlays, and theDTC_FLAGSmodifier is mandatory for the dtb to work correctly.I recently fixed another issue of single target builds.
https://patchwork.kernel.org/project/linux-kbuild/patch/[email protected]/
Quoted 8 lines
Quoted 3 lines
It fixed your issue as well.
Yeah, it fixes the issue I was seeing. Are you planning to resubmit this or is the v2 the final version ?
Daniel
I do not have a plan to submit v3
(unless a new issue comes up)
Signature · 2 lines
Best Regards Masahiro Yamada