Skip to contentSkip to conversation

ARM: dts: TI: Enable __symbols__ in dtb files for some platforms

PATCH In review Tom Rini 2 participants 5 messages Aug 16, 2017 – Aug 17, 2017

Subsystems (2)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 ARM: dts: TI: Enable __symbols__ in dtb files for some platforms

Build the dtb file for these platfroms with __symbol__ information included. This will reduce the size of the dtb (and resident memory usage) in exchange for allowing more types of overlays to be applied to the dtb file prior to passing it to Linux and additional functionality within the kernel when OF_OVERLAY is enabled.

Cc Jason Kridner <[email protected]>
Cc Drew Fustini <[email protected]>
Cc Robert Nelson <[email protected]>
Cc Lokesh Vutla <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Russell King <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---
This patch takes the path that Rob encouraged in my previous patch of enabling __symbols__ in some platforms now (that can use it) and see if a critical mass evolves that pushes towards -@ being default for all dtbs. I would suggest that the dra76 series be respun to include a hunk like this at least as well, and if there's another Beagle X15 patch, that too. Russell, per some of our conversations, something like would also be needed as part of using overlays to solve some of the problems with Hummingboard, etc.

---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/Makefile +14 -0
index 4b17f35dc9a7..6f98422ca00e 100644
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@
Signature · 1 line
1.9.1
#1 lore raw
Quoted 2 lines · Tom Rini

Build the dtb file for these platfroms with __symbol__ information included. This will reduce the size of the dtb (and resident memory

typo: reduce the size should be increase the size

Quoted 42 lines

usage) in exchange for allowing more types of overlays to be applied to the dtb file prior to passing it to Linux and additional functionality within the kernel when OF_OVERLAY is enabled.

Cc Jason Kridner <[email protected]>
Cc Drew Fustini <[email protected]>
Cc Robert Nelson <[email protected]>
Cc Lokesh Vutla <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Russell King <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---
This patch takes the path that Rob encouraged in my previous patch of enabling __symbols__ in some platforms now (that can use it) and see if a critical mass evolves that pushes towards -@ being default for all dtbs. I would suggest that the dra76 series be respun to include a hunk like this at least as well, and if there's another Beagle X15 patch, that too. Russell, per some of our conversations, something like would also be needed as part of using overlays to solve some of the problems with Hummingboard, etc.

---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/Makefile +4 -0
index 4b17f35dc9a7..6f98422ca00e 100644
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@

arch/arm/boot/dts/Makefile dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts · line 1079

Quoted 10 lines
arch/arm/boot/dts/Makefile +10 -0
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@

I would prefer that instead of "-@", a configurable value be used.

The current form of the patch imposes the extra overhead even for those who do not want to use any overlay.

Using a kernel CONFIG_ value for the "configurable value" is not desired because it adds a kernel configuration dependency to what is contained in a dtb. I do not know if we can find another better way to make this configurable. AMaybe Rob's suggestion of a shell variable used in the make command.

#2 lore raw
Quoted 53 lines · Frank Rowand
Quoted 2 lines · Tom Rini

Build the dtb file for these platfroms with __symbol__ information included. This will reduce the size of the dtb (and resident memory

typo: reduce the size should be increase the size

Quoted 46 lines

usage) in exchange for allowing more types of overlays to be applied to the dtb file prior to passing it to Linux and additional functionality within the kernel when OF_OVERLAY is enabled.

Cc Jason Kridner <[email protected]>
Cc Drew Fustini <[email protected]>
Cc Robert Nelson <[email protected]>
Cc Lokesh Vutla <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Russell King <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---
This patch takes the path that Rob encouraged in my previous patch of enabling __symbols__ in some platforms now (that can use it) and see if a critical mass evolves that pushes towards -@ being default for all dtbs. I would suggest that the dra76 series be respun to include a hunk like this at least as well, and if there's another Beagle X15 patch, that too. Russell, per some of our conversations, something like would also be needed as part of using overlays to solve some of the problems with Hummingboard, etc.

---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/Makefile +9 -0
index 4b17f35dc9a7..6f98422ca00e 100644
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
Quoted 8 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts · line 1079

Quoted 6 lines
arch/arm/boot/dts/Makefile +5 -0
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@

I would prefer that instead of "-@", a configurable value be used.

I stated that poorly. It was intended conceptually, not literally.

One possible concrete implementation would be to use something other than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based on some sort of configurable value.

Quoted 9 lines

The current form of the patch imposes the extra overhead even for those who do not want to use any overlay.

Using a kernel CONFIG_ value for the "configurable value" is not desired because it adds a kernel configuration dependency to what is contained in a dtb. I do not know if we can find another better way to make this configurable. AMaybe Rob's suggestion of a shell variable used in the make command.

author
#3 lore raw
Quoted 63 lines · Frank Rowand
Quoted 53 lines · Frank Rowand
Quoted 2 lines · Tom Rini

Build the dtb file for these platfroms with __symbol__ information included. This will reduce the size of the dtb (and resident memory

typo: reduce the size should be increase the size

Quoted 46 lines

usage) in exchange for allowing more types of overlays to be applied to the dtb file prior to passing it to Linux and additional functionality within the kernel when OF_OVERLAY is enabled.

Cc Jason Kridner <[email protected]>
Cc Drew Fustini <[email protected]>
Cc Robert Nelson <[email protected]>
Cc Lokesh Vutla <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Russell King <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---
This patch takes the path that Rob encouraged in my previous patch of enabling __symbols__ in some platforms now (that can use it) and see if a critical mass evolves that pushes towards -@ being default for all dtbs. I would suggest that the dra76 series be respun to include a hunk like this at least as well, and if there's another Beagle X15 patch, that too. Russell, per some of our conversations, something like would also be needed as part of using overlays to solve some of the problems with Hummingboard, etc.

---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/Makefile +9 -0
index 4b17f35dc9a7..6f98422ca00e 100644
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
Quoted 8 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts · line 1079

Quoted 6 lines
arch/arm/boot/dts/Makefile +5 -0
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@

I would prefer that instead of "-@", a configurable value be used.

Quoted 6 lines

I stated that poorly. It was intended conceptually, not literally.

One possible concrete implementation would be to use something other than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based on some sort of configurable value.

So you would have to pass in a flag, and then set a CONFIG option for "please use this flag I just explicitly set" ?

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170816/50c12a0c/attachment.sig>
#4 lore raw
Quoted 66 lines · Tom Rini
Quoted 65 lines · Frank Rowand
Quoted 53 lines · Frank Rowand
Quoted 2 lines · Tom Rini

Build the dtb file for these platfroms with __symbol__ information included. This will reduce the size of the dtb (and resident memory

typo: reduce the size should be increase the size

Quoted 46 lines

usage) in exchange for allowing more types of overlays to be applied to the dtb file prior to passing it to Linux and additional functionality within the kernel when OF_OVERLAY is enabled.

Cc Jason Kridner <[email protected]>
Cc Drew Fustini <[email protected]>
Cc Robert Nelson <[email protected]>
Cc Lokesh Vutla <[email protected]>
Cc Frank Rowand <[email protected]>
Cc Rob Herring <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Russell King <[email protected]>
Cc devicetree at vger.kernel.org
Cc linux-arm-kernel at lists.infradead.org
Cc linux-kernel at vger.kernel.org

---
This patch takes the path that Rob encouraged in my previous patch of enabling __symbols__ in some platforms now (that can use it) and see if a critical mass evolves that pushes towards -@ being default for all dtbs. I would suggest that the dra76 series be respun to include a hunk like this at least as well, and if there's another Beagle X15 patch, that too. Russell, per some of our conversations, something like would also be needed as part of using overlays to solve some of the problems with Hummingboard, etc.

---
 arch/arm/boot/dts/Makefile | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
arch/arm/boot/dts/Makefile +9 -0
index 4b17f35dc9a7..6f98422ca00e 100644
@@ -1063,3 +1063,17 @@ dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts
 
 always		:= $(dtb-y)
 clean-files	:= *.dtb
+
+# enable creation of __symbols__ node
+DTC_FLAGS_am335x-bone += -@
+DTC_FLAGS_am335x-boneblack += -@
+DTC_FLAGS_am335x-boneblack-wireless += -@
+DTC_FLAGS_am335x-boneblue += -@
+DTC_FLAGS_am335x-bonegreen += -@
+DTC_FLAGS_am335x-bonegreen-wireless += -@
+DTC_FLAGS_am57xx-beagle-x15 += -@
Quoted 8 lines

arch/arm/boot/dts/Makefile dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dts · line 1079

Quoted 6 lines
arch/arm/boot/dts/Makefile +5 -0
+DTC_FLAGS_am57xx-beagle-x15-revb1 += -@
+DTC_FLAGS_dra7-evm += -@
+DTC_FLAGS_dra72-evm += -@
+DTC_FLAGS_dra72-evm-revc += -@
+DTC_FLAGS_dra71-evm += -@

I would prefer that instead of "-@", a configurable value be used.

I stated that poorly. It was intended conceptually, not literally.

Quoted 7 lines
Quoted 4 lines

One possible concrete implementation would be to use something other than DTC_FLAGS, for example DTC_FLAGS_EXTRA, then have the build system choose whether to fold DTC_FLAGS_EXTRA into DTC_FLAGS, based on some sort of configurable value.

So you would have to pass in a flag, and then set a CONFIG option for "please use this flag I just explicitly set" ?

I'm aware there is some ugliness there, and still open to someone having a better idea that we have not yet considered.

But yes, the desired functionality over rides the ugliness. Forcing the overhead for all users of the board, even those who will never use an overlay is not a good choice. The ability to opt out is important.