All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-04  4:27 ` Masahiro Yamada
  0 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-04  4:27 UTC (permalink / raw)
  To: linux-kbuild
  Cc: Masahiro Yamada, Ley Foon Tan, linux-kernel, Will Deacon,
	nios2-dev, Catalin Marinas, Russell King, linux-arm-kernel

The target "dtbs" should depend on "scripts" because it needs to
build dtc.  The "prepare" target is unneeded here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/Makefile   | 2 +-
 arch/arm64/Makefile | 2 +-
 arch/nios2/Makefile | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 47d3a1a..cdb5b55 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -342,7 +342,7 @@ $(INSTALL_TARGETS):
 
 PHONY += dtbs dtbs_install
 
-dtbs: prepare scripts
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 939b310..fd56fbc 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -133,7 +133,7 @@ zinstall install:
 
 PHONY += dtbs dtbs_install
 
-dtbs: prepare scripts
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index 8673a79..abc3f5b 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -61,7 +61,7 @@ archclean:
 %.dtb: | scripts
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
 
-dtbs:
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
 
 $(BOOT_TARGETS): vmlinux
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-04  4:27 ` Masahiro Yamada
  0 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-04  4:27 UTC (permalink / raw)
  To: linux-arm-kernel

The target "dtbs" should depend on "scripts" because it needs to
build dtc.  The "prepare" target is unneeded here.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 arch/arm/Makefile   | 2 +-
 arch/arm64/Makefile | 2 +-
 arch/nios2/Makefile | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 47d3a1a..cdb5b55 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -342,7 +342,7 @@ $(INSTALL_TARGETS):
 
 PHONY += dtbs dtbs_install
 
-dtbs: prepare scripts
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
index 939b310..fd56fbc 100644
--- a/arch/arm64/Makefile
+++ b/arch/arm64/Makefile
@@ -133,7 +133,7 @@ zinstall install:
 
 PHONY += dtbs dtbs_install
 
-dtbs: prepare scripts
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(boot)/dts
 
 dtbs_install:
diff --git a/arch/nios2/Makefile b/arch/nios2/Makefile
index 8673a79..abc3f5b 100644
--- a/arch/nios2/Makefile
+++ b/arch/nios2/Makefile
@@ -61,7 +61,7 @@ archclean:
 %.dtb: | scripts
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
 
-dtbs:
+dtbs: scripts
 	$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
 
 $(BOOT_TARGETS): vmlinux
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-10-04  4:27 ` Masahiro Yamada
@ 2017-10-09 14:55   ` Will Deacon
  -1 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2017-10-09 14:55 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, Ley Foon Tan, linux-kernel, nios2-dev,
	Catalin Marinas, Russell King, linux-arm-kernel

On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  arch/arm/Makefile   | 2 +-
>  arch/arm64/Makefile | 2 +-
>  arch/nios2/Makefile | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 47d3a1a..cdb5b55 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -342,7 +342,7 @@ $(INSTALL_TARGETS):
>  
>  PHONY += dtbs dtbs_install
>  
> -dtbs: prepare scripts
> +dtbs: scripts
>  	$(Q)$(MAKE) $(build)=$(boot)/dts
>  
>  dtbs_install:
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 939b310..fd56fbc 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -133,7 +133,7 @@ zinstall install:
>  
>  PHONY += dtbs dtbs_install
>  
> -dtbs: prepare scripts
> +dtbs: scripts
>  	$(Q)$(MAKE) $(build)=$(boot)/dts
>  
>  dtbs_install:

I think this is ok, although I was initially nervous about the possibility
of the archprepare step having interactions with the dt-bindings headers.
That doesn't appear to be the case, so for arm64:

Acked-by: Will Deacon <will.deacon@arm.com>

Will

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-09 14:55   ` Will Deacon
  0 siblings, 0 replies; 14+ messages in thread
From: Will Deacon @ 2017-10-09 14:55 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  arch/arm/Makefile   | 2 +-
>  arch/arm64/Makefile | 2 +-
>  arch/nios2/Makefile | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/Makefile b/arch/arm/Makefile
> index 47d3a1a..cdb5b55 100644
> --- a/arch/arm/Makefile
> +++ b/arch/arm/Makefile
> @@ -342,7 +342,7 @@ $(INSTALL_TARGETS):
>  
>  PHONY += dtbs dtbs_install
>  
> -dtbs: prepare scripts
> +dtbs: scripts
>  	$(Q)$(MAKE) $(build)=$(boot)/dts
>  
>  dtbs_install:
> diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile
> index 939b310..fd56fbc 100644
> --- a/arch/arm64/Makefile
> +++ b/arch/arm64/Makefile
> @@ -133,7 +133,7 @@ zinstall install:
>  
>  PHONY += dtbs dtbs_install
>  
> -dtbs: prepare scripts
> +dtbs: scripts
>  	$(Q)$(MAKE) $(build)=$(boot)/dts
>  
>  dtbs_install:

I think this is ok, although I was initially nervous about the possibility
of the archprepare step having interactions with the dt-bindings headers.
That doesn't appear to be the case, so for arm64:

Acked-by: Will Deacon <will.deacon@arm.com>

Will

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-10-04  4:27 ` Masahiro Yamada
@ 2017-10-09 15:05   ` Russell King - ARM Linux
  -1 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2017-10-09 15:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kbuild, Catalin Marinas, Will Deacon, linux-kernel,
	Ley Foon Tan, nios2-dev, linux-arm-kernel

On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.

Looks fine for ARM, as the only thing the dtbs should depend on is
the kernel configuration (to decide which to build) and DT tooling.

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-09 15:05   ` Russell King - ARM Linux
  0 siblings, 0 replies; 14+ messages in thread
From: Russell King - ARM Linux @ 2017-10-09 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.

Looks fine for ARM, as the only thing the dtbs should depend on is
the kernel configuration (to decide which to build) and DT tooling.

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-10-04  4:27 ` Masahiro Yamada
@ 2017-10-12  1:01   ` Masahiro Yamada
  -1 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-12  1:01 UTC (permalink / raw)
  To: Linux Kbuild mailing list
  Cc: Masahiro Yamada, Ley Foon Tan, Linux Kernel Mailing List,
	Will Deacon, nios2-dev, Catalin Marinas, Russell King,
	linux-arm-kernel

2017-10-04 13:27 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---


Applied to linux-kbuild/kbuild.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-12  1:01   ` Masahiro Yamada
  0 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-12  1:01 UTC (permalink / raw)
  To: linux-arm-kernel

2017-10-04 13:27 GMT+09:00 Masahiro Yamada <yamada.masahiro@socionext.com>:
> The target "dtbs" should depend on "scripts" because it needs to
> build dtc.  The "prepare" target is unneeded here.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---


Applied to linux-kbuild/kbuild.

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-10-09 15:05   ` Russell King - ARM Linux
@ 2017-10-25  5:40     ` Masahiro Yamada
  -1 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-25  5:40 UTC (permalink / raw)
  To: Russell King - ARM Linux, Will Deacon, Sam Ravnborg, Michal Marek
  Cc: Linux Kbuild mailing list, Catalin Marinas,
	Linux Kernel Mailing List, Ley Foon Tan, nios2-dev,
	linux-arm-kernel

Hi.


2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>> The target "dtbs" should depend on "scripts" because it needs to
>> build dtc.  The "prepare" target is unneeded here.
>
> Looks fine for ARM, as the only thing the dtbs should depend on is
> the kernel configuration (to decide which to build) and DT tooling.
>
> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>
> --


I found a potential issue on this
because the default DTB install path depends on $(KERNELRELEASE).


In top-level Makefile:
export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)


The include/config/kernel.release is created by "prepare3" target.

If the dependency on "parepare" is removed,
it is possible to run "make dtbs" and "make dtbs_install"
without creating include/config/kernel.release.

So, the $(KERNELRELEASE) could be empty when installing DTB.


Maybe, drop this patch, or reduce the dependency to "parepare3"?







-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-10-25  5:40     ` Masahiro Yamada
  0 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-10-25  5:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi.


2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>> The target "dtbs" should depend on "scripts" because it needs to
>> build dtc.  The "prepare" target is unneeded here.
>
> Looks fine for ARM, as the only thing the dtbs should depend on is
> the kernel configuration (to decide which to build) and DT tooling.
>
> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>
> --


I found a potential issue on this
because the default DTB install path depends on $(KERNELRELEASE).


In top-level Makefile:
export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)


The include/config/kernel.release is created by "prepare3" target.

If the dependency on "parepare" is removed,
it is possible to run "make dtbs" and "make dtbs_install"
without creating include/config/kernel.release.

So, the $(KERNELRELEASE) could be empty when installing DTB.


Maybe, drop this patch, or reduce the dependency to "parepare3"?







-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-10-25  5:40     ` Masahiro Yamada
@ 2017-12-13 21:31       ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2017-12-13 21:31 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Russell King - ARM Linux, Will Deacon, Sam Ravnborg,
	Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Linux Kernel Mailing List, Ley Foon Tan, nios2-dev,
	linux-arm-kernel

On Wed, Oct 25, 2017 at 12:40 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi.
>
>
> 2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
>> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>>> The target "dtbs" should depend on "scripts" because it needs to
>>> build dtc.  The "prepare" target is unneeded here.
>>
>> Looks fine for ARM, as the only thing the dtbs should depend on is
>> the kernel configuration (to decide which to build) and DT tooling.
>>
>> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>>
>> --
>
>
> I found a potential issue on this
> because the default DTB install path depends on $(KERNELRELEASE).
>
>
> In top-level Makefile:
> export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
>
>
> The include/config/kernel.release is created by "prepare3" target.
>
> If the dependency on "parepare" is removed,
> it is possible to run "make dtbs" and "make dtbs_install"
> without creating include/config/kernel.release.
>
> So, the $(KERNELRELEASE) could be empty when installing DTB.
>
>
> Maybe, drop this patch, or reduce the dependency to "parepare3"?

I was doing some work to get dtb builds to work without depending on
$arch cross compiler and this patch fixes some of the issues. The
dtbs_install target has the prepare dependency, so that should be
sufficient and your patch should be fine. BTW, Based on prior
discussion on "ARM: kbuild: Fix forced rebuild after 'make dtbs'"
thread, prepare should not be needed just for $(KERNELRELEASE).

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-12-13 21:31       ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2017-12-13 21:31 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 25, 2017 at 12:40 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
> Hi.
>
>
> 2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
>> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>>> The target "dtbs" should depend on "scripts" because it needs to
>>> build dtc.  The "prepare" target is unneeded here.
>>
>> Looks fine for ARM, as the only thing the dtbs should depend on is
>> the kernel configuration (to decide which to build) and DT tooling.
>>
>> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>>
>> --
>
>
> I found a potential issue on this
> because the default DTB install path depends on $(KERNELRELEASE).
>
>
> In top-level Makefile:
> export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
>
>
> The include/config/kernel.release is created by "prepare3" target.
>
> If the dependency on "parepare" is removed,
> it is possible to run "make dtbs" and "make dtbs_install"
> without creating include/config/kernel.release.
>
> So, the $(KERNELRELEASE) could be empty when installing DTB.
>
>
> Maybe, drop this patch, or reduce the dependency to "parepare3"?

I was doing some work to get dtb builds to work without depending on
$arch cross compiler and this patch fixes some of the issues. The
dtbs_install target has the prepare dependency, so that should be
sufficient and your patch should be fine. BTW, Based on prior
discussion on "ARM: kbuild: Fix forced rebuild after 'make dtbs'"
thread, prepare should not be needed just for $(KERNELRELEASE).

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] kbuild: fix dependency of dtbs targets
  2017-12-13 21:31       ` Rob Herring
@ 2017-12-16  3:05         ` Masahiro Yamada
  -1 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-12-16  3:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: Russell King - ARM Linux, Will Deacon, Sam Ravnborg,
	Michal Marek, Linux Kbuild mailing list, Catalin Marinas,
	Linux Kernel Mailing List, Ley Foon Tan, nios2-dev,
	linux-arm-kernel

2017-12-14 6:31 GMT+09:00 Rob Herring <robh@kernel.org>:
> On Wed, Oct 25, 2017 at 12:40 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Hi.
>>
>>
>> 2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
>>> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>>>> The target "dtbs" should depend on "scripts" because it needs to
>>>> build dtc.  The "prepare" target is unneeded here.
>>>
>>> Looks fine for ARM, as the only thing the dtbs should depend on is
>>> the kernel configuration (to decide which to build) and DT tooling.
>>>
>>> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>>>
>>> --
>>
>>
>> I found a potential issue on this
>> because the default DTB install path depends on $(KERNELRELEASE).
>>
>>
>> In top-level Makefile:
>> export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
>>
>>
>> The include/config/kernel.release is created by "prepare3" target.
>>
>> If the dependency on "parepare" is removed,
>> it is possible to run "make dtbs" and "make dtbs_install"
>> without creating include/config/kernel.release.
>>
>> So, the $(KERNELRELEASE) could be empty when installing DTB.
>>
>>
>> Maybe, drop this patch, or reduce the dependency to "parepare3"?
>
> I was doing some work to get dtb builds to work without depending on
> $arch cross compiler and this patch fixes some of the issues. The
> dtbs_install target has the prepare dependency,

Which line?

I checked arch/{arm,arm64,mips}/Makefile, but I did not see any
dependency.


> so that should be
> sufficient and your patch should be fine.

Generally, adding dependencies to install targets is dangerous
because install targets are often invoked in root privilege.

This is stated by, for example,
commit 19514fc665ffbce624785f76ee7ad0ea6378a527



> BTW, Based on prior
> discussion on "ARM: kbuild: Fix forced rebuild after 'make dtbs'"
> thread, prepare should not be needed just for $(KERNELRELEASE).
>
> Rob

No.
If "prepare" target is dropped, you can run dtbs_install
without include/config/kenrel.release





-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] kbuild: fix dependency of dtbs targets
@ 2017-12-16  3:05         ` Masahiro Yamada
  0 siblings, 0 replies; 14+ messages in thread
From: Masahiro Yamada @ 2017-12-16  3:05 UTC (permalink / raw)
  To: linux-arm-kernel

2017-12-14 6:31 GMT+09:00 Rob Herring <robh@kernel.org>:
> On Wed, Oct 25, 2017 at 12:40 AM, Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
>> Hi.
>>
>>
>> 2017-10-10 0:05 GMT+09:00 Russell King - ARM Linux <linux@armlinux.org.uk>:
>>> On Wed, Oct 04, 2017 at 01:27:20PM +0900, Masahiro Yamada wrote:
>>>> The target "dtbs" should depend on "scripts" because it needs to
>>>> build dtc.  The "prepare" target is unneeded here.
>>>
>>> Looks fine for ARM, as the only thing the dtbs should depend on is
>>> the kernel configuration (to decide which to build) and DT tooling.
>>>
>>> Acked-by: Russell King <rmk+kernel@armlinux.org.uk>
>>>
>>> --
>>
>>
>> I found a potential issue on this
>> because the default DTB install path depends on $(KERNELRELEASE).
>>
>>
>> In top-level Makefile:
>> export INSTALL_DTBS_PATH ?= $(INSTALL_PATH)/dtbs/$(KERNELRELEASE)
>>
>>
>> The include/config/kernel.release is created by "prepare3" target.
>>
>> If the dependency on "parepare" is removed,
>> it is possible to run "make dtbs" and "make dtbs_install"
>> without creating include/config/kernel.release.
>>
>> So, the $(KERNELRELEASE) could be empty when installing DTB.
>>
>>
>> Maybe, drop this patch, or reduce the dependency to "parepare3"?
>
> I was doing some work to get dtb builds to work without depending on
> $arch cross compiler and this patch fixes some of the issues. The
> dtbs_install target has the prepare dependency,

Which line?

I checked arch/{arm,arm64,mips}/Makefile, but I did not see any
dependency.


> so that should be
> sufficient and your patch should be fine.

Generally, adding dependencies to install targets is dangerous
because install targets are often invoked in root privilege.

This is stated by, for example,
commit 19514fc665ffbce624785f76ee7ad0ea6378a527



> BTW, Based on prior
> discussion on "ARM: kbuild: Fix forced rebuild after 'make dtbs'"
> thread, prepare should not be needed just for $(KERNELRELEASE).
>
> Rob

No.
If "prepare" target is dropped, you can run dtbs_install
without include/config/kenrel.release





-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-12-16  3:06 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-04  4:27 [PATCH] kbuild: fix dependency of dtbs targets Masahiro Yamada
2017-10-04  4:27 ` Masahiro Yamada
2017-10-09 14:55 ` Will Deacon
2017-10-09 14:55   ` Will Deacon
2017-10-09 15:05 ` Russell King - ARM Linux
2017-10-09 15:05   ` Russell King - ARM Linux
2017-10-25  5:40   ` Masahiro Yamada
2017-10-25  5:40     ` Masahiro Yamada
2017-12-13 21:31     ` Rob Herring
2017-12-13 21:31       ` Rob Herring
2017-12-16  3:05       ` Masahiro Yamada
2017-12-16  3:05         ` Masahiro Yamada
2017-10-12  1:01 ` Masahiro Yamada
2017-10-12  1:01   ` Masahiro Yamada

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.