forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib
If CONFIG_OF_ALL_DTBS is enabled, "make ARCH=arm64 dtbs" compiles each DTB twice; one from arch/arm64/boot/dts/*/Makefile and the other from the dtb-$(CONFIG_OF_ALL_DTBS) line in arch/arm64/boot/dts/Makefile. It could be a race problem when building DTBS in parallel. Another minor issue is CONFIG_OF_ALL_DTBS covers only *.dts in vendor sub-directories, so this broke when Broadcom added one more hierarchy in arch/arm64/boot/dts/broadcom/<soc>/. One idea to fix the issues in a clean way is to move DTB handling to Kbuild core scripts. Makefile.dtbinst already recognizes dtb-y natively, so it should not hurt to do so. Add $(dtb-y) to extra-y, and $(dtb-) as well if CONFIG_OF_ALL_DTBS is enabled. All clutter things in Makefiles go away. As a bonus clean-up, I also removed dts-dirs. Just use subdir-y directly to traverse sub-directories. Signed-off-by: Masahiro Yamada <[email protected]> Acked-by: Arnd Bergmann <[email protected]> [robh: corrected BUILTIN_DTB to CONFIG_BUILTIN_DTB] Signed-off-by: Rob Herring <[email protected]>
- Loading branch information
1 parent
3cad14d
commit 7e7962d
Showing
48 changed files
with
53 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,25 @@ | ||
dts-dirs += actions | ||
dts-dirs += al | ||
dts-dirs += allwinner | ||
dts-dirs += altera | ||
dts-dirs += amd | ||
dts-dirs += amlogic | ||
dts-dirs += apm | ||
dts-dirs += arm | ||
dts-dirs += broadcom | ||
dts-dirs += cavium | ||
dts-dirs += exynos | ||
dts-dirs += freescale | ||
dts-dirs += hisilicon | ||
dts-dirs += marvell | ||
dts-dirs += mediatek | ||
dts-dirs += nvidia | ||
dts-dirs += qcom | ||
dts-dirs += realtek | ||
dts-dirs += renesas | ||
dts-dirs += rockchip | ||
dts-dirs += socionext | ||
dts-dirs += sprd | ||
dts-dirs += xilinx | ||
dts-dirs += lg | ||
dts-dirs += zte | ||
|
||
subdir-y := $(dts-dirs) | ||
|
||
dtstree := $(srctree)/$(src) | ||
|
||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts))) | ||
|
||
always := $(dtb-y) | ||
subdir-y += actions | ||
subdir-y += al | ||
subdir-y += allwinner | ||
subdir-y += altera | ||
subdir-y += amd | ||
subdir-y += amlogic | ||
subdir-y += apm | ||
subdir-y += arm | ||
subdir-y += broadcom | ||
subdir-y += cavium | ||
subdir-y += exynos | ||
subdir-y += freescale | ||
subdir-y += hisilicon | ||
subdir-y += marvell | ||
subdir-y += mediatek | ||
subdir-y += nvidia | ||
subdir-y += qcom | ||
subdir-y += realtek | ||
subdir-y += renesas | ||
subdir-y += rockchip | ||
subdir-y += socionext | ||
subdir-y += sprd | ||
subdir-y += xilinx | ||
subdir-y += lg | ||
subdir-y += zte |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
dtb-$(CONFIG_ARCH_ACTIONS) += s900-bubblegum-96.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
dtb-$(CONFIG_ARCH_ALPINE) += alpine-v2-evp.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
dtb-$(CONFIG_ARCH_STRATIX10) += socfpga_stratix10_socdk.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
dtb-$(CONFIG_ARCH_SEATTLE) += amd-overdrive.dtb \ | ||
amd-overdrive-rev-b0.dtb amd-overdrive-rev-b1.dtb \ | ||
husky.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_XGENE) += apm-mustang.dtb | ||
dtb-$(CONFIG_ARCH_XGENE) += apm-merlin.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
dtb-$(CONFIG_ARCH_BCM2835) += bcm2837-rpi-3-b.dtb | ||
|
||
dts-dirs += northstar2 | ||
dts-dirs += stingray | ||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) | ||
subdir-y += northstar2 | ||
subdir-y += stingray |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-svk.dtb | ||
dtb-$(CONFIG_ARCH_BCM_IPROC) += ns2-xmc.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_BCM_IPROC) += bcm958742k.dtb | ||
dtb-$(CONFIG_ARCH_BCM_IPROC) += bcm958742t.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_THUNDER) += thunder-88xx.dtb | ||
dtb-$(CONFIG_ARCH_THUNDER2) += thunder2-99xx.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_LG1K) += lg1312-ref.dtb | ||
dtb-$(CONFIG_ARCH_LG1K) += lg1313-ref.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
dtb-$(CONFIG_ARCH_REALTEK) += rtd1295-zidoo-x9s.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_SPRD) += sc9836-openphone.dtb \ | ||
sp9860g-1h10.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
dtb-$(CONFIG_ARCH_ZYNQMP) += zynqmp-ep108.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,2 @@ | ||
dtb-$(CONFIG_ARCH_ZX) += zx296718-evb.dtb | ||
dtb-$(CONFIG_ARCH_ZX) += zx296718-pcbox.dtb | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
dts-dirs += brcm | ||
dts-dirs += cavium-octeon | ||
dts-dirs += img | ||
dts-dirs += ingenic | ||
dts-dirs += lantiq | ||
dts-dirs += mti | ||
dts-dirs += netlogic | ||
dts-dirs += ni | ||
dts-dirs += pic32 | ||
dts-dirs += qca | ||
dts-dirs += ralink | ||
dts-dirs += xilfpga | ||
subdir-y += brcm | ||
subdir-y += cavium-octeon | ||
subdir-y += img | ||
subdir-y += ingenic | ||
subdir-y += lantiq | ||
subdir-y += mti | ||
subdir-y += netlogic | ||
subdir-y += ni | ||
subdir-y += pic32 | ||
subdir-y += qca | ||
subdir-y += ralink | ||
subdir-y += xilfpga | ||
|
||
obj-y := $(addsuffix /, $(dts-dirs)) | ||
|
||
dtstree := $(srctree)/$(src) | ||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(foreach d,$(dts-dirs), $(wildcard $(dtstree)/$(d)/*.dts))) | ||
|
||
always := $(dtb-y) | ||
subdir-y := $(dts-dirs) | ||
obj-$(CONFIG_BUILTIN_DTB) := $(addsuffix /, $(subdir-y)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.