All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
@ 2021-05-24 22:40 Yogesh Siraswar
  2021-05-25  1:51 ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Yogesh Siraswar @ 2021-05-24 22:40 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, Nishant Menon; +Cc: meta-ti

Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
compile dtbs with symbols. This fixes the issue where the dtbs
are build without symbols causing issue with overlays.

Enabling overlay support increases the size of the dtb, hence
it is done at a platform level rather than globally to allow custom
boards disable it from local.conf to reduce size.

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
---
 conf/machine/am335x-evm.conf                  | 2 ++
 conf/machine/am335x-hs-evm.conf               | 2 ++
 conf/machine/am437x-evm.conf                  | 2 ++
 conf/machine/am437x-hs-evm.conf               | 2 ++
 conf/machine/am57xx-evm.conf                  | 2 ++
 conf/machine/am57xx-hs-evm.conf               | 3 +++
 conf/machine/am65xx-evm.conf                  | 2 ++
 conf/machine/am65xx-hs-evm.conf               | 2 ++
 conf/machine/dra7xx-evm.conf                  | 2 ++
 conf/machine/dra7xx-hs-evm.conf               | 3 +++
 conf/machine/j7-evm.conf                      | 2 ++
 conf/machine/j7-hs-evm.conf                   | 2 ++
 conf/machine/j7200-evm.conf                   | 2 ++
 conf/machine/k2g-evm.conf                     | 2 ++
 conf/machine/k2g-hs-evm.conf                  | 2 ++
 recipes-kernel/linux/linux-ti-mainline_git.bb | 6 ++++--
 recipes-kernel/linux/linux-ti-staging_5.10.bb | 6 ++++--
 recipes-kernel/linux/ti-kernel.inc            | 9 +++++++++
 18 files changed, 49 insertions(+), 4 deletions(-)
 create mode 100644 recipes-kernel/linux/ti-kernel.inc

diff --git a/conf/machine/am335x-evm.conf b/conf/machine/am335x-evm.conf
index 469c4d37..9486b4c6 100644
--- a/conf/machine/am335x-evm.conf
+++ b/conf/machine/am335x-evm.conf
@@ -13,6 +13,8 @@ IMAGE_FSTYPES += "ubifs ubi"
 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS3"
 SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 # UBI information.  Note that this is board and kernel specific.  Changes
 # in your kernel port may require changes in these variables.  For more
 # details about this board please see
diff --git a/conf/machine/am335x-hs-evm.conf b/conf/machine/am335x-hs-evm.conf
index 7caa5bfd..5b9a8578 100644
--- a/conf/machine/am335x-hs-evm.conf
+++ b/conf/machine/am335x-hs-evm.conf
@@ -16,3 +16,5 @@ UBOOT_RD_LOADADDRESS = "0x84000000"
 UBOOT_RD_ENTRYPOINT = "0x84000000"
 
 TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/am3x"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/am437x-evm.conf b/conf/machine/am437x-evm.conf
index 4e3681d5..ee04f6e0 100644
--- a/conf/machine/am437x-evm.conf
+++ b/conf/machine/am437x-evm.conf
@@ -11,6 +11,8 @@ IMAGE_FSTYPES += "ubifs ubi"
 
 SERIAL_CONSOLES = "115200;ttyS0"
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 # UBI information.  Note that this is board and kernel specific.  Changes
 # in your kernel port may require changes in these variables.  For more
 # details about this board please see
diff --git a/conf/machine/am437x-hs-evm.conf b/conf/machine/am437x-hs-evm.conf
index 0a8ca06d..a02ba6a4 100644
--- a/conf/machine/am437x-hs-evm.conf
+++ b/conf/machine/am437x-hs-evm.conf
@@ -16,3 +16,5 @@ TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/am4x"
 OPTEEMACHINE = "ti-am43xx"
 OPTEEFLAVOR = "am43xx"
 OPTEEOUTPUTMACHINE = "ti"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/am57xx-evm.conf b/conf/machine/am57xx-evm.conf
index 78e730ca..00f52ec9 100644
--- a/conf/machine/am57xx-evm.conf
+++ b/conf/machine/am57xx-evm.conf
@@ -24,6 +24,8 @@ KERNEL_DEVICETREE += "${@oe.utils.conditional('ENABLE_TI_UIO_DEVICES', '1', 'am5
 
 UBOOT_MACHINE = "am57xx_evm_config"
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 # UBI information.  Note that this is board and kernel specific.  Changes
 # in your kernel port may require changes in these variables.  For more
 # details about this board please see
diff --git a/conf/machine/am57xx-hs-evm.conf b/conf/machine/am57xx-hs-evm.conf
index d4f6e098..e2b91a63 100644
--- a/conf/machine/am57xx-hs-evm.conf
+++ b/conf/machine/am57xx-hs-evm.conf
@@ -17,3 +17,6 @@ OPTEEMACHINE = "ti-am57xx"
 OPTEEFLAVOR = "am57xx"
 OPTEEOUTPUTMACHINE = "ti"
 OPTEEPAGER = "y"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
diff --git a/conf/machine/am65xx-evm.conf b/conf/machine/am65xx-evm.conf
index 8b6ef546..a568b25f 100644
--- a/conf/machine/am65xx-evm.conf
+++ b/conf/machine/am65xx-evm.conf
@@ -5,3 +5,5 @@
 require conf/machine/include/am65xx.inc
 
 UBOOT_MACHINE = "am65x_evm_a53_defconfig"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/am65xx-hs-evm.conf b/conf/machine/am65xx-hs-evm.conf
index e4eebb6a..73fae36b 100644
--- a/conf/machine/am65xx-hs-evm.conf
+++ b/conf/machine/am65xx-hs-evm.conf
@@ -20,3 +20,5 @@ UBOOT_BINARY = "u-boot.img_HS"
 IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
 
 TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/dra7xx-evm.conf b/conf/machine/dra7xx-evm.conf
index ad4b0263..1856949a 100644
--- a/conf/machine/dra7xx-evm.conf
+++ b/conf/machine/dra7xx-evm.conf
@@ -18,6 +18,8 @@ KERNEL_DEVICETREE = " \
 
 UBOOT_MACHINE = "dra7xx_evm_config"
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 # UBI information.  Note that this is board and kernel specific.  Changes
 # in your kernel port may require changes in these variables.  For more
 # details about this board please see
diff --git a/conf/machine/dra7xx-hs-evm.conf b/conf/machine/dra7xx-hs-evm.conf
index da4000f2..1ada68d5 100644
--- a/conf/machine/dra7xx-hs-evm.conf
+++ b/conf/machine/dra7xx-hs-evm.conf
@@ -17,3 +17,6 @@ OPTEEMACHINE = "ti-dra7xx"
 OPTEEFLAVOR = "dra7xx"
 OPTEEOUTPUTMACHINE = "ti"
 OPTEEPAGER = "y"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
diff --git a/conf/machine/j7-evm.conf b/conf/machine/j7-evm.conf
index 1b99baeb..1e074e43 100644
--- a/conf/machine/j7-evm.conf
+++ b/conf/machine/j7-evm.conf
@@ -14,3 +14,5 @@ KERNEL_DEVICETREE = " \
 "
 
 UBOOT_MACHINE = "j721e_evm_a72_config"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/j7-hs-evm.conf b/conf/machine/j7-hs-evm.conf
index 70e14754..8c2330b0 100644
--- a/conf/machine/j7-hs-evm.conf
+++ b/conf/machine/j7-hs-evm.conf
@@ -20,3 +20,5 @@ UBOOT_BINARY = "u-boot.img_HS"
 IMAGE_BOOT_FILES = "${UBOOT_BINARY}"
 
 TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_K3}"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/conf/machine/j7200-evm.conf b/conf/machine/j7200-evm.conf
index 2565c90c..4195c42e 100644
--- a/conf/machine/j7200-evm.conf
+++ b/conf/machine/j7200-evm.conf
@@ -16,5 +16,7 @@ UBOOT_MACHINE = "j7200_evm_a72_config"
 # J7200 supports multi-certificate images, use the same
 IMAGE_BOOT_FILES = "${IMAGE_BOOT_FILES_MULTI_CERT}"
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 do_image_wic[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
 do_image_tar[mcdepends] = "mc::k3r5:ti-sci-fw:do_deploy"
diff --git a/conf/machine/k2g-evm.conf b/conf/machine/k2g-evm.conf
index d4cf0605..582af418 100644
--- a/conf/machine/k2g-evm.conf
+++ b/conf/machine/k2g-evm.conf
@@ -19,6 +19,8 @@ SERIAL_CONSOLES = "115200;ttyS0"
 
 SYSVINIT_ENABLED_GETTYS = ""
 
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
+
 # do ubiattach /dev/ubi_ctrl -m 4
 # From dmesg:
 # UBI: smallest flash I/O unit:    4096
diff --git a/conf/machine/k2g-hs-evm.conf b/conf/machine/k2g-hs-evm.conf
index 0620b1f5..3a0b7dc3 100644
--- a/conf/machine/k2g-hs-evm.conf
+++ b/conf/machine/k2g-hs-evm.conf
@@ -13,3 +13,5 @@ UBOOT_RD_LOADADDRESS = "0x84000000"
 UBOOT_RD_ENTRYPOINT = "0x84000000"
 
 TI_SECURE_DEV_PKG = "${TI_SECURE_DEV_PKG_CAT}/k2g"
+
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
diff --git a/recipes-kernel/linux/linux-ti-mainline_git.bb b/recipes-kernel/linux/linux-ti-mainline_git.bb
index fc16485d..6770adca 100644
--- a/recipes-kernel/linux/linux-ti-mainline_git.bb
+++ b/recipes-kernel/linux/linux-ti-mainline_git.bb
@@ -8,10 +8,12 @@ inherit kernel
 DEFCONFIG_BUILDER = "${WORKDIR}/ti-upstream-tools/config/defconfig_builder.sh"
 require recipes-kernel/linux/setup-defconfig.inc
 require recipes-kernel/linux/kernel-rdepends.inc
+require recipes-kernel/linux/ti-kernel.inc
 
 DEPENDS += "gmp-native"
 
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
+		      ${EXTRA_DTC_ARGS}"
 
 S = "${WORKDIR}/git"
 
@@ -23,7 +25,7 @@ SRCREV = "9f4ad9e425a1d3b6a34617b8ea226d56a119a717"
 PV = "5.12+git${SRCPV}"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a"
+MACHINE_KERNEL_PR_append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
diff --git a/recipes-kernel/linux/linux-ti-staging_5.10.bb b/recipes-kernel/linux/linux-ti-staging_5.10.bb
index 4ec19af7..0a134f93 100644
--- a/recipes-kernel/linux/linux-ti-staging_5.10.bb
+++ b/recipes-kernel/linux/linux-ti-staging_5.10.bb
@@ -11,11 +11,13 @@ require recipes-kernel/linux/cmem.inc
 require recipes-kernel/linux/ti-uio.inc
 require recipes-kernel/linux/bundle-devicetree.inc
 require recipes-kernel/linux/kernel-rdepends.inc
+require recipes-kernel/linux/ti-kernel.inc
 
 # Look in the generic major.minor directory for files
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:"
 
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
+		      ${EXTRA_DTC_ARGS}"
 
 S = "${WORKDIR}/git"
 
@@ -25,7 +27,7 @@ SRCREV = "d85aee3e19aa7403bd157d2ae30917e736096a7f"
 PV = "5.10.30+git${SRCPV}"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a"
+MACHINE_KERNEL_PR_append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
diff --git a/recipes-kernel/linux/ti-kernel.inc b/recipes-kernel/linux/ti-kernel.inc
new file mode 100644
index 00000000..a7eb476e
--- /dev/null
+++ b/recipes-kernel/linux/ti-kernel.inc
@@ -0,0 +1,9 @@
+# Add DTC FLAGS -@ when KERNEL_DTB_OVERLAY_SUPPORT is enabled
+
+def get_extra_dtc_args(d):
+    if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
+        return "DTC_FLAGS=-@"
+    else:
+        return ""
+
+EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"
-- 
2.17.1


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

* Re: [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
  2021-05-24 22:40 [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays Yogesh Siraswar
@ 2021-05-25  1:51 ` Denys Dmytriyenko
  2021-05-25 11:55   ` Nishanth Menon
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2021-05-25  1:51 UTC (permalink / raw)
  To: yogeshs; +Cc: Praneeth Bajjuri, Denys Dmytriyenko, Nishant Menon, meta-ti

On Mon, May 24, 2021 at 05:40:36PM -0500, Yogesh Siraswar via lists.yoctoproject.org wrote:
> Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
> compile dtbs with symbols. This fixes the issue where the dtbs
> are build without symbols causing issue with overlays.
> 
> Enabling overlay support increases the size of the dtb, hence
> it is done at a platform level rather than globally to allow custom
> boards disable it from local.conf to reduce size.
> 
> Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
> ---
>  conf/machine/am335x-evm.conf                  | 2 ++
>  conf/machine/am335x-hs-evm.conf               | 2 ++
>  conf/machine/am437x-evm.conf                  | 2 ++
>  conf/machine/am437x-hs-evm.conf               | 2 ++
>  conf/machine/am57xx-evm.conf                  | 2 ++
>  conf/machine/am57xx-hs-evm.conf               | 3 +++
>  conf/machine/am65xx-evm.conf                  | 2 ++
>  conf/machine/am65xx-hs-evm.conf               | 2 ++
>  conf/machine/dra7xx-evm.conf                  | 2 ++
>  conf/machine/dra7xx-hs-evm.conf               | 3 +++
>  conf/machine/j7-evm.conf                      | 2 ++
>  conf/machine/j7-hs-evm.conf                   | 2 ++
>  conf/machine/j7200-evm.conf                   | 2 ++
>  conf/machine/k2g-evm.conf                     | 2 ++
>  conf/machine/k2g-hs-evm.conf                  | 2 ++

First question:
If you are weakly assigning KERNEL_DTB_OVERLAY_SUPPORT in most of the machine 
configs, should it instead be done in SoC include files, like ti33x.inc, 
k3.inc or even ti-soc.inc?


>  recipes-kernel/linux/linux-ti-mainline_git.bb | 6 ++++--
>  recipes-kernel/linux/linux-ti-staging_5.10.bb | 6 ++++--
>  recipes-kernel/linux/ti-kernel.inc            | 9 +++++++++
>  18 files changed, 49 insertions(+), 4 deletions(-)
>  create mode 100644 recipes-kernel/linux/ti-kernel.inc

[...]


> diff --git a/recipes-kernel/linux/linux-ti-mainline_git.bb b/recipes-kernel/linux/linux-ti-mainline_git.bb
> index fc16485d..6770adca 100644
> --- a/recipes-kernel/linux/linux-ti-mainline_git.bb
> +++ b/recipes-kernel/linux/linux-ti-mainline_git.bb
> @@ -8,10 +8,12 @@ inherit kernel
>  DEFCONFIG_BUILDER = "${WORKDIR}/ti-upstream-tools/config/defconfig_builder.sh"
>  require recipes-kernel/linux/setup-defconfig.inc
>  require recipes-kernel/linux/kernel-rdepends.inc
> +require recipes-kernel/linux/ti-kernel.inc
>  
>  DEPENDS += "gmp-native"
>  
> -KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
> +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
> +		      ${EXTRA_DTC_ARGS}"
>  
>  S = "${WORKDIR}/git"
>  
> @@ -23,7 +25,7 @@ SRCREV = "9f4ad9e425a1d3b6a34617b8ea226d56a119a717"
>  PV = "5.12+git${SRCPV}"
>  
>  # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
> -MACHINE_KERNEL_PR_append = "a"
> +MACHINE_KERNEL_PR_append = "b"
>  PR = "${MACHINE_KERNEL_PR}"
>  
>  KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
> diff --git a/recipes-kernel/linux/linux-ti-staging_5.10.bb b/recipes-kernel/linux/linux-ti-staging_5.10.bb
> index 4ec19af7..0a134f93 100644
> --- a/recipes-kernel/linux/linux-ti-staging_5.10.bb
> +++ b/recipes-kernel/linux/linux-ti-staging_5.10.bb
> @@ -11,11 +11,13 @@ require recipes-kernel/linux/cmem.inc
>  require recipes-kernel/linux/ti-uio.inc
>  require recipes-kernel/linux/bundle-devicetree.inc
>  require recipes-kernel/linux/kernel-rdepends.inc
> +require recipes-kernel/linux/ti-kernel.inc
>  
>  # Look in the generic major.minor directory for files
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:"
>  
> -KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
> +KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
> +		      ${EXTRA_DTC_ARGS}"
>  
>  S = "${WORKDIR}/git"
>  
> @@ -25,7 +27,7 @@ SRCREV = "d85aee3e19aa7403bd157d2ae30917e736096a7f"
>  PV = "5.10.30+git${SRCPV}"
>  
>  # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
> -MACHINE_KERNEL_PR_append = "a"
> +MACHINE_KERNEL_PR_append = "b"
>  PR = "${MACHINE_KERNEL_PR}"
>  
>  KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
> diff --git a/recipes-kernel/linux/ti-kernel.inc b/recipes-kernel/linux/ti-kernel.inc
> new file mode 100644
> index 00000000..a7eb476e
> --- /dev/null
> +++ b/recipes-kernel/linux/ti-kernel.inc
> @@ -0,0 +1,9 @@
> +# Add DTC FLAGS -@ when KERNEL_DTB_OVERLAY_SUPPORT is enabled
> +
> +def get_extra_dtc_args(d):
> +    if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
> +        return "DTC_FLAGS=-@"
> +    else:
> +        return ""
> +
> +EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"

Second question:
Are there any specific future plans for EXTRA_DTC_ARGS? As it seems to be 
an unused intermediary variable right now - you can directly append to 
KERNEL_EXTRA_ARGS here...

-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

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

* Re: [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
  2021-05-25  1:51 ` Denys Dmytriyenko
@ 2021-05-25 11:55   ` Nishanth Menon
  2021-05-26  4:21     ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2021-05-25 11:55 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: yogeshs, Praneeth Bajjuri, Denys Dmytriyenko, meta-ti

On 21:51-20210524, Denys Dmytriyenko wrote:
> On Mon, May 24, 2021 at 05:40:36PM -0500, Yogesh Siraswar via lists.yoctoproject.org wrote:
> > Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
> > compile dtbs with symbols. This fixes the issue where the dtbs
> > are build without symbols causing issue with overlays.
> > 
> > Enabling overlay support increases the size of the dtb, hence
> > it is done at a platform level rather than globally to allow custom
> > boards disable it from local.conf to reduce size.
> > 

^^

> > Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
> > ---
> >  conf/machine/am335x-evm.conf                  | 2 ++
> >  conf/machine/am335x-hs-evm.conf               | 2 ++
> >  conf/machine/am437x-evm.conf                  | 2 ++
> >  conf/machine/am437x-hs-evm.conf               | 2 ++
> >  conf/machine/am57xx-evm.conf                  | 2 ++
> >  conf/machine/am57xx-hs-evm.conf               | 3 +++
> >  conf/machine/am65xx-evm.conf                  | 2 ++
> >  conf/machine/am65xx-hs-evm.conf               | 2 ++
> >  conf/machine/dra7xx-evm.conf                  | 2 ++
> >  conf/machine/dra7xx-hs-evm.conf               | 3 +++
> >  conf/machine/j7-evm.conf                      | 2 ++
> >  conf/machine/j7-hs-evm.conf                   | 2 ++
> >  conf/machine/j7200-evm.conf                   | 2 ++
> >  conf/machine/k2g-evm.conf                     | 2 ++
> >  conf/machine/k2g-hs-evm.conf                  | 2 ++
> 
> First question:
> If you are weakly assigning KERNEL_DTB_OVERLAY_SUPPORT in most of the machine 
> configs, should it instead be done in SoC include files, like ti33x.inc, 
> k3.inc or even ti-soc.inc?

You would want the default behavior as default dtb, not the bloated
symbol loaded overlay capable dtb, no?

[...]

> > +
> > +def get_extra_dtc_args(d):
> > +    if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
> > +        return "DTC_FLAGS=-@"
> > +    else:
> > +        return ""
> > +
> > +EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"
> 
> Second question:
> Are there any specific future plans for EXTRA_DTC_ARGS? As it seems to be 
> an unused intermediary variable right now - you can directly append to 
> KERNEL_EXTRA_ARGS here...

dtc changes are always incoming, does'nt make sense to keep that
separated out?


-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D)/Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
  2021-05-25 11:55   ` Nishanth Menon
@ 2021-05-26  4:21     ` Denys Dmytriyenko
  2021-05-26 13:18       ` Nishanth Menon
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2021-05-26  4:21 UTC (permalink / raw)
  To: Nishanth Menon; +Cc: yogeshs, Praneeth Bajjuri, Denys Dmytriyenko, meta-ti

On Tue, May 25, 2021 at 06:55:52AM -0500, Nishanth Menon wrote:
> On 21:51-20210524, Denys Dmytriyenko wrote:
> > On Mon, May 24, 2021 at 05:40:36PM -0500, Yogesh Siraswar via lists.yoctoproject.org wrote:
> > > Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
> > > compile dtbs with symbols. This fixes the issue where the dtbs
> > > are build without symbols causing issue with overlays.
> > > 
> > > Enabling overlay support increases the size of the dtb, hence
> > > it is done at a platform level rather than globally to allow custom
> > > boards disable it from local.conf to reduce size.
> > > 
> 
> ^^
> 
> > > Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
> > > ---
> > >  conf/machine/am335x-evm.conf                  | 2 ++
> > >  conf/machine/am335x-hs-evm.conf               | 2 ++
> > >  conf/machine/am437x-evm.conf                  | 2 ++
> > >  conf/machine/am437x-hs-evm.conf               | 2 ++
> > >  conf/machine/am57xx-evm.conf                  | 2 ++
> > >  conf/machine/am57xx-hs-evm.conf               | 3 +++
> > >  conf/machine/am65xx-evm.conf                  | 2 ++
> > >  conf/machine/am65xx-hs-evm.conf               | 2 ++
> > >  conf/machine/dra7xx-evm.conf                  | 2 ++
> > >  conf/machine/dra7xx-hs-evm.conf               | 3 +++
> > >  conf/machine/j7-evm.conf                      | 2 ++
> > >  conf/machine/j7-hs-evm.conf                   | 2 ++
> > >  conf/machine/j7200-evm.conf                   | 2 ++
> > >  conf/machine/k2g-evm.conf                     | 2 ++
> > >  conf/machine/k2g-hs-evm.conf                  | 2 ++
> > 
> > First question:
> > If you are weakly assigning KERNEL_DTB_OVERLAY_SUPPORT in most of the machine 
> > configs, should it instead be done in SoC include files, like ti33x.inc, 
> > k3.inc or even ti-soc.inc?
> 
> You would want the default behavior as default dtb, not the bloated
> symbol loaded overlay capable dtb, no?

Well, but from the list above the only machines missing are AM64 and legacy 
K2 HK/L/E. And since the assignment is weak (?=), it can still be changed 
from local.conf, as the commit message says.

Anyway, if you don't think making it a bit more generic for ease of 
maintenance is not worth it, then I'm fine with current approach.


> > > +
> > > +def get_extra_dtc_args(d):
> > > +    if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
> > > +        return "DTC_FLAGS=-@"
> > > +    else:
> > > +        return ""
> > > +
> > > +EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"
> > 
> > Second question:
> > Are there any specific future plans for EXTRA_DTC_ARGS? As it seems to be 
> > an unused intermediary variable right now - you can directly append to 
> > KERNEL_EXTRA_ARGS here...
> 
> dtc changes are always incoming, does'nt make sense to keep that
> separated out?

Fair enough.

Acked-by: Denys Dmytriyenko <denys@konsulko.com>

-- 
Regards,
Denys Dmytriyenko <denis@denix.org>
PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964
Fingerprint: 25FC E4A5 8A72 2F69 1186  6D76 4209 0272 9A92 C964

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

* Re: [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
  2021-05-26  4:21     ` Denys Dmytriyenko
@ 2021-05-26 13:18       ` Nishanth Menon
  2021-05-26 16:14         ` Yogesh Siraswar
  0 siblings, 1 reply; 7+ messages in thread
From: Nishanth Menon @ 2021-05-26 13:18 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: yogeshs, Praneeth Bajjuri, Denys Dmytriyenko, meta-ti

On 00:21-20210526, Denys Dmytriyenko wrote:
> On Tue, May 25, 2021 at 06:55:52AM -0500, Nishanth Menon wrote:
> > On 21:51-20210524, Denys Dmytriyenko wrote:
> > > On Mon, May 24, 2021 at 05:40:36PM -0500, Yogesh Siraswar via lists.yoctoproject.org wrote:
> > > > Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
> > > > compile dtbs with symbols. This fixes the issue where the dtbs
> > > > are build without symbols causing issue with overlays.
> > > > 
> > > > Enabling overlay support increases the size of the dtb, hence
> > > > it is done at a platform level rather than globally to allow custom
> > > > boards disable it from local.conf to reduce size.
> > > > 
> > 
> > ^^
> > 
> > > > Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
> > > > ---
> > > >  conf/machine/am335x-evm.conf                  | 2 ++
> > > >  conf/machine/am335x-hs-evm.conf               | 2 ++
> > > >  conf/machine/am437x-evm.conf                  | 2 ++
> > > >  conf/machine/am437x-hs-evm.conf               | 2 ++
> > > >  conf/machine/am57xx-evm.conf                  | 2 ++
> > > >  conf/machine/am57xx-hs-evm.conf               | 3 +++
> > > >  conf/machine/am65xx-evm.conf                  | 2 ++
> > > >  conf/machine/am65xx-hs-evm.conf               | 2 ++
> > > >  conf/machine/dra7xx-evm.conf                  | 2 ++
> > > >  conf/machine/dra7xx-hs-evm.conf               | 3 +++
> > > >  conf/machine/j7-evm.conf                      | 2 ++
> > > >  conf/machine/j7-hs-evm.conf                   | 2 ++
> > > >  conf/machine/j7200-evm.conf                   | 2 ++
> > > >  conf/machine/k2g-evm.conf                     | 2 ++
> > > >  conf/machine/k2g-hs-evm.conf                  | 2 ++
> > > 
> > > First question:
> > > If you are weakly assigning KERNEL_DTB_OVERLAY_SUPPORT in most of the machine 
> > > configs, should it instead be done in SoC include files, like ti33x.inc, 
> > > k3.inc or even ti-soc.inc?
> > 
> > You would want the default behavior as default dtb, not the bloated
> > symbol loaded overlay capable dtb, no?
> 
> Well, but from the list above the only machines missing are AM64 and legacy 

^^^ Arrgh, good catch - we are indeed missing am64..

> K2 HK/L/E. And since the assignment is weak (?=), it can still be changed 
> from local.conf, as the commit message says.

I think we need to drop k2 platforms - they are just bitrotting..

> Anyway, if you don't think making it a bit more generic for ease of 
> maintenance is not worth it, then I'm fine with current approach.

Hmmm.. Your point is to get the weak assignment to allows the critical
mach confs to just override it with =

yeah, I am not exactly a fan of going overboard with entries in machine
file.

I guess I second your thought about including it in ti-soc.inc instead
of machine specific includes to prevent us from messing up and allowing
a little less optimal, but feature rich default.


btw, where do we document all these variables that need tweaking?

-- 
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D

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

* Re: [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays
  2021-05-26 13:18       ` Nishanth Menon
@ 2021-05-26 16:14         ` Yogesh Siraswar
  0 siblings, 0 replies; 7+ messages in thread
From: Yogesh Siraswar @ 2021-05-26 16:14 UTC (permalink / raw)
  To: Nishanth Menon, Denys Dmytriyenko
  Cc: Praneeth Bajjuri, Denys Dmytriyenko, meta-ti

[-- Attachment #1: Type: text/plain, Size: 3094 bytes --]


On 5/26/21 8:18 AM, Nishanth Menon wrote:
> On 00:21-20210526, Denys Dmytriyenko wrote:
>> On Tue, May 25, 2021 at 06:55:52AM -0500, Nishanth Menon wrote:
>>> On 21:51-20210524, Denys Dmytriyenko wrote:
>>>> On Mon, May 24, 2021 at 05:40:36PM -0500, Yogesh Siraswar via lists.yoctoproject.org wrote:
>>>>> Added KERNEL_DTB_OVERLAY_SUPPORT to individual MACHINE conf to
>>>>> compile dtbs with symbols. This fixes the issue where the dtbs
>>>>> are build without symbols causing issue with overlays.
>>>>>
>>>>> Enabling overlay support increases the size of the dtb, hence
>>>>> it is done at a platform level rather than globally to allow custom
>>>>> boards disable it from local.conf to reduce size.
>>>>>
>>> ^^
>>>
>>>>> Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
>>>>> ---
>>>>>   conf/machine/am335x-evm.conf                  | 2 ++
>>>>>   conf/machine/am335x-hs-evm.conf               | 2 ++
>>>>>   conf/machine/am437x-evm.conf                  | 2 ++
>>>>>   conf/machine/am437x-hs-evm.conf               | 2 ++
>>>>>   conf/machine/am57xx-evm.conf                  | 2 ++
>>>>>   conf/machine/am57xx-hs-evm.conf               | 3 +++
>>>>>   conf/machine/am65xx-evm.conf                  | 2 ++
>>>>>   conf/machine/am65xx-hs-evm.conf               | 2 ++
>>>>>   conf/machine/dra7xx-evm.conf                  | 2 ++
>>>>>   conf/machine/dra7xx-hs-evm.conf               | 3 +++
>>>>>   conf/machine/j7-evm.conf                      | 2 ++
>>>>>   conf/machine/j7-hs-evm.conf                   | 2 ++
>>>>>   conf/machine/j7200-evm.conf                   | 2 ++
>>>>>   conf/machine/k2g-evm.conf                     | 2 ++
>>>>>   conf/machine/k2g-hs-evm.conf                  | 2 ++
>>>> First question:
>>>> If you are weakly assigning KERNEL_DTB_OVERLAY_SUPPORT in most of the machine
>>>> configs, should it instead be done in SoC include files, like ti33x.inc,
>>>> k3.inc or even ti-soc.inc?
>>> You would want the default behavior as default dtb, not the bloated
>>> symbol loaded overlay capable dtb, no?
>> Well, but from the list above the only machines missing are AM64 and legacy
> ^^^ Arrgh, good catch - we are indeed missing am64..
>
>> K2 HK/L/E. And since the assignment is weak (?=), it can still be changed
>> from local.conf, as the commit message says.
> I think we need to drop k2 platforms - they are just bitrotting..
>
>> Anyway, if you don't think making it a bit more generic for ease of
>> maintenance is not worth it, then I'm fine with current approach.
> Hmmm.. Your point is to get the weak assignment to allows the critical
> mach confs to just override it with =
>
> yeah, I am not exactly a fan of going overboard with entries in machine
> file.
>
> I guess I second your thought about including it in ti-soc.inc instead
> of machine specific includes to prevent us from messing up and allowing
> a little less optimal, but feature rich default.


This is clean. Will make the change and re-submit.


>
>
> btw, where do we document all these variables that need tweaking?
>

[-- Attachment #2: Type: text/html, Size: 4708 bytes --]

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

* [meta-ti][dunfell/master][PATCH v3] linux-ti-staging: Add extra dtc flags to support dtb overlays
@ 2021-05-26 19:31 Yogesh Siraswar
  0 siblings, 0 replies; 7+ messages in thread
From: Yogesh Siraswar @ 2021-05-26 19:31 UTC (permalink / raw)
  To: Praneeth Bajjuri, Denys Dmytriyenko, Nishant Menon; +Cc: meta-ti

Added KERNEL_DTB_OVERLAY_SUPPORT to common ti-soc include. This fixes the issue 
where the dtbs are build without symbols causing issue with overlays.

Please note this increases the size of the dtb for all platform
derived from ti-soc. So for custom boards disable it from local.conf to
reduce size.

Signed-off-by: Yogesh Siraswar <yogeshs@ti.com>
---
Changes:
Moved the KERNEL_DTB_OVERLAY_SUPPORT to common ti-soc.inc
This makes it more maintainable and with weak assignement can be
override from local.conf

 conf/machine/include/ti-soc.inc               | 1 +
 recipes-kernel/linux/linux-ti-mainline_git.bb | 6 ++++--
 recipes-kernel/linux/linux-ti-staging_5.10.bb | 6 ++++--
 recipes-kernel/linux/ti-kernel.inc            | 9 +++++++++
 4 files changed, 18 insertions(+), 4 deletions(-)
 create mode 100644 recipes-kernel/linux/ti-kernel.inc

diff --git a/conf/machine/include/ti-soc.inc b/conf/machine/include/ti-soc.inc
index 227d8972..2792d2a0 100644
--- a/conf/machine/include/ti-soc.inc
+++ b/conf/machine/include/ti-soc.inc
@@ -1,4 +1,5 @@
 # This is a generic TI SOC family. It is a superset of all other SOCs
 # and platforms defined in meta-ti to allow BSP-level overrides.
 SOC_FAMILY = "ti-soc"
+KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
 require conf/machine/include/soc-family.inc
diff --git a/recipes-kernel/linux/linux-ti-mainline_git.bb b/recipes-kernel/linux/linux-ti-mainline_git.bb
index fc16485d..6770adca 100644
--- a/recipes-kernel/linux/linux-ti-mainline_git.bb
+++ b/recipes-kernel/linux/linux-ti-mainline_git.bb
@@ -8,10 +8,12 @@ inherit kernel
 DEFCONFIG_BUILDER = "${WORKDIR}/ti-upstream-tools/config/defconfig_builder.sh"
 require recipes-kernel/linux/setup-defconfig.inc
 require recipes-kernel/linux/kernel-rdepends.inc
+require recipes-kernel/linux/ti-kernel.inc
 
 DEPENDS += "gmp-native"
 
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
+		      ${EXTRA_DTC_ARGS}"
 
 S = "${WORKDIR}/git"
 
@@ -23,7 +25,7 @@ SRCREV = "9f4ad9e425a1d3b6a34617b8ea226d56a119a717"
 PV = "5.12+git${SRCPV}"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a"
+MACHINE_KERNEL_PR_append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 KERNEL_GIT_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
diff --git a/recipes-kernel/linux/linux-ti-staging_5.10.bb b/recipes-kernel/linux/linux-ti-staging_5.10.bb
index 4ec19af7..0a134f93 100644
--- a/recipes-kernel/linux/linux-ti-staging_5.10.bb
+++ b/recipes-kernel/linux/linux-ti-staging_5.10.bb
@@ -11,11 +11,13 @@ require recipes-kernel/linux/cmem.inc
 require recipes-kernel/linux/ti-uio.inc
 require recipes-kernel/linux/bundle-devicetree.inc
 require recipes-kernel/linux/kernel-rdepends.inc
+require recipes-kernel/linux/ti-kernel.inc
 
 # Look in the generic major.minor directory for files
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-5.10:"
 
-KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
+KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT} \
+		      ${EXTRA_DTC_ARGS}"
 
 S = "${WORKDIR}/git"
 
@@ -25,7 +27,7 @@ SRCREV = "d85aee3e19aa7403bd157d2ae30917e736096a7f"
 PV = "5.10.30+git${SRCPV}"
 
 # Append to the MACHINE_KERNEL_PR so that a new SRCREV will cause a rebuild
-MACHINE_KERNEL_PR_append = "a"
+MACHINE_KERNEL_PR_append = "b"
 PR = "${MACHINE_KERNEL_PR}"
 
 KERNEL_GIT_URI = "git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git"
diff --git a/recipes-kernel/linux/ti-kernel.inc b/recipes-kernel/linux/ti-kernel.inc
new file mode 100644
index 00000000..a7eb476e
--- /dev/null
+++ b/recipes-kernel/linux/ti-kernel.inc
@@ -0,0 +1,9 @@
+# Add DTC FLAGS -@ when KERNEL_DTB_OVERLAY_SUPPORT is enabled
+
+def get_extra_dtc_args(d):
+    if d.getVar('KERNEL_DTB_OVERLAY_SUPPORT') == "1":
+        return "DTC_FLAGS=-@"
+    else:
+        return ""
+
+EXTRA_DTC_ARGS += "${@get_extra_dtc_args(d)}"
-- 
2.17.1


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

end of thread, other threads:[~2021-05-26 19:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-24 22:40 [meta-ti][dunfell/master][PATCH V3] linux-ti-staging: Add extra dtc flags to support dtb overlays Yogesh Siraswar
2021-05-25  1:51 ` Denys Dmytriyenko
2021-05-25 11:55   ` Nishanth Menon
2021-05-26  4:21     ` Denys Dmytriyenko
2021-05-26 13:18       ` Nishanth Menon
2021-05-26 16:14         ` Yogesh Siraswar
2021-05-26 19:31 [meta-ti][dunfell/master][PATCH v3] " Yogesh Siraswar

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.