ARM: dts: TI: add support for TI SoC overlays
Subsystems (3)
v2 cover ARM: dts: TI: add support for TI SoC overlays
Hi,
This series is the final piece of the code to get build support for Texas Instruments SoC DT overlays in place. Basically we just modify the makefiles to add DTC_FLAGS for symbols, which are needed to actually apply the overlays properly. This series depends on [1].
v2 of the series is just a split of the v1 which had the whole support included in one series.
-Tero
[1] https://marc.info/?l=linux-arm-kernel&m=153571979318346&w=2
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH v2 1/2 ARM: dts: ti: add support for building Texas Instruments specific overlays
Add support for TI specific DT subdir, along with support for building DT overlays. Right now, no DT files are specified in this directory, those are to be added later.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/ti/Makefile | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 arch/arm/boot/dts/ti/Makefile
arch/arm/boot/dts/Makefile +1 -0
@@ -755,6 +755,7 @@ dtb-$(CONFIG_SOC_DRA7XX) += \ dra72-evm-revc.dtb \ dra71-evm.dtb \ dra76-evm.dtb +subdir-$(CONFIG_SOC_DRA7XX) += ti dtb-$(CONFIG_ARCH_ORION5X) += \ orion5x-kuroboxpro.dtb \ orion5x-lacie-d2-network.dtb \
arch/arm/boot/dts/ti/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Make file to build device tree binaries for boards based on +# Texas Instruments Inc processors +# +# Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ +# + +DTC_FLAGS += -@
Signature · 4 lines
1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH v2 2/2 arm64: ti: add support for building Texas instruments overlays
In reply to Tero KristoAdd the symbols to TI build DT files, for supporting overlays. Right now, there are no overlay files introduced, those shall be added later on.
--- arch/arm64/boot/dts/ti/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/ti/Makefile +2 -0
@@ -6,4 +6,6 @@ # Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ # +DTC_FLAGS += -@ + dtb-$(CONFIG_ARCH_K3_AM6_SOC) += k3-am654-base-board.dtb
Signature · 4 lines
1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
v2 cover ARM: dts: TI: add support for TI SoC overlays
In reply to Tero KristoHi,
This series is the final piece of the code to get build support for Texas Instruments SoC DT overlays in place. Basically we just modify the makefiles to add DTC_FLAGS for symbols, which are needed to actually apply the overlays properly. This series depends on [1].
v2 of the series is just a split of the v1 which had the whole support included in one series.
Resending as I missed Frank from delivery of the initial v2.
-Tero
[1] https://marc.info/?l=linux-arm-kernel&m=153604844620162&w=2
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH RESEND v2 1/2 ARM: dts: ti: add support for building Texas Instruments specific overlays
Add support for TI specific DT subdir, along with support for building DT overlays. Right now, no DT files are specified in this directory, those are to be added later.
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/ti/Makefile | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 arch/arm/boot/dts/ti/Makefile
arch/arm/boot/dts/Makefile +1 -0
@@ -755,6 +755,7 @@ dtb-$(CONFIG_SOC_DRA7XX) += \ dra72-evm-revc.dtb \ dra71-evm.dtb \ dra76-evm.dtb +subdir-$(CONFIG_SOC_DRA7XX) += ti dtb-$(CONFIG_ARCH_ORION5X) += \ orion5x-kuroboxpro.dtb \ orion5x-lacie-d2-network.dtb \
arch/arm/boot/dts/ti/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Make file to build device tree binaries for boards based on +# Texas Instruments Inc processors +# +# Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ +# + +DTC_FLAGS += -@
Signature · 4 lines
1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH RESEND v2 1/2 ARM: dts: ti: add support for building Texas Instruments specific overlays
Quoted 16 lines · Tero Kristo
Add support for TI specific DT subdir, along with support for building DT overlays. Right now, no DT files are specified in this directory, those are to be added later.
Signed-off-by Tero Kristo <[email protected]>--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/ti/Makefile | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 arch/arm/boot/dts/ti/Makefilearch/arm/boot/dts/Makefile +0
-0
arch/arm/boot/dts/Makefile dtb-$(CONFIG_SOC_DRA7XX) += \ · line 761
Quoted 7 lines
arch/arm/boot/dts/Makefile +1
-0@@ -755,6 +755,7 @@ dtb-$(CONFIG_SOC_DRA7XX) += \ dra72-evm-revc.dtb \ dra71-evm.dtb \ dra76-evm.dtb +subdir-$(CONFIG_SOC_DRA7XX) += ti dtb-$(CONFIG_ARCH_ORION5X) += \ orion5x-kuroboxpro.dtb \ orion5x-lacie-d2-network.dtb \
My memory of previous discussion of creating subdirectories beneath arch/arm/boot/dts/ has faded. Or maybe such discussion never occurred.
Maybe Rob or someone else has a memory of such discussion. If they don't chime in with a pointer, can you search for that discussion? And if it occurred, what the general consensus was, and why it never was implemented?
Quoted 7 lines
arch/arm/boot/dts/ti/Makefile new file +0
-0
arch/arm/boot/dts/ti/Makefile line 9
Quoted 9 lines
arch/arm/boot/dts/ti/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Make file to build device tree binaries for boards based on +# Texas Instruments Inc processors +# +# Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ +# + +DTC_FLAGS += -@
I will nack any attempt to unconditionally compile a devicetree file with the -@ flag (which adds symbols to the resulting .dtb). The resulting overhead is not acceptable.
Adding the symbols must be under the control of the person either creating or using the .dtb. The way to provide that control is the challenging part.
One way would be to configure the compile option via kbuild configuration. There is opposition to this approach because it makes the .dtb dependent on the Linux kernel configuration. So suggestions of an alternative mechanism would be welcome.
Another _possible_ solution would be to add a dtc_strip tool to the dtc project. dtc_strip would remove the symbol information from a .dtb, in a manner that is analogous to strip removing debug information from a program file.
One aspect of unconditionally building a .dtb with symbols, then optionally removing the symbols with dtc_strip is that it seems like a backwards process. For example, we don't build the kernel with debug symbols then strip the symbols out when we don't want them. I'll have to mull this over if the dtc_strip method sounds like a good approach to other people.
PATCH RESEND v2 1/2 ARM: dts: ti: add support for building Texas Instruments specific overlays
Hi Frank,
Quoted 25 lines · Frank Rowand
Quoted 10 lines · Tero Kristo
Add support for TI specific DT subdir, along with support for building DT overlays. Right now, no DT files are specified in this directory, those are to be added later.
Signed-off-by Tero Kristo <[email protected]>arch/arm/boot/dts/ti/Makefile line 9
Quoted 9 lines
arch/arm/boot/dts/ti/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Make file to build device tree binaries for boards based on +# Texas Instruments Inc processors +# +# Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ +# + +DTC_FLAGS += -@I will nack any attempt to unconditionally compile a devicetree file with the -@ flag (which adds symbols to the resulting .dtb). The resulting overhead is not acceptable.
Quoted 7 lines
Adding the symbols must be under the control of the person either creating or using the .dtb. The way to provide that control is the challenging part.
One way would be to configure the compile option via kbuild configuration. There is opposition to this approach because it makes the .dtb dependent on the Linux kernel configuration. So suggestions of an alternative mechanism would be welcome.
IMHO that would be quite a "soft" dependency: it's just about adding symbols or not. No real dependency on Linux or kernel features.
Quoted 4 lines
Another _possible_ solution would be to add a
dtc_striptool to the dtc project.dtc_stripwould remove the symbol information from a .dtb, in a manner that is analogous to strip removing debug information from a program file.
Removing unwanted symbols is indeed easier than adding them to an existing DTB.
Quoted 6 lines
One aspect of unconditionally building a .dtb with symbols, then optionally removing the symbols with
dtc_stripis that it seems like a backwards process. For example, we don't build the kernel with debug symbols then strip the symbols out when we don't want them. I'll have to mull this over if thedtc_stripmethod sounds like a good approach to other people.
That's not a fair comparison: DTB symbols are not debug information, but an ABI. It's more akin to exporting kernel symbols to (possible out-of-tree) kernel modules, which is controlled by CONFIG_MODULES.
So a Kconfig symbol to enable it, and a dtc_strip for removing them, makes most sense to me.
BTW, we do run strip on vmlinux ;-)
Gr{oetje,eeting}s,
Geert
Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert at linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH RESEND v2 1/2 ARM: dts: ti: add support for building Texas Instruments specific overlays
Hey,
I think this topic has went stale, but I believe I figured out a way to work with overlays at the moment.
Basically involves couple of steps:
1) Save the overlay source files under existing file folders, and use the same .dts file type for them as for typical DT source files.
2) Use "make DTC_FLAGS=-@ dtbs" to compile everything, or some variant of this (if want to compile single file for example.) Basically need to add that DTC_FLAGS build flag only.
So, the question is, is this acceptable approach? Can we start posting overlay files for upstream to pick up, with the /plugin/ directive within the files, and use .dts as their file type?
All the patches I posted so far just attempted to make the system more maintainable (read: more readable for human beings, with the .dt*o file types, separated folders for the DTC_FLAGS and everything), but it seems it should be possible to live without any of that.
-Tero
Quoted 58 lines · Geert Uytterhoeven
Hi Frank,
Quoted 25 lines · Frank Rowand
Quoted 10 lines · Tero Kristo
Add support for TI specific DT subdir, along with support for building DT overlays. Right now, no DT files are specified in this directory, those are to be added later.
Signed-off-by Tero Kristo <[email protected]>arch/arm/boot/dts/ti/Makefile line 9
Quoted 9 lines
arch/arm/boot/dts/ti/Makefile new file +9
-0@@ -0,0 +1,9 @@ +# SPDX-License-Identifier: GPL-2.0 +# +# Make file to build device tree binaries for boards based on +# Texas Instruments Inc processors +# +# Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ +# + +DTC_FLAGS += -@I will nack any attempt to unconditionally compile a devicetree file with the -@ flag (which adds symbols to the resulting .dtb). The resulting overhead is not acceptable.
Quoted 7 lines
Adding the symbols must be under the control of the person either creating or using the .dtb. The way to provide that control is the challenging part.
One way would be to configure the compile option via kbuild configuration. There is opposition to this approach because it makes the .dtb dependent on the Linux kernel configuration. So suggestions of an alternative mechanism would be welcome.
IMHO that would be quite a "soft" dependency: it's just about adding symbols or not. No real dependency on Linux or kernel features.
Quoted 4 lines
Another _possible_ solution would be to add a
dtc_striptool to the dtc project.dtc_stripwould remove the symbol information from a .dtb, in a manner that is analogous to strip removing debug information from a program file.Removing unwanted symbols is indeed easier than adding them to an existing DTB.
Quoted 6 lines
One aspect of unconditionally building a .dtb with symbols, then optionally removing the symbols with
dtc_stripis that it seems like a backwards process. For example, we don't build the kernel with debug symbols then strip the symbols out when we don't want them. I'll have to mull this over if thedtc_stripmethod sounds like a good approach to other people.That's not a fair comparison: DTB symbols are not debug information, but an ABI. It's more akin to exporting kernel symbols to (possible out-of-tree) kernel modules, which is controlled by
CONFIG_MODULES.
Quoted 9 lines
So a
Kconfigsymbol to enable it, and adtc_stripfor removing them, makes most sense to me.BTW, we do run strip on vmlinux ;-)
Gr{oetje,eeting}s,
Geert
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH RESEND v2 2/2 arm64: ti: add support for building Texas instruments overlays
In reply to Tero KristoAdd the symbols to TI build DT files, for supporting overlays. Right now, there are no overlay files introduced, those shall be added later on.
--- arch/arm64/boot/dts/ti/Makefile | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/ti/Makefile +2 -0
@@ -6,4 +6,6 @@ # Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ # +DTC_FLAGS += -@ + dtb-$(CONFIG_ARCH_K3_AM6_SOC) += k3-am654-base-board.dtb
Signature · 4 lines
1.9.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
PATCH RESEND v2 2/2 arm64: ti: add support for building Texas instruments overlays
Quoted 14 lines · Tero Kristo
Add the symbols to TI build DT files, for supporting overlays. Right now, there are no overlay files introduced, those shall be added later on.
Signed-off-by Tero Kristo <[email protected]>--- arch/arm64/boot/dts/ti/Makefile | 2 ++ 1 file changed, 2 insertions(+)arch/arm64/boot/dts/ti/Makefile +0
-0
arch/arm64/boot/dts/ti/Makefile line 11
Quoted 6 lines
arch/arm64/boot/dts/ti/Makefile +2
-0@@ -6,4 +6,6 @@ # Copyright (C) 2016-2018 Texas Instruments Incorporated - http://www.ti.com/ # +DTC_FLAGS += -@ + dtb-$(CONFIG_ARCH_K3_AM6_SOC) += k3-am654-base-board.dtb
same comment as for patch 1/2