All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] MIPS: DTS: Only build subdir of current platform
@ 2020-05-21  2:15 Tiezhu Yang
  2020-05-24  9:28 ` Thomas Bogendoerfer
  2020-05-27 23:10 ` Guenter Roeck
  0 siblings, 2 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-21  2:15 UTC (permalink / raw)
  To: Thomas Bogendoerfer; +Cc: linux-mips, linux-kernel, Xuefeng Li

Add config check in Makefile to only build the subdir of current platform.

E.g. without this patch:

  AR      arch/mips/built-in.a
  AR      arch/mips/boot/dts/brcm/built-in.a
  AR      arch/mips/boot/dts/cavium-octeon/built-in.a
  AR      arch/mips/boot/dts/img/built-in.a
  AR      arch/mips/boot/dts/ingenic/built-in.a
  AR      arch/mips/boot/dts/lantiq/built-in.a
  DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
  DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
  AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
  DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
  DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
  AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
  AR      arch/mips/boot/dts/loongson/built-in.a
  AR      arch/mips/boot/dts/mscc/built-in.a
  AR      arch/mips/boot/dts/mti/built-in.a
  AR      arch/mips/boot/dts/netlogic/built-in.a
  AR      arch/mips/boot/dts/ni/built-in.a
  AR      arch/mips/boot/dts/pic32/built-in.a
  AR      arch/mips/boot/dts/qca/built-in.a
  AR      arch/mips/boot/dts/ralink/built-in.a
  AR      arch/mips/boot/dts/xilfpga/built-in.a
  AR      arch/mips/boot/dts/built-in.a

With this patch:

  AR      arch/mips/built-in.a
  DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
  DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
  AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
  DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
  DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
  AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
  AR      arch/mips/boot/dts/loongson/built-in.a
  AR      arch/mips/boot/dts/built-in.a

Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
---
 arch/mips/boot/dts/Makefile | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile
index d429a69..dce32d1 100644
--- a/arch/mips/boot/dts/Makefile
+++ b/arch/mips/boot/dts/Makefile
@@ -1,17 +1,17 @@
 # SPDX-License-Identifier: GPL-2.0
-subdir-y	+= brcm
-subdir-y	+= cavium-octeon
-subdir-y	+= img
-subdir-y	+= ingenic
-subdir-y	+= lantiq
-subdir-y	+= loongson
-subdir-y	+= mscc
-subdir-y	+= mti
-subdir-y	+= netlogic
-subdir-y	+= ni
-subdir-y	+= pic32
-subdir-y	+= qca
-subdir-y	+= ralink
-subdir-y	+= xilfpga
+subdir-$(CONFIG_BMIPS_GENERIC)		+= brcm
+subdir-$(CONFIG_CAVIUM_OCTEON_SOC)	+= cavium-octeon
+subdir-$(CONFIG_MACH_PISTACHIO)		+= img
+subdir-$(CONFIG_MACH_INGENIC)		+= ingenic
+subdir-$(CONFIG_LANTIQ)			+= lantiq
+subdir-$(CONFIG_MACH_LOONGSON64)	+= loongson
+subdir-$(CONFIG_MSCC_OCELOT)		+= mscc
+subdir-$(CONFIG_MIPS_MALTA)		+= mti
+subdir-$(CONFIG_NLM_XLP_BOARD)		+= netlogic
+subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445)	+= ni
+subdir-$(CONFIG_MACH_PIC32)		+= pic32
+subdir-$(CONFIG_ATH79)			+= qca
+subdir-$(CONFIG_RALINK)			+= ralink
+subdir-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)	+= xilfpga
 
 obj-$(CONFIG_BUILTIN_DTB)	:= $(addsuffix /, $(subdir-y))
-- 
2.1.0


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

* Re: [PATCH] MIPS: DTS: Only build subdir of current platform
  2020-05-21  2:15 [PATCH] MIPS: DTS: Only build subdir of current platform Tiezhu Yang
@ 2020-05-24  9:28 ` Thomas Bogendoerfer
  2020-05-27 23:10 ` Guenter Roeck
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Bogendoerfer @ 2020-05-24  9:28 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: linux-mips, linux-kernel, Xuefeng Li

On Thu, May 21, 2020 at 10:15:06AM +0800, Tiezhu Yang wrote:
> Add config check in Makefile to only build the subdir of current platform.
> 
> E.g. without this patch:
> 
>   AR      arch/mips/built-in.a
>   AR      arch/mips/boot/dts/brcm/built-in.a
>   AR      arch/mips/boot/dts/cavium-octeon/built-in.a
>   AR      arch/mips/boot/dts/img/built-in.a
>   AR      arch/mips/boot/dts/ingenic/built-in.a
>   AR      arch/mips/boot/dts/lantiq/built-in.a
>   DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>   DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>   AR      arch/mips/boot/dts/loongson/built-in.a
>   AR      arch/mips/boot/dts/mscc/built-in.a
>   AR      arch/mips/boot/dts/mti/built-in.a
>   AR      arch/mips/boot/dts/netlogic/built-in.a
>   AR      arch/mips/boot/dts/ni/built-in.a
>   AR      arch/mips/boot/dts/pic32/built-in.a
>   AR      arch/mips/boot/dts/qca/built-in.a
>   AR      arch/mips/boot/dts/ralink/built-in.a
>   AR      arch/mips/boot/dts/xilfpga/built-in.a
>   AR      arch/mips/boot/dts/built-in.a
> 
> With this patch:
> 
>   AR      arch/mips/built-in.a
>   DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>   DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>   AR      arch/mips/boot/dts/loongson/built-in.a
>   AR      arch/mips/boot/dts/built-in.a
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
>  arch/mips/boot/dts/Makefile | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)

applied to mips-next.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: DTS: Only build subdir of current platform
  2020-05-21  2:15 [PATCH] MIPS: DTS: Only build subdir of current platform Tiezhu Yang
  2020-05-24  9:28 ` Thomas Bogendoerfer
@ 2020-05-27 23:10 ` Guenter Roeck
  2020-05-28  1:24   ` Tiezhu Yang
  1 sibling, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2020-05-27 23:10 UTC (permalink / raw)
  To: Tiezhu Yang; +Cc: Thomas Bogendoerfer, linux-mips, linux-kernel, Xuefeng Li

On Thu, May 21, 2020 at 10:15:06AM +0800, Tiezhu Yang wrote:
> Add config check in Makefile to only build the subdir of current platform.
> 
> E.g. without this patch:
> 
>   AR      arch/mips/built-in.a
>   AR      arch/mips/boot/dts/brcm/built-in.a
>   AR      arch/mips/boot/dts/cavium-octeon/built-in.a
>   AR      arch/mips/boot/dts/img/built-in.a
>   AR      arch/mips/boot/dts/ingenic/built-in.a
>   AR      arch/mips/boot/dts/lantiq/built-in.a
>   DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>   DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>   AR      arch/mips/boot/dts/loongson/built-in.a
>   AR      arch/mips/boot/dts/mscc/built-in.a
>   AR      arch/mips/boot/dts/mti/built-in.a
>   AR      arch/mips/boot/dts/netlogic/built-in.a
>   AR      arch/mips/boot/dts/ni/built-in.a
>   AR      arch/mips/boot/dts/pic32/built-in.a
>   AR      arch/mips/boot/dts/qca/built-in.a
>   AR      arch/mips/boot/dts/ralink/built-in.a
>   AR      arch/mips/boot/dts/xilfpga/built-in.a
>   AR      arch/mips/boot/dts/built-in.a
> 
> With this patch:
> 
>   AR      arch/mips/built-in.a
>   DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>   DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>   DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>   AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>   AR      arch/mips/boot/dts/loongson/built-in.a
>   AR      arch/mips/boot/dts/built-in.a
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>

With this patch applied, boston.dtb is no longer built with
64r6el_defconfig, even though 64r6el_defconfig enables
CONFIG_FIT_IMAGE_FDT_BOSTON=y. This is because the img
subdirectory is now only included if CONFIG_MACH_PISTACHIO=y,
but that is not the case with 64r6el_defconfig.

Please revisit.

Guenter

> ---
>  arch/mips/boot/dts/Makefile | 28 ++++++++++++++--------------
>  1 file changed, 14 insertions(+), 14 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile
> index d429a69..dce32d1 100644
> --- a/arch/mips/boot/dts/Makefile
> +++ b/arch/mips/boot/dts/Makefile
> @@ -1,17 +1,17 @@
>  # SPDX-License-Identifier: GPL-2.0
> -subdir-y	+= brcm
> -subdir-y	+= cavium-octeon
> -subdir-y	+= img
> -subdir-y	+= ingenic
> -subdir-y	+= lantiq
> -subdir-y	+= loongson
> -subdir-y	+= mscc
> -subdir-y	+= mti
> -subdir-y	+= netlogic
> -subdir-y	+= ni
> -subdir-y	+= pic32
> -subdir-y	+= qca
> -subdir-y	+= ralink
> -subdir-y	+= xilfpga
> +subdir-$(CONFIG_BMIPS_GENERIC)		+= brcm
> +subdir-$(CONFIG_CAVIUM_OCTEON_SOC)	+= cavium-octeon
> +subdir-$(CONFIG_MACH_PISTACHIO)		+= img
> +subdir-$(CONFIG_MACH_INGENIC)		+= ingenic
> +subdir-$(CONFIG_LANTIQ)			+= lantiq
> +subdir-$(CONFIG_MACH_LOONGSON64)	+= loongson
> +subdir-$(CONFIG_MSCC_OCELOT)		+= mscc
> +subdir-$(CONFIG_MIPS_MALTA)		+= mti
> +subdir-$(CONFIG_NLM_XLP_BOARD)		+= netlogic
> +subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445)	+= ni
> +subdir-$(CONFIG_MACH_PIC32)		+= pic32
> +subdir-$(CONFIG_ATH79)			+= qca
> +subdir-$(CONFIG_RALINK)			+= ralink
> +subdir-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)	+= xilfpga
>  
>  obj-$(CONFIG_BUILTIN_DTB)	:= $(addsuffix /, $(subdir-y))
> -- 
> 2.1.0
> 

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

* Re: [PATCH] MIPS: DTS: Only build subdir of current platform
  2020-05-27 23:10 ` Guenter Roeck
@ 2020-05-28  1:24   ` Tiezhu Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Tiezhu Yang @ 2020-05-28  1:24 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: Thomas Bogendoerfer, linux-mips, linux-kernel, Xuefeng Li

On 05/28/2020 07:10 AM, Guenter Roeck wrote:
> On Thu, May 21, 2020 at 10:15:06AM +0800, Tiezhu Yang wrote:
>> Add config check in Makefile to only build the subdir of current platform.
>>
>> E.g. without this patch:
>>
>>    AR      arch/mips/built-in.a
>>    AR      arch/mips/boot/dts/brcm/built-in.a
>>    AR      arch/mips/boot/dts/cavium-octeon/built-in.a
>>    AR      arch/mips/boot/dts/img/built-in.a
>>    AR      arch/mips/boot/dts/ingenic/built-in.a
>>    AR      arch/mips/boot/dts/lantiq/built-in.a
>>    DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>>    DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>>    AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>>    DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>>    DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>>    AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>>    AR      arch/mips/boot/dts/loongson/built-in.a
>>    AR      arch/mips/boot/dts/mscc/built-in.a
>>    AR      arch/mips/boot/dts/mti/built-in.a
>>    AR      arch/mips/boot/dts/netlogic/built-in.a
>>    AR      arch/mips/boot/dts/ni/built-in.a
>>    AR      arch/mips/boot/dts/pic32/built-in.a
>>    AR      arch/mips/boot/dts/qca/built-in.a
>>    AR      arch/mips/boot/dts/ralink/built-in.a
>>    AR      arch/mips/boot/dts/xilfpga/built-in.a
>>    AR      arch/mips/boot/dts/built-in.a
>>
>> With this patch:
>>
>>    AR      arch/mips/built-in.a
>>    DTC     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb
>>    DTB     arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.S
>>    AS      arch/mips/boot/dts/loongson/loongson3_4core_rs780e.dtb.o
>>    DTC     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb
>>    DTB     arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.S
>>    AS      arch/mips/boot/dts/loongson/loongson3_8core_rs780e.dtb.o
>>    AR      arch/mips/boot/dts/loongson/built-in.a
>>    AR      arch/mips/boot/dts/built-in.a
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> With this patch applied, boston.dtb is no longer built with
> 64r6el_defconfig, even though 64r6el_defconfig enables
> CONFIG_FIT_IMAGE_FDT_BOSTON=y. This is because the img
> subdirectory is now only included if CONFIG_MACH_PISTACHIO=y,
> but that is not the case with 64r6el_defconfig.

Thanks for your report, sorry for this issue.

I received the build error report yesterday from
kbuild test robot <lkp@intel.com>, I will fix it.

>
> Please revisit.
>
> Guenter
>
>> ---
>>   arch/mips/boot/dts/Makefile | 28 ++++++++++++++--------------
>>   1 file changed, 14 insertions(+), 14 deletions(-)
>>
>> diff --git a/arch/mips/boot/dts/Makefile b/arch/mips/boot/dts/Makefile
>> index d429a69..dce32d1 100644
>> --- a/arch/mips/boot/dts/Makefile
>> +++ b/arch/mips/boot/dts/Makefile
>> @@ -1,17 +1,17 @@
>>   # SPDX-License-Identifier: GPL-2.0
>> -subdir-y	+= brcm
>> -subdir-y	+= cavium-octeon
>> -subdir-y	+= img
>> -subdir-y	+= ingenic
>> -subdir-y	+= lantiq
>> -subdir-y	+= loongson
>> -subdir-y	+= mscc
>> -subdir-y	+= mti
>> -subdir-y	+= netlogic
>> -subdir-y	+= ni
>> -subdir-y	+= pic32
>> -subdir-y	+= qca
>> -subdir-y	+= ralink
>> -subdir-y	+= xilfpga
>> +subdir-$(CONFIG_BMIPS_GENERIC)		+= brcm
>> +subdir-$(CONFIG_CAVIUM_OCTEON_SOC)	+= cavium-octeon
>> +subdir-$(CONFIG_MACH_PISTACHIO)		+= img
>> +subdir-$(CONFIG_MACH_INGENIC)		+= ingenic
>> +subdir-$(CONFIG_LANTIQ)			+= lantiq
>> +subdir-$(CONFIG_MACH_LOONGSON64)	+= loongson
>> +subdir-$(CONFIG_MSCC_OCELOT)		+= mscc
>> +subdir-$(CONFIG_MIPS_MALTA)		+= mti
>> +subdir-$(CONFIG_NLM_XLP_BOARD)		+= netlogic
>> +subdir-$(CONFIG_FIT_IMAGE_FDT_NI169445)	+= ni
>> +subdir-$(CONFIG_MACH_PIC32)		+= pic32
>> +subdir-$(CONFIG_ATH79)			+= qca
>> +subdir-$(CONFIG_RALINK)			+= ralink
>> +subdir-$(CONFIG_FIT_IMAGE_FDT_XILFPGA)	+= xilfpga
>>   
>>   obj-$(CONFIG_BUILTIN_DTB)	:= $(addsuffix /, $(subdir-y))
>> -- 
>> 2.1.0
>>


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

end of thread, other threads:[~2020-05-28  1:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-21  2:15 [PATCH] MIPS: DTS: Only build subdir of current platform Tiezhu Yang
2020-05-24  9:28 ` Thomas Bogendoerfer
2020-05-27 23:10 ` Guenter Roeck
2020-05-28  1:24   ` Tiezhu Yang

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.