linux-ti-staging: Add extra dtc flags to support dtb overlays
PATCH v2 1/1 linux-ti-staging: Add extra dtc flags to support dtb overlays
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.
Changes from last version:
1) Added human readable flag KERNEL_DTB_OVERLAY_SUPPORT to control DTC_FLAGS.
2) The KERNEL_DTB_OVERLAY_SUPPORT is also derived from build-root usage.
--- 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
conf/machine/am335x-evm.conf +2 -0
@@ -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
conf/machine/am335x-hs-evm.conf +2 -0
@@ -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"
conf/machine/am437x-evm.conf +2 -0
@@ -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
conf/machine/am437x-hs-evm.conf +2 -0
@@ -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"
conf/machine/am57xx-evm.conf +2 -0
@@ -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
conf/machine/am57xx-hs-evm.conf +3 -0
@@ -17,3 +17,6 @@ OPTEEMACHINE = "ti-am57xx" OPTEEFLAVOR = "am57xx" OPTEEOUTPUTMACHINE = "ti" OPTEEPAGER = "y" + +KERNEL_DTB_OVERLAY_SUPPORT ?= "1" +
conf/machine/am65xx-evm.conf +2 -0
@@ -5,3 +5,5 @@ require conf/machine/include/am65xx.inc UBOOT_MACHINE = "am65x_evm_a53_defconfig" + +KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
conf/machine/am65xx-hs-evm.conf +2 -0
@@ -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"
conf/machine/dra7xx-evm.conf +2 -0
@@ -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
conf/machine/dra7xx-hs-evm.conf +3 -0
@@ -17,3 +17,6 @@ OPTEEMACHINE = "ti-dra7xx" OPTEEFLAVOR = "dra7xx" OPTEEOUTPUTMACHINE = "ti" OPTEEPAGER = "y" + +KERNEL_DTB_OVERLAY_SUPPORT ?= "1" +
conf/machine/j7-evm.conf +2 -0
@@ -14,3 +14,5 @@ KERNEL_DEVICETREE = " \ " UBOOT_MACHINE = "j721e_evm_a72_config" + +KERNEL_DTB_OVERLAY_SUPPORT ?= "1"
conf/machine/j7-hs-evm.conf +2 -0
@@ -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"
conf/machine/j7200-evm.conf +2 -0
@@ -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"
conf/machine/k2g-evm.conf +2 -0
@@ -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
conf/machine/k2g-hs-evm.conf +2 -0
@@ -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"
recipes-kernel/linux/linux-ti-mainline_git.bb +4 -2
@@ -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"
recipes-kernel/linux/linux-ti-staging_5.10.bb +4 -2
@@ -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"
recipes-kernel/linux/ti-kernel.inc new file +9 -0
@@ -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)}"
Signature · 1 line
2.17.1
Quoted 3 lines · Yogesh Siraswar
Added
KERNEL_DTB_OVERLAY_SUPPORTto individual MACHINE conf to compile dtbs with symbols. This fixes the issue where the dtbs are build without symbols causing issue with overlays.
Might be worthwhile to add that enabling overlay support increases the size of the dtb, hence it is done at a platform level rather than globally to allow custom boards derived from meta-ti to not pay the penalty of extra dtb size, yet have the flexibility to enable on need basis.
Quoted 6 lines
Changes from last version:
1) Added human readable flagKERNEL_DTB_OVERLAY_SUPPORTto controlDTC_FLAGS.
2) TheKERNEL_DTB_OVERLAY_SUPPORTis also derived from build-root usage.
Please don't add change log of patch version in commit message. That is not an information that is useful in git history.
Quoted 25 lines
Signed-off-by Yogesh Siraswar <[email protected]>--- 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+
[...]
Quoted 10 lines
recipes-kernel/linux/ti-kernel.inc new file +7
-0+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)}"Signature · 1 line
2.17.1
just for the record for other bb files:
linux-ti-staging-rt_5.10.bb linux-ti-staging-systest_5.10.bb
I think this opens up other possibilities in the future to move common operations into ti-kernel.inc and probably drop duplications
Signature · 3 lines
Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D
Quoted 63 lines · Nishanth Menon via lists.yoctoproject.org
Quoted 3 lines · Yogesh Siraswar
Added
KERNEL_DTB_OVERLAY_SUPPORTto individual MACHINE conf to compile dtbs with symbols. This fixes the issue where the dtbs are build without symbols causing issue with overlays.Might be worthwhile to add that enabling overlay support increases the size of the dtb, hence it is done at a platform level rather than globally to allow custom boards derived from meta-ti to not pay the penalty of extra dtb size, yet have the flexibility to enable on need basis.
Quoted 6 lines
Changes from last version:
1) Added human readable flagKERNEL_DTB_OVERLAY_SUPPORTto controlDTC_FLAGS.
2) TheKERNEL_DTB_OVERLAY_SUPPORTis also derived from build-root usage.Please don't add change log of patch version in commit message. That is not an information that is useful in git history.
Quoted 25 lines
Signed-off-by Yogesh Siraswar <[email protected]>--- 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+
[...]
Quoted 10 lines
recipes-kernel/linux/ti-kernel.inc new file +7
-0+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)}"Signature · 1 line
2.17.1just for the record for other bb files:
linux-ti-staging-rt_5.10.bb linux-ti-staging-systest_5.10.bb
Quoted 2 lines
I think this opens up other possibilities in the future to move common operations into ti-kernel.inc and probably drop duplications
Both -rt and -systest are built on top of the main recipe, they just change defconfig and/or branch:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-systest_5.10.bb
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-rt_5.10.bb
Signature · 4 lines
Regards, Denys Dmytriyenko <[email protected]> PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964 Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964
Quoted 10 lines · Denys Dmytriyenko
Quoted 9 lines · Nishanth Menon via lists.yoctoproject.org
Quoted 3 lines · Yogesh Siraswar
Added
KERNEL_DTB_OVERLAY_SUPPORTto individual MACHINE conf to compile dtbs with symbols. This fixes the issue where the dtbs are build without symbols causing issue with overlays.Might be worthwhile to add that enabling overlay support increases the size of the dtb, hence it is done at a platform level rather than globally to allow custom boards derived from meta-ti to not pay the penalty of extra dtb size, yet have the flexibility to enable on need basis.
Will add in new version
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines
Changes from last version:
1) Added human readable flagKERNEL_DTB_OVERLAY_SUPPORTto controlDTC_FLAGS.
2) TheKERNEL_DTB_OVERLAY_SUPPORTis also derived from build-root usage.Please don't add change log of patch version in commit message. That is not an information that is useful in git history.
Will remove it
Quoted 39 lines
Quoted 39 lines
Quoted 24 lines
Signed-off-by Yogesh Siraswar <[email protected]>--- 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
+
[...]
Quoted 10 lines
recipes-kernel/linux/ti-kernel.inc new file +7
-0+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)}"Signature · 1 line
2.17.1just for the record for other bb files:
linux-ti-staging-rt_5.10.bb linux-ti-staging-systest_5.10.bb
Quoted 6 lines
Quoted 2 lines
I think this opens up other possibilities in the future to move common operations into ti-kernel.inc and probably drop duplications
Both -rt and -systest are built on top of the main recipe, they just change defconfig and/or branch:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-systest_5.10.bb
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-rt_5.10.bb
I guess no action here.
Quoted 1 line
Quoted 14 lines · Yogesh Siraswar via lists.yoctoproject.org
Quoted 10 lines · Denys Dmytriyenko
Quoted 9 lines · Nishanth Menon via lists.yoctoproject.org
Quoted 3 lines · Yogesh Siraswar
Added
KERNEL_DTB_OVERLAY_SUPPORTto individual MACHINE conf to compile dtbs with symbols. This fixes the issue where the dtbs are build without symbols causing issue with overlays.Might be worthwhile to add that enabling overlay support increases the size of the dtb, hence it is done at a platform level rather than globally to allow custom boards derived from meta-ti to not pay the penalty of extra dtb size, yet have the flexibility to enable on need basis.
Will add in new version
Quoted 1 line
Quoted 1 line
Quoted 8 lines
Quoted 7 lines
Quoted 7 lines
Quoted 5 lines
Changes from last version:
1) Added human readable flagKERNEL_DTB_OVERLAY_SUPPORTto controlDTC_FLAGS.
2) TheKERNEL_DTB_OVERLAY_SUPPORTis also derived from build-root usage.Please don't add change log of patch version in commit message. That is not an information that is useful in git history.
Will remove it
Should instead go below --- line.
Quoted 47 lines
Quoted 39 lines
Quoted 39 lines
Quoted 24 lines
Signed-off-by Yogesh Siraswar <[email protected]>--- 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+
[...]
Quoted 10 lines
recipes-kernel/linux/ti-kernel.inc new file +7
-0+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)}"Signature · 1 line
2.17.1just for the record for other bb files:
linux-ti-staging-rt_5.10.bb linux-ti-staging-systest_5.10.bbQuoted 6 lines
Quoted 2 lines
I think this opens up other possibilities in the future to move common operations into ti-kernel.inc and probably drop duplications
Both -rt and -systest are built on top of the main recipe, they just change defconfig and/or branch:
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-systest_5.10.bb
https://git.yoctoproject.org/cgit/cgit.cgi/meta-ti/tree/recipes-kernel/linux/linux-ti-staging-rt_5.10.bbI guess no action here.
Quoted 1 line
Signature · 4 lines
Regards, Denys Dmytriyenko <[email protected]> PGP: 0x420902729A92C964 - https://denix.org/0x420902729A92C964 Fingerprint: 25FC E4A5 8A72 2F69 1186 6D76 4209 0272 9A92 C964