Skip to contentSkip to conversation

devicetree: use wildcard to clean arch subdir

PATCH Superseded Thomas Chou 6 participants 36 messages Dec 27, 2015 – Jan 13, 2016

Subsystems (6)
lore
Share & tools
lore
#0 lore raw

PATCH 1/7 devicetree: use wildcard to clean arch subdir

Use wildcard to clean arch subdirectories, as it is cleaner than listing all the arch which builds dtb.

---
 dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
dts/Makefile +1 -1
index d3122aa..dbde703 100644
@@ -45,4 +45,4 @@ dtbs: $(obj)/dt.dtb
 clean-files := dt.dtb.S
 
 # Let clean descend into dts directories
-subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/sandbox/dts ../arch/x86/dts
+subdir- += ../arch/*/dts
Signature · 1 line
2.5.0
#1 lore raw

PATCH 2/7 arc: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Cc Alexey Brodkin <[email protected]>
---
 arch/arc/dts/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arc/dts/Makefile +1 -3
index d4772ec..f22fabf 100644
@@ -2,9 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_TARGET_AXS101) +=  axs10x.dtb
-dtb-$(CONFIG_TARGET_ARCANGEL4) +=  arcangel4.dtb
-dtb-$(CONFIG_TARGET_TB100) +=  abilis_tb100.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#3 lore raw

PATCH 2/7 arc: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Thomas,

Quoted 4 lines · Bin Meng
Quoted 3 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Quoted 8 lines
Quoted 6 lines
Cc Alexey Brodkin <[email protected]>
---
 arch/arc/dts/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

I tried your series on axs103 and it builds and boots just fine, so feel free to add:
----------------------->8--------------------------

----------------------->8--------------------------

-Alexey

#4 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Cc Albert Aribaud <[email protected]>
---
 arch/arm/dts/Makefile | 192 +-------------------------------------------------
 1 file changed, 1 insertion(+), 191 deletions(-)
arch/arm/dts/Makefile +1 -191
index 0bcd316..6c57200 100644
@@ -2,197 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
-dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
-dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
-	exynos4210-smdkv310.dtb \
-	exynos4210-universal_c210.dtb \
-	exynos4210-trats.dtb \
-	exynos4412-trats2.dtb \
-	exynos4412-odroid.dtb
-
-dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
-	exynos5250-snow.dtb \
-	exynos5250-spring.dtb \
-	exynos5250-smdk5250.dtb \
-	exynos5420-smdk5420.dtb \
-	exynos5420-peach-pit.dtb \
-	exynos5800-peach-pi.dtb \
-	exynos5422-odroidxu3.dtb
-dtb-$(CONFIG_ARCH_ROCKCHIP) += \
-	rk3288-firefly.dtb \
-	rk3288-jerry.dtb \
-	rk3036-sdk.dtb
-dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
-	tegra20-medcom-wide.dtb \
-	tegra20-paz00.dtb \
-	tegra20-plutux.dtb \
-	tegra20-seaboard.dtb \
-	tegra20-tec.dtb \
-	tegra20-trimslice.dtb \
-	tegra20-ventana.dtb \
-	tegra20-whistler.dtb \
-	tegra20-colibri.dtb \
-	tegra30-apalis.dtb \
-	tegra30-beaver.dtb \
-	tegra30-cardhu.dtb \
-	tegra30-colibri.dtb \
-	tegra30-tec-ng.dtb \
-	tegra114-dalmore.dtb \
-	tegra124-jetson-tk1.dtb \
-	tegra124-nyan-big.dtb \
-	tegra124-venice2.dtb \
-	tegra210-e2220-1170.dtb \
-	tegra210-p2371-0000.dtb \
-	tegra210-p2371-2180.dtb \
-	tegra210-p2571.dtb
-
-dtb-$(CONFIG_ARCH_MVEBU) +=			\
-	armada-388-gp.dtb			\
-	armada-xp-gp.dtb
-
-dtb-$(CONFIG_ARCH_UNIPHIER) += \
-	uniphier-ph1-ld4-ref.dtb \
-	uniphier-ph1-ld6b-ref.dtb \
-	uniphier-ph1-pro4-ref.dtb \
-	uniphier-ph1-pro5-4kbox.dtb \
-	uniphier-ph1-sld3-ref.dtb \
-	uniphier-ph1-sld8-ref.dtb \
-	uniphier-proxstream2-gentil.dtb \
-	uniphier-proxstream2-vodka.dtb
-dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
-	zynq-zc706.dtb \
-	zynq-zed.dtb \
-	zynq-zybo.dtb \
-	zynq-microzed.dtb \
-	zynq-picozed.dtb \
-	zynq-zc770-xm010.dtb \
-	zynq-zc770-xm011.dtb \
-	zynq-zc770-xm012.dtb \
-	zynq-zc770-xm013.dtb
-dtb-$(CONFIG_ARCH_ZYNQMP) += \
-	zynqmp-ep108.dtb
-dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-evm.dtb
-dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb
-
-dtb-$(CONFIG_ARCH_SOCFPGA) +=				\
-	socfpga_arria5_socdk.dtb			\
-	socfpga_cyclone5_mcvevk.dtb			\
-	socfpga_cyclone5_socdk.dtb			\
-	socfpga_cyclone5_de0_nano_soc.dtb			\
-	socfpga_cyclone5_sockit.dtb			\
-	socfpga_cyclone5_socrates.dtb			\
-	socfpga_cyclone5_sr1500.dtb
-
-dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb
-dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
-dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
-
-dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
-	ls1021a-twr.dtb
-dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
-	fsl-ls2080a-rdb.dtb
-dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds.dtb \
-	fsl-ls1043a-rdb.dtb
-
-dtb-$(CONFIG_MACH_SUN4I) += \
-	sun4i-a10-a1000.dtb \
-	sun4i-a10-ba10-tvbox.dtb \
-	sun4i-a10-chuwi-v7-cw0825.dtb \
-	sun4i-a10-cubieboard.dtb \
-	sun4i-a10-gemei-g9.dtb \
-	sun4i-a10-hackberry.dtb \
-	sun4i-a10-hyundai-a7hd.dtb \
-	sun4i-a10-inet1.dtb \
-	sun4i-a10-inet-3f.dtb \
-	sun4i-a10-inet-3w.dtb \
-	sun4i-a10-inet97fv2.dtb \
-	sun4i-a10-inet9f-rev03.dtb \
-	sun4i-a10-itead-iteaduino-plus.dtb \
-	sun4i-a10-jesurun-q5.dtb \
-	sun4i-a10-marsboard.dtb \
-	sun4i-a10-mini-xplus.dtb \
-	sun4i-a10-mk802.dtb \
-	sun4i-a10-mk802ii.dtb \
-	sun4i-a10-olinuxino-lime.dtb \
-	sun4i-a10-pcduino.dtb \
-	sun4i-a10-pov-protab2-ips9.dtb
-dtb-$(CONFIG_MACH_SUN5I) += \
-	sun5i-a10s-auxtek-t003.dtb \
-	sun5i-a10s-auxtek-t004.dtb \
-	sun5i-a10s-mk802.dtb \
-	sun5i-a10s-olinuxino-micro.dtb \
-	sun5i-a10s-r7-tv-dongle.dtb \
-	sun5i-a10s-wobo-i5.dtb \
-	sun5i-a13-ampe-a76.dtb \
-	sun5i-a13-empire-electronix-d709.dtb \
-	sun5i-a13-hsg-h702.dtb \
-	sun5i-a13-inet-86vs.dtb \
-	sun5i-a13-inet-98v-rev2.dtb \
-	sun5i-a13-olinuxino.dtb \
-	sun5i-a13-olinuxino-micro.dtb \
-	sun5i-a13-q8-tablet.dtb \
-	sun5i-a13-utoo-p66.dtb \
-	sun5i-r8-chip.dtb
-dtb-$(CONFIG_MACH_SUN6I) += \
-	sun6i-a31-app4-evb1.dtb \
-	sun6i-a31-colombus.dtb \
-	sun6i-a31-hummingbird.dtb \
-	sun6i-a31-i7.dtb \
-	sun6i-a31-m9.dtb \
-	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31-mixtile-loftq.dtb \
-	sun6i-a31s-cs908.dtb \
-	sun6i-a31s-primo81.dtb \
-	sun6i-a31s-sinovoip-bpi-m2.dtb
-dtb-$(CONFIG_MACH_SUN7I) += \
-	sun7i-a20-ainol-aw1.dtb \
-	sun7i-a20-bananapi.dtb \
-	sun7i-a20-bananapro.dtb \
-	sun7i-a20-cubieboard2.dtb \
-	sun7i-a20-cubietruck.dtb \
-	sun7i-a20-hummingbird.dtb \
-	sun7i-a20-i12-tvbox.dtb \
-	sun7i-a20-lamobo-r1.dtb \
-	sun7i-a20-m3.dtb \
-	sun7i-a20-m5.dtb \
-	sun7i-a20-mk808c.dtb \
-	sun7i-a20-olimex-som-evb.dtb \
-	sun7i-a20-olinuxino-lime.dtb \
-	sun7i-a20-olinuxino-lime2.dtb \
-	sun7i-a20-olinuxino-micro.dtb \
-	sun7i-a20-orangepi.dtb \
-	sun7i-a20-orangepi-mini.dtb \
-	sun7i-a20-pcduino3.dtb \
-	sun7i-a20-pcduino3-nano.dtb \
-	sun7i-a20-primo73.dtb \
-	sun7i-a20-wexler-tab7200.dtb \
-	sun7i-a20-wits-pro-a20-dkt.dtb \
-	sun7i-a20-yones-toptech-bd1078.dtb
-dtb-$(CONFIG_MACH_SUN8I_A23) += \
-	sun8i-a23-evb.dtb \
-	sun8i-a23-gt90h-v4.dtb \
-	sun8i-a23-q8-tablet.dtb
-dtb-$(CONFIG_MACH_SUN8I_A33) += \
-	sun8i-a33-ga10h-v1.1.dtb \
-	sun8i-a33-q8-tablet.dtb \
-	sun8i-a33-sinlinx-sina33.dtb
-dtb-$(CONFIG_MACH_SUN8I_A83T) += \
-	sun8i-a83t-allwinner-h8homlet-v2.dtb
-dtb-$(CONFIG_MACH_SUN8I_H3) += \
-	sun8i-h3-orangepi-pc.dtb \
-	sun8i-h3-orangepi-plus.dtb
-dtb-$(CONFIG_MACH_SUN9I) += \
-	sun9i-a80-optimus.dtb \
-	sun9i-a80-cubieboard4.dtb
-
-dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
-	vf610-colibri.dtb
-
-dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
-	k2l-evm.dtb \
-	k2e-evm.dtb \
-	k2g-evm.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#5 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Quoted 9 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Cc Albert Aribaud <[email protected]>
---
 arch/arm/dts/Makefile | 192 +-------------------------------------------------
 1 file changed, 1 insertion(+), 191 deletions(-)
#6 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Thomas,

Quoted 4 lines · Bin Meng
Quoted 3 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Quoted 8 lines
Quoted 6 lines
Cc Albert Aribaud <[email protected]>
---
 arch/arm/dts/Makefile | 192 +-------------------------------------------------
 1 file changed, 1 insertion(+), 191 deletions(-)

The problem with these patches is that it prevents building all the compatible device tree files for a board family. The default device tree is just that - it is not the only one that can be used. A build system can taken one of the output device tree files and package it with U-Boot. If we don't build then, then that becomes impossible.

What is the purpose of these patches?

A better solution might be to add an option to list the files which should be built. Then we gain control over this, if that is what you are trying to achieve.

Regards,
Simon

#7 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Simon,

Quoted 22 lines · Simon Glass

Hi Thomas,

Quoted 4 lines · Bin Meng
Quoted 3 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Quoted 8 lines
Quoted 6 lines
Cc Albert Aribaud <[email protected]>
---
  arch/arm/dts/Makefile | 192 +-------------------------------------------------
  1 file changed, 1 insertion(+), 191 deletions(-)

The problem with these patches is that it prevents building all the compatible device tree files for a board family. The default device tree is just that - it is not the only one that can be used. A build system can taken one of the output device tree files and package it with U-Boot. If we don't build then, then that becomes impossible.

Quoted 5 lines

What is the purpose of these patches?

A better solution might be to add an option to list the files which should be built. Then we gain control over this, if that is what you are trying to achieve.

The device tree describes hardware. Each board is a hardware, and should have only one device tree. The u-boot is a boot loader, which might have different options to load the next stage, eg. Linux. As I see in the configs/ dir, there can be several defconfig for a board and uses the same device tree. With device tree controlled u-boot, the output is u-boot-dtb.bin for each configuration.

The next stage, say, Linux, gets device tree from u-boot. A single kernel can work on many different boards bond with possibly different device tree blob and booting configuration.

We can use buildman to build a family of target binary including device tree blob. So I don't see the reason to keep the list of device tree per target.

Best regards,
Thomas

#8 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Thomas,

Quoted 37 lines · Thomas Chou

Hi Simon,

Quoted 26 lines · Simon Glass

Hi Thomas,

Quoted 6 lines · Bin Meng
Quoted 4 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Quoted 8 lines
Quoted 6 lines
Cc Albert Aribaud <[email protected]>
---
  arch/arm/dts/Makefile | 192 +-------------------------------------------------
  1 file changed, 1 insertion(+), 191 deletions(-)

The problem with these patches is that it prevents building all the compatible device tree files for a board family. The default device tree is just that - it is not the only one that can be used. A build system can taken one of the output device tree files and package it with U-Boot. If we don't build then, then that becomes impossible.

Quoted 5 lines

What is the purpose of these patches?

A better solution might be to add an option to list the files which should be built. Then we gain control over this, if that is what you are trying to achieve.

Quoted 5 lines

The device tree describes hardware. Each board is a hardware, and should have only one device tree. The u-boot is a boot loader, which might have different options to load the next stage, eg. Linux. As I see in the configs/ dir, there can be several defconfig for a board and uses the same device tree. With device tree controlled u-boot, the output is u-boot-dtb.bin for each configuration.

The next stage, say, Linux, gets device tree from u-boot. A single kernel can work on many different boards bond with possibly different device tree blob and booting configuration.

We can use buildman to build a family of target binary including device tree blob. So I don't see the reason to keep the list of device tree per target.

One of the benefits of device tree is that we can run the same code paths on multiple boards. Then buildman has less work to do. For example, if it builds 'snow' then we know that 'pit' and 'pi' are good also. If you change the way device trees work then we lose this benefit. It would be great if we could build (say) 100 boards for 100% code coverage instead of 1000 boards.

If you can find a way to build all the device tree files for a particular SoC without listing them out in the Makefile, then fine. But I really don't want to lose that feature. It is very useful.

Another example is sandbox, which builds both 'sandbox.dts' and 'test.dts'. It allows us to run a test easily:

./sandbox/u-boot -d sandbox/arch/sandbox/dts/test.dtb -c "ut dm usb_kdb" for example.

If we didn't have that it would be a right pain to run tests.

I still don't understand what problem you are trying to solve. Can you explain again what is wrong with the status quo?

Regards,
Simon

#9 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Simon,

Quoted 11 lines · Simon Glass

One of the benefits of device tree is that we can run the same code paths on multiple boards. Then buildman has less work to do. For example, if it builds 'snow' then we know that 'pit' and 'pi' are good also. If you change the way device trees work then we lose this benefit. It would be great if we could build (say) 100 boards for 100% code coverage instead of 1000 boards.

If you can find a way to build all the device tree files for a particular SoC without listing them out in the Makefile, then fine. But I really don't want to lose that feature. It is very useful.

I am preparing an update v2 to support building list of DT from configs.

By adding support of list to DEFAULT_DEVICE_TREE,
This option specifies a space-separated list of Device Tree used for DT control. Each DT in the list will be compiled. The first will be used as default to ship.

Quoted 8 lines

Another example is sandbox, which builds both 'sandbox.dts' and 'test.dts'. It allows us to run a test easily:

./sandbox/u-boot -d sandbox/arch/sandbox/dts/test.dtb -c "ut dm usb_kdb" for example.

If we didn't have that it would be a right pain to run tests.

No problem. The test.dtb rules is retained.

Quoted 2 lines

I still don't understand what problem you are trying to solve. Can you explain again what is wrong with the status quo?

The current build generate too many DTB that users probably don't want/need. And the arch//dts/Makefile grows fat as every new board/target add lines to it. There should be some way to handle it in a cleaner style.

Best regards,
Thomas

#10 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

+Masahiro

Hi Thomas,

Quoted 16 lines · Thomas Chou

Hi Simon,

Quoted 8 lines · Simon Glass

One of the benefits of device tree is that we can run the same code paths on multiple boards. Then buildman has less work to do. For example, if it builds 'snow' then we know that 'pit' and 'pi' are good also. If you change the way device trees work then we lose this benefit. It would be great if we could build (say) 100 boards for 100% code coverage instead of 1000 boards.

Quoted 4 lines

If you can find a way to build all the device tree files for a particular SoC without listing them out in the Makefile, then fine. But I really don't want to lose that feature. It is very useful.

Quoted 6 lines

I am preparing an update v2 to support building list of DT from configs.

By adding support of list to DEFAULT_DEVICE_TREE,
This option specifies a space-separated list of Device Tree used for DT control. Each DT in the list will be compiled. The first will be used as default to ship.

It would be better if we could ship all of them, and select the right tone at run-time.

Quoted 12 lines
Quoted 9 lines

Another example is sandbox, which builds both 'sandbox.dts' and 'test.dts'. It allows us to run a test easily:

./sandbox/u-boot -d sandbox/arch/sandbox/dts/test.dtb -c "ut dm usb_kdb" for example.

If we didn't have that it would be a right pain to run tests.

No problem. The test.dtb rules is retained.

Quoted 7 lines
Quoted 2 lines

I still don't understand what problem you are trying to solve. Can you explain again what is wrong with the status quo?

The current build generate too many DTB that users probably don't want/need. And the arch//dts/Makefile grows fat as every new board/target add lines to it. There should be some way to handle it in a cleaner style.

But at least we get a clear list of what is includes, and what SoC it relates to. Linux uses the same approach. I'm really not sold on this idea.

Regards,
Simon

#11 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Simon,

Quoted 47 lines · Simon Glass

+Masahiro

Hi Thomas,

Quoted 16 lines · Thomas Chou

Hi Simon,

Quoted 8 lines · Simon Glass

One of the benefits of device tree is that we can run the same code paths on multiple boards. Then buildman has less work to do. For example, if it builds 'snow' then we know that 'pit' and 'pi' are good also. If you change the way device trees work then we lose this benefit. It would be great if we could build (say) 100 boards for 100% code coverage instead of 1000 boards.

Quoted 4 lines

If you can find a way to build all the device tree files for a particular SoC without listing them out in the Makefile, then fine. But I really don't want to lose that feature. It is very useful.

Quoted 6 lines

I am preparing an update v2 to support building list of DT from configs.

By adding support of list to DEFAULT_DEVICE_TREE,
This option specifies a space-separated list of Device Tree used for DT control. Each DT in the list will be compiled. The first will be used as default to ship.

It would be better if we could ship all of them, and select the right tone at run-time.

Quoted 16 lines
Quoted 9 lines

Another example is sandbox, which builds both 'sandbox.dts' and 'test.dts'. It allows us to run a test easily:

./sandbox/u-boot -d sandbox/arch/sandbox/dts/test.dtb -c "ut dm usb_kdb" for example.

If we didn't have that it would be a right pain to run tests.

No problem. The test.dtb rules is retained.

Quoted 2 lines

I still don't understand what problem you are trying to solve. Can you explain again what is wrong with the status quo?

Quoted 8 lines
Quoted 3 lines

The current build generate too many DTB that users probably don't want/need. And the arch//dts/Makefile grows fat as every new board/target add lines to it. There should be some way to handle it in a cleaner style.

But at least we get a clear list of what is includes, and what SoC it relates to. Linux uses the same approach. I'm really not sold on this idea.

Thanks for the explanation. Now I understand. But there is no harm to add list support for building DT to configs. Please review and pick 1/9 and 2/9 of PATCH v2. And leave the rest to arch custodians.

Best regards,
Thomas

#12 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Thomas,

2016-01-06 10:57 GMT+09:00 Thomas Chou <[email protected]>:

Quoted 3 lines

Thanks for the explanation. Now I understand. But there is no harm to add list support for building DT to configs. Please review and pick 1/9 and 2/9 of PATCH v2. And leave the rest to arch custodians.

I want this consistent throughout U-Boot tree.
Please do not leave it to each custodian.

1/9 is OK.

If we decide to not do 3/9 - 9/9,
2/9 will be useless.

Signature · 2 lines
Best Regards
Masahiro Yamada
#13 lore raw

PATCH 3/7 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Hi Masahiro,

Quoted 10 lines · Masahiro Yamada

Hi Thomas,

2016-01-06 10:57 GMT+09:00 Thomas Chou <[email protected]>:

Quoted 3 lines

Thanks for the explanation. Now I understand. But there is no harm to add list support for building DT to configs. Please review and pick 1/9 and 2/9 of PATCH v2. And leave the rest to arch custodians.

I want this consistent throughout U-Boot tree.
Please do not leave it to each custodian.

OK.

Quoted 3 lines

1/9 is OK.

Thanks. This is actually a bug fix.

Quoted 3 lines

If we decide to not do 3/9 - 9/9,
2/9 will be useless.

OK. Please drop them.

Best regards,
Thomas

#14 lore raw

PATCH 4/7 microblaze: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/microblaze/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/microblaze/dts/Makefile +1 -1
index 5e70d9e..f22fabf 100644
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += microblaze-generic.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#15 lore raw

PATCH 4/7 microblaze: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Quoted 9 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/microblaze/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#16 lore raw

PATCH 4/7 microblaze: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Quoted 4 lines · Bin Meng
Quoted 3 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

Quoted 8 lines
Quoted 6 lines
---
 arch/microblaze/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Looks good.

Thanks,
Michal

#17 lore raw

PATCH 5/7 powerpc: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/powerpc/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/dts/Makefile +1 -1
index 5d9f5c2..f22fabf 100644
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_TARGET_CANYONLANDS) += arches.dtb canyonlands.dtb glacier.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#19 lore raw

PATCH 6/7 sandbox: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/sandbox/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sandbox/dts/Makefile +1 -1
index 0197569..4969969 100644
@@ -2,7 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_SANDBOX) += sandbox.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 dtb-$(CONFIG_UT_DM) += test.dtb
 
 targets += $(dtb-y)
Signature · 1 line
2.5.0
#20 lore raw

PATCH 6/7 sandbox: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Quoted 8 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/sandbox/dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#21 lore raw

PATCH 7/7 x86: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards.

---
 arch/x86/dts/Makefile | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
arch/x86/dts/Makefile +1 -10
index 64e5694..f22fabf 100644
@@ -2,16 +2,7 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += bayleybay.dtb \
-	chromebook_link.dtb \
-	chromebox_panther.dtb \
-	crownbay.dtb \
-	efi.dtb \
-	galileo.dtb \
-	minnowmax.dtb \
-	qemu-x86_i440fx.dtb \
-	qemu-x86_q35.dtb \
-	broadwell_som-6896.dtb
+dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#24 lore raw

PATCH v2 1/9 devicetree: use wildcard to clean arch subdir

In reply to Thomas Chou

Use wildcard to clean arch subdirectories, as it is cleaner than listing all the arch which builds dtb.

---
v2
no change

 dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
dts/Makefile +1 -1
index d3122aa..dbde703 100644
@@ -45,4 +45,4 @@ dtbs: $(obj)/dt.dtb
 clean-files := dt.dtb.S
 
 # Let clean descend into dts directories
-subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/sandbox/dts ../arch/x86/dts
+subdir- += ../arch/*/dts
Signature · 1 line
2.5.0
#25 lore raw

PATCH v2 2/9 devicetree: support list of Device Tree in DEFAULT_DEVICE_TREE

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 dts/Kconfig  | 3 ++-
 dts/Makefile | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
dts/Kconfig +2 -1
index fb2d79e..8d8b448 100644
@@ -54,7 +54,8 @@ endchoice
 config DEFAULT_DEVICE_TREE
 	string "Default Device Tree for DT control"
 	help
-	  This option specifies the default Device Tree used for DT control.
+	  This option specifies a space-separated list of Device Tree used
+	  for DT control. The first will be used as default to ship.
 	  It can be overridden from the command line:
 	  $ make DEVICE_TREE=<device-tree-name>
 
dts/Makefile +2 -1
index dbde703..8278caf 100644
@@ -7,7 +7,8 @@
 # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is
 # enabled. See doc/README.fdt-control for more details.
 
-DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%)
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+DEVICE_TREE ?= $(firstword $(DEVICE_TREE_LIST))
 ifeq ($(DEVICE_TREE),)
 DEVICE_TREE := unset
 endif
Signature · 1 line
2.5.0
#26 lore raw

PATCH v2 2/9 devicetree: support list of Device Tree in DEFAULT_DEVICE_TREE

Hi Thomas,

Quoted 11 lines · Thomas Chou

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 dts/Kconfig  | 3 ++-
 dts/Makefile | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

On balance I still prefer the current Makefile approach.

Regards,
Simon

#27 lore raw

PATCH v2 3/9 nios2: support list of Device Tree in DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/nios2/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/nios2/dts/Makefile +2 -1
index f22fabf..eaeb26f 100644
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%).dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#28 lore raw

PATCH v2 4/9 arc: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

Cc Alexey Brodkin <[email protected]>

---
v2
add list support as Simon suggested.

 arch/arc/dts/Makefile | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
arch/arc/dts/Makefile +2 -3
index d4772ec..eaeb26f 100644
@@ -2,9 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_TARGET_AXS101) +=  axs10x.dtb
-dtb-$(CONFIG_TARGET_ARCANGEL4) +=  arcangel4.dtb
-dtb-$(CONFIG_TARGET_TB100) +=  abilis_tb100.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#29 lore raw

PATCH v2 5/9 arm: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

Cc Albert Aribaud <[email protected]>

---
v2
add list support as Simon suggested.

 arch/arm/dts/Makefile | 193 +-------------------------------------------------
 1 file changed, 2 insertions(+), 191 deletions(-)
arch/arm/dts/Makefile +2 -191
index 0bcd316..41a6ab5 100644
@@ -2,197 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_S5PC100) += s5pc1xx-smdkc100.dtb
-dtb-$(CONFIG_S5PC110) += s5pc1xx-goni.dtb
-dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \
-	exynos4210-smdkv310.dtb \
-	exynos4210-universal_c210.dtb \
-	exynos4210-trats.dtb \
-	exynos4412-trats2.dtb \
-	exynos4412-odroid.dtb
-
-dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \
-	exynos5250-snow.dtb \
-	exynos5250-spring.dtb \
-	exynos5250-smdk5250.dtb \
-	exynos5420-smdk5420.dtb \
-	exynos5420-peach-pit.dtb \
-	exynos5800-peach-pi.dtb \
-	exynos5422-odroidxu3.dtb
-dtb-$(CONFIG_ARCH_ROCKCHIP) += \
-	rk3288-firefly.dtb \
-	rk3288-jerry.dtb \
-	rk3036-sdk.dtb
-dtb-$(CONFIG_TEGRA) += tegra20-harmony.dtb \
-	tegra20-medcom-wide.dtb \
-	tegra20-paz00.dtb \
-	tegra20-plutux.dtb \
-	tegra20-seaboard.dtb \
-	tegra20-tec.dtb \
-	tegra20-trimslice.dtb \
-	tegra20-ventana.dtb \
-	tegra20-whistler.dtb \
-	tegra20-colibri.dtb \
-	tegra30-apalis.dtb \
-	tegra30-beaver.dtb \
-	tegra30-cardhu.dtb \
-	tegra30-colibri.dtb \
-	tegra30-tec-ng.dtb \
-	tegra114-dalmore.dtb \
-	tegra124-jetson-tk1.dtb \
-	tegra124-nyan-big.dtb \
-	tegra124-venice2.dtb \
-	tegra210-e2220-1170.dtb \
-	tegra210-p2371-0000.dtb \
-	tegra210-p2371-2180.dtb \
-	tegra210-p2571.dtb
-
-dtb-$(CONFIG_ARCH_MVEBU) +=			\
-	armada-388-gp.dtb			\
-	armada-xp-gp.dtb
-
-dtb-$(CONFIG_ARCH_UNIPHIER) += \
-	uniphier-ph1-ld4-ref.dtb \
-	uniphier-ph1-ld6b-ref.dtb \
-	uniphier-ph1-pro4-ref.dtb \
-	uniphier-ph1-pro5-4kbox.dtb \
-	uniphier-ph1-sld3-ref.dtb \
-	uniphier-ph1-sld8-ref.dtb \
-	uniphier-proxstream2-gentil.dtb \
-	uniphier-proxstream2-vodka.dtb
-dtb-$(CONFIG_ARCH_ZYNQ) += zynq-zc702.dtb \
-	zynq-zc706.dtb \
-	zynq-zed.dtb \
-	zynq-zybo.dtb \
-	zynq-microzed.dtb \
-	zynq-picozed.dtb \
-	zynq-zc770-xm010.dtb \
-	zynq-zc770-xm011.dtb \
-	zynq-zc770-xm012.dtb \
-	zynq-zc770-xm013.dtb
-dtb-$(CONFIG_ARCH_ZYNQMP) += \
-	zynqmp-ep108.dtb
-dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-evm.dtb
-dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb
-
-dtb-$(CONFIG_ARCH_SOCFPGA) +=				\
-	socfpga_arria5_socdk.dtb			\
-	socfpga_cyclone5_mcvevk.dtb			\
-	socfpga_cyclone5_socdk.dtb			\
-	socfpga_cyclone5_de0_nano_soc.dtb			\
-	socfpga_cyclone5_sockit.dtb			\
-	socfpga_cyclone5_socrates.dtb			\
-	socfpga_cyclone5_sr1500.dtb
-
-dtb-$(CONFIG_TARGET_DRA7XX_EVM) += dra72-evm.dtb dra7-evm.dtb
-dtb-$(CONFIG_TARGET_BEAGLE_X15) += am57xx-beagle-x15.dtb
-dtb-$(CONFIG_TARGET_STV0991) += stv0991.dtb
-
-dtb-$(CONFIG_LS102XA) += ls1021a-qds.dtb \
-	ls1021a-twr.dtb
-dtb-$(CONFIG_FSL_LSCH3) += fsl-ls2080a-qds.dtb \
-	fsl-ls2080a-rdb.dtb
-dtb-$(CONFIG_FSL_LSCH2) += fsl-ls1043a-qds.dtb \
-	fsl-ls1043a-rdb.dtb
-
-dtb-$(CONFIG_MACH_SUN4I) += \
-	sun4i-a10-a1000.dtb \
-	sun4i-a10-ba10-tvbox.dtb \
-	sun4i-a10-chuwi-v7-cw0825.dtb \
-	sun4i-a10-cubieboard.dtb \
-	sun4i-a10-gemei-g9.dtb \
-	sun4i-a10-hackberry.dtb \
-	sun4i-a10-hyundai-a7hd.dtb \
-	sun4i-a10-inet1.dtb \
-	sun4i-a10-inet-3f.dtb \
-	sun4i-a10-inet-3w.dtb \
-	sun4i-a10-inet97fv2.dtb \
-	sun4i-a10-inet9f-rev03.dtb \
-	sun4i-a10-itead-iteaduino-plus.dtb \
-	sun4i-a10-jesurun-q5.dtb \
-	sun4i-a10-marsboard.dtb \
-	sun4i-a10-mini-xplus.dtb \
-	sun4i-a10-mk802.dtb \
-	sun4i-a10-mk802ii.dtb \
-	sun4i-a10-olinuxino-lime.dtb \
-	sun4i-a10-pcduino.dtb \
-	sun4i-a10-pov-protab2-ips9.dtb
-dtb-$(CONFIG_MACH_SUN5I) += \
-	sun5i-a10s-auxtek-t003.dtb \
-	sun5i-a10s-auxtek-t004.dtb \
-	sun5i-a10s-mk802.dtb \
-	sun5i-a10s-olinuxino-micro.dtb \
-	sun5i-a10s-r7-tv-dongle.dtb \
-	sun5i-a10s-wobo-i5.dtb \
-	sun5i-a13-ampe-a76.dtb \
-	sun5i-a13-empire-electronix-d709.dtb \
-	sun5i-a13-hsg-h702.dtb \
-	sun5i-a13-inet-86vs.dtb \
-	sun5i-a13-inet-98v-rev2.dtb \
-	sun5i-a13-olinuxino.dtb \
-	sun5i-a13-olinuxino-micro.dtb \
-	sun5i-a13-q8-tablet.dtb \
-	sun5i-a13-utoo-p66.dtb \
-	sun5i-r8-chip.dtb
-dtb-$(CONFIG_MACH_SUN6I) += \
-	sun6i-a31-app4-evb1.dtb \
-	sun6i-a31-colombus.dtb \
-	sun6i-a31-hummingbird.dtb \
-	sun6i-a31-i7.dtb \
-	sun6i-a31-m9.dtb \
-	sun6i-a31-mele-a1000g-quad.dtb \
-	sun6i-a31-mixtile-loftq.dtb \
-	sun6i-a31s-cs908.dtb \
-	sun6i-a31s-primo81.dtb \
-	sun6i-a31s-sinovoip-bpi-m2.dtb
-dtb-$(CONFIG_MACH_SUN7I) += \
-	sun7i-a20-ainol-aw1.dtb \
-	sun7i-a20-bananapi.dtb \
-	sun7i-a20-bananapro.dtb \
-	sun7i-a20-cubieboard2.dtb \
-	sun7i-a20-cubietruck.dtb \
-	sun7i-a20-hummingbird.dtb \
-	sun7i-a20-i12-tvbox.dtb \
-	sun7i-a20-lamobo-r1.dtb \
-	sun7i-a20-m3.dtb \
-	sun7i-a20-m5.dtb \
-	sun7i-a20-mk808c.dtb \
-	sun7i-a20-olimex-som-evb.dtb \
-	sun7i-a20-olinuxino-lime.dtb \
-	sun7i-a20-olinuxino-lime2.dtb \
-	sun7i-a20-olinuxino-micro.dtb \
-	sun7i-a20-orangepi.dtb \
-	sun7i-a20-orangepi-mini.dtb \
-	sun7i-a20-pcduino3.dtb \
-	sun7i-a20-pcduino3-nano.dtb \
-	sun7i-a20-primo73.dtb \
-	sun7i-a20-wexler-tab7200.dtb \
-	sun7i-a20-wits-pro-a20-dkt.dtb \
-	sun7i-a20-yones-toptech-bd1078.dtb
-dtb-$(CONFIG_MACH_SUN8I_A23) += \
-	sun8i-a23-evb.dtb \
-	sun8i-a23-gt90h-v4.dtb \
-	sun8i-a23-q8-tablet.dtb
-dtb-$(CONFIG_MACH_SUN8I_A33) += \
-	sun8i-a33-ga10h-v1.1.dtb \
-	sun8i-a33-q8-tablet.dtb \
-	sun8i-a33-sinlinx-sina33.dtb
-dtb-$(CONFIG_MACH_SUN8I_A83T) += \
-	sun8i-a83t-allwinner-h8homlet-v2.dtb
-dtb-$(CONFIG_MACH_SUN8I_H3) += \
-	sun8i-h3-orangepi-pc.dtb \
-	sun8i-h3-orangepi-plus.dtb
-dtb-$(CONFIG_MACH_SUN9I) += \
-	sun9i-a80-optimus.dtb \
-	sun9i-a80-cubieboard4.dtb
-
-dtb-$(CONFIG_VF610) += vf500-colibri.dtb \
-	vf610-colibri.dtb
-
-dtb-$(CONFIG_SOC_KEYSTONE) += k2hk-evm.dtb \
-	k2l-evm.dtb \
-	k2e-evm.dtb \
-	k2g-evm.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#30 lore raw

PATCH v2 6/9 microblaze: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/microblaze/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/microblaze/dts/Makefile +2 -1
index 5e70d9e..eaeb26f 100644
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += microblaze-generic.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#31 lore raw

PATCH v2 6/9 microblaze: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

Quoted 22 lines · Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/microblaze/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/microblaze/dts/Makefile +0 -0
index 5e70d9e..eaeb26f 100644

arch/microblaze/dts/Makefile line 9

Quoted 9 lines
arch/microblaze/dts/Makefile +2 -1
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += microblaze-generic.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 

Thanks,
Michal

#32 lore raw

PATCH v2 7/9 powerpc: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/powerpc/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/powerpc/dts/Makefile +2 -1
index 5d9f5c2..eaeb26f 100644
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_TARGET_CANYONLANDS) += arches.dtb canyonlands.dtb glacier.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#33 lore raw

PATCH v2 8/9 sandbox: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/sandbox/dts/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
arch/sandbox/dts/Makefile +2 -1
index 0197569..7260256 100644
@@ -2,7 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-$(CONFIG_SANDBOX) += sandbox.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 dtb-$(CONFIG_UT_DM) += test.dtb
 
 targets += $(dtb-y)
Signature · 1 line
2.5.0
#34 lore raw

PATCH v2 9/9 x86: use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE

In reply to Thomas Chou

Use generic dtb rule with CONFIG_DEFAULT_DEVICE_TREE, so that there is no need to list all the dtb for different targets/boards in Makefile.

Support list of Device Tree in DEFAULT_DEVICE_TREE. Each DT in the list will be compiled. The first will be used as default to ship.

---
v2
add list support as Simon suggested.

 arch/x86/dts/Makefile | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
arch/x86/dts/Makefile +2 -10
index 64e5694..eaeb26f 100644
@@ -2,16 +2,8 @@
 # SPDX-License-Identifier:	GPL-2.0+
 #
 
-dtb-y += bayleybay.dtb \
-	chromebook_link.dtb \
-	chromebox_panther.dtb \
-	crownbay.dtb \
-	efi.dtb \
-	galileo.dtb \
-	minnowmax.dtb \
-	qemu-x86_i440fx.dtb \
-	qemu-x86_q35.dtb \
-	broadwell_som-6896.dtb
+DEVICE_TREE_LIST ?= $(subst $\",,$(CONFIG_DEFAULT_DEVICE_TREE))
+dtb-y += $(DEVICE_TREE_LIST:=.dtb)
 
 targets += $(dtb-y)
 
Signature · 1 line
2.5.0
#35 lore raw

PATCH v2 1/9 devicetree: use wildcard to clean arch subdir

In reply to Thomas Chou
Quoted 11 lines · Thomas Chou

Use wildcard to clean arch subdirectories, as it is cleaner than listing all the arch which builds dtb.

---
v2
no change

 dts/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to u-boot-fdt, thanks!

I'm not planning on applying the other patches as I prefer the Makefile approach at present. But I would like to have a way of shipping multiple device trees (i.e. attaching more than one in u-boot-dtb.bin).

- Simon