From patchwork Fri Jul 25 20:48:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 67493 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37BAAC87FCF for ; Fri, 25 Jul 2025 20:48:48 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.29179.1753476519615712362 for ; Fri, 25 Jul 2025 13:48:40 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id BEC0C40CC3; Fri, 25 Jul 2025 20:48:38 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ra8RgMakCF1z; Fri, 25 Jul 2025 20:48:38 +0000 (UTC) Received: from mail.denix.org (pool-100-15-87-159.washdc.fios.verizon.net [100.15.87.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id A440C40BA9; Fri, 25 Jul 2025 20:48:37 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id BEDEE16CE23; Fri, 25 Jul 2025 16:48:36 -0400 (EDT) From: Denys Dmytriyenko To: meta-ti@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [master][PATCH 1/3] meta-ti-bsp: move KERNEL_DTBVENDORED settings Date: Fri, 25 Jul 2025 16:48:34 -0400 Message-Id: <20250725204836.2549216-1-denis@denix.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 25 Jul 2025 20:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/18829 From: Denys Dmytriyenko Move KERNEL_DTBVENDORED settings from the kernel to ti-soc.inc in the config scope. Signed-off-by: Denys Dmytriyenko --- meta-ti-bsp/conf/machine/include/ti-soc.inc | 5 +++++ meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta-ti-bsp/conf/machine/include/ti-soc.inc b/meta-ti-bsp/conf/machine/include/ti-soc.inc index 56ea9e47..2eefa8a0 100644 --- a/meta-ti-bsp/conf/machine/include/ti-soc.inc +++ b/meta-ti-bsp/conf/machine/include/ti-soc.inc @@ -14,3 +14,8 @@ MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-devicetree" # All machines should start off pointing at the default base kernel class KERNEL_BASE_CLASS = "kernel" + +# Tell the kernel class to install the DTBs in the same directory structure as +# the kernel +KERNEL_DTBDEST = "${KERNEL_IMAGEDEST}/dtb" +KERNEL_DTBVENDORED = "1" diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc index 40ddc4fd..ef4ba4a1 100644 --- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel.inc @@ -1,8 +1,3 @@ -# Tell the kernel class to install the DTBs in the same directory structure as -# the kernel. -KERNEL_DTBDEST = "${KERNEL_IMAGEDEST}/dtb" -KERNEL_DTBVENDORED = "1" - KERNEL_GIT_URI ?= "git://git.ti.com/git/ti-linux-kernel/ti-linux-kernel.git" KERNEL_GIT_PROTOCOL ?= "https" KERNEL_GIT_BRANCH ?= "branch=${BRANCH}" From patchwork Fri Jul 25 20:48:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 67494 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36E95C87FCA for ; Fri, 25 Jul 2025 20:48:48 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web10.29129.1753476520082471816 for ; Fri, 25 Jul 2025 13:48:40 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id C9FA240BA9; Fri, 25 Jul 2025 20:48:38 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x6R68gvnv47T; Fri, 25 Jul 2025 20:48:38 +0000 (UTC) Received: from mail.denix.org (pool-100-15-87-159.washdc.fios.verizon.net [100.15.87.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id AEFDE40CC0; Fri, 25 Jul 2025 20:48:37 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id CC7BE16CE2D; Fri, 25 Jul 2025 16:48:36 -0400 (EDT) From: Denys Dmytriyenko To: meta-ti@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [master][PATCH 2/3] meta-ti-bsp: generalize non-vendored DEVICETREE_FILES Date: Fri, 25 Jul 2025 16:48:35 -0400 Message-Id: <20250725204836.2549216-2-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250725204836.2549216-1-denis@denix.org> References: <20250725204836.2549216-1-denis@denix.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 25 Jul 2025 20:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/18831 From: Denys Dmytriyenko Automatically generate non-vendored DTBs list in DEVICETREE_FILES from vendored KERNEL_DEVICETREE list for all platforms to use. Signed-off-by: Denys Dmytriyenko --- meta-ti-bsp/conf/machine/include/omap-a15.inc | 4 +--- meta-ti-bsp/conf/machine/include/ti-soc.inc | 3 +++ meta-ti-bsp/conf/machine/include/ti33x.inc | 4 +--- meta-ti-bsp/conf/machine/include/ti43x.inc | 4 +--- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/meta-ti-bsp/conf/machine/include/omap-a15.inc b/meta-ti-bsp/conf/machine/include/omap-a15.inc index a258decd..3b8eb0fd 100644 --- a/meta-ti-bsp/conf/machine/include/omap-a15.inc +++ b/meta-ti-bsp/conf/machine/include/omap-a15.inc @@ -19,15 +19,13 @@ UBOOT_ARCH = "arm" UBOOT_ENTRYPOINT = "0x80008000" UBOOT_LOADADDRESS = "0x80008000" -DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","").replace("ti/","")}" - # Generate an extlinux.conf file UBOOT_EXTLINUX = "1" UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" UBOOT_EXTLINUX_BOOT_FILES = " \ extlinux.conf;extlinux/extlinux.conf \ ${KERNEL_IMAGETYPE} \ - ${DEVICETREE_FILE} \ + ${DEVICETREE_FILES} \ " SPL_BINARY = "MLO" diff --git a/meta-ti-bsp/conf/machine/include/ti-soc.inc b/meta-ti-bsp/conf/machine/include/ti-soc.inc index 2eefa8a0..e605d14b 100644 --- a/meta-ti-bsp/conf/machine/include/ti-soc.inc +++ b/meta-ti-bsp/conf/machine/include/ti-soc.inc @@ -19,3 +19,6 @@ KERNEL_BASE_CLASS = "kernel" # the kernel KERNEL_DTBDEST = "${KERNEL_IMAGEDEST}/dtb" KERNEL_DTBVENDORED = "1" + +# Also build a non-vendored list w/o dir structure +DEVICETREE_FILES = "${@' '.join([os.path.basename(f) for f in d.getVar("KERNEL_DEVICETREE").split()])}" diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc index 7e9eb48c..c47165e4 100644 --- a/meta-ti-bsp/conf/machine/include/ti33x.inc +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc @@ -64,8 +64,6 @@ UBOOT_MACHINE = "am335x_evm_config" UBOOT_ENTRYPOINT = "0x80008000" UBOOT_LOADADDRESS = "0x80008000" -DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","")}" - # Generate an extlinux.conf file UBOOT_EXTLINUX = "1" UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" @@ -73,7 +71,7 @@ UBOOT_EXTLINUX_KERNEL_ARGS = "rootwait rw earlycon" UBOOT_EXTLINUX_BOOT_FILES = " \ extlinux.conf;extlinux/extlinux.conf \ ${KERNEL_IMAGETYPE} \ - ${DEVICETREE_FILE} \ + ${DEVICETREE_FILES} \ " SPL_BINARY = "MLO" diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc index 2621d19a..a23b6518 100644 --- a/meta-ti-bsp/conf/machine/include/ti43x.inc +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc @@ -37,15 +37,13 @@ UBOOT_MACHINE = "am43xx_evm_config" UBOOT_ENTRYPOINT = "0x80008000" UBOOT_LOADADDRESS = "0x80008000" -DEVICETREE_FILE = "${@(d.getVar('KERNEL_DEVICETREE') or "").replace("ti/omap/","")}" - # Generate an extlinux.conf file UBOOT_EXTLINUX = "1" UBOOT_EXTLINUX_ROOT = "root=PARTUUID=${uuid}" UBOOT_EXTLINUX_BOOT_FILES = " \ extlinux.conf;extlinux/extlinux.conf \ ${KERNEL_IMAGETYPE} \ - ${DEVICETREE_FILE} \ + ${DEVICETREE_FILES} \ " SPL_BINARY = "MLO" From patchwork Fri Jul 25 20:48:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Denys Dmytriyenko X-Patchwork-Id: 67495 X-Patchwork-Delegate: reatmon@ti.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 38724C87FCE for ; Fri, 25 Jul 2025 20:48:48 +0000 (UTC) Received: from mailout4.zoneedit.com (mailout4.zoneedit.com [64.68.198.64]) by mx.groups.io with SMTP id smtpd.web11.29180.1753476519743746405 for ; Fri, 25 Jul 2025 13:48:40 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: denix.org, ip: 64.68.198.64, mailfrom: denis@denix.org) Received: from localhost (localhost [127.0.0.1]) by mailout4.zoneedit.com (Postfix) with ESMTP id 3087540CC0; Fri, 25 Jul 2025 20:48:39 +0000 (UTC) Received: from mailout4.zoneedit.com ([127.0.0.1]) by localhost (zmo14-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TtX5atHS_-OG; Fri, 25 Jul 2025 20:48:39 +0000 (UTC) Received: from mail.denix.org (pool-100-15-87-159.washdc.fios.verizon.net [100.15.87.159]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mailout4.zoneedit.com (Postfix) with ESMTPSA id 0F47240CC2; Fri, 25 Jul 2025 20:48:38 +0000 (UTC) Received: from thorin.han-sole.ts.net (thorin.denix [192.168.30.9]) by mail.denix.org (Postfix) with ESMTP id D8C0216CE33; Fri, 25 Jul 2025 16:48:36 -0400 (EDT) From: Denys Dmytriyenko To: meta-ti@lists.yoctoproject.org Cc: Denys Dmytriyenko Subject: [master][PATCH 3/3] meta-ti-bsp: convert DTB prefix matching into class Date: Fri, 25 Jul 2025 16:48:36 -0400 Message-Id: <20250725204836.2549216-3-denis@denix.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20250725204836.2549216-1-denis@denix.org> References: <20250725204836.2549216-1-denis@denix.org> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Fri, 25 Jul 2025 20:48:48 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/18830 From: Denys Dmytriyenko Convert devicetree prefix matching functionality into a generic class that can be used by the kernel and wic images. That way dynamically generated KERNEL_DEVICETREE list will be the same when populating /boot dir of rootfs and/or FAT boot partition of a wic image. Signed-off-by: Denys Dmytriyenko --- .../ti-devicetree-prefix.bbclass} | 7 +++++-- meta-ti-bsp/conf/machine/include/ti-soc.inc | 8 ++++++++ meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb | 2 -- meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb | 1 - meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb | 1 - meta-ti-bsp/recipes-kernel/linux/ti-kernel-fitimage.bb | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) rename meta-ti-bsp/{recipes-kernel/linux/ti-kernel-devicetree-prefix.inc => classes/ti-devicetree-prefix.bbclass} (87%) diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc b/meta-ti-bsp/classes/ti-devicetree-prefix.bbclass similarity index 87% rename from meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc rename to meta-ti-bsp/classes/ti-devicetree-prefix.bbclass index 2d7be280..5858cc65 100644 --- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc +++ b/meta-ti-bsp/classes/ti-devicetree-prefix.bbclass @@ -1,3 +1,4 @@ +# Generate list of DTBs from the kernel source def get_dtbs_from_kernel(dts_dir, dts_prefix): import os import glob @@ -17,6 +18,8 @@ def get_dtbs_from_kernel(dts_dir, dts_prefix): matches.append(filename) return ' '.join(matches) +# Generate list of "merged" DTBs from the kernel source +# It is TI custom feature to merge DTB overlays into a single DTB def get_merge_dtbs_from_kernel(dts_dir, dts_pattern): import os matches = [] @@ -32,9 +35,9 @@ def get_merge_dtbs_from_kernel(dts_dir, dts_pattern): matches.append(pattern) return ' '.join(matches) -KERNEL_DEVICETREE_DTBMERGE ?= "" - KERNEL_DEVICETREE = " \ ${@get_dtbs_from_kernel('${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} \ ${@get_merge_dtbs_from_kernel('${STAGING_KERNEL_DIR}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_DTBMERGE}')} \ " + +do_image_wic[depends] += "virtual/kernel:do_shared_workdir" diff --git a/meta-ti-bsp/conf/machine/include/ti-soc.inc b/meta-ti-bsp/conf/machine/include/ti-soc.inc index e605d14b..3f11e31d 100644 --- a/meta-ti-bsp/conf/machine/include/ti-soc.inc +++ b/meta-ti-bsp/conf/machine/include/ti-soc.inc @@ -22,3 +22,11 @@ KERNEL_DTBVENDORED = "1" # Also build a non-vendored list w/o dir structure DEVICETREE_FILES = "${@' '.join([os.path.basename(f) for f in d.getVar("KERNEL_DEVICETREE").split()])}" + +KERNEL_DEVICETREE_DTBMERGE ?= "" + +# Dynamically build DTBs list based on prefix matching +CLASS_DEVICETREE_PREFIX = "${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''}" + +KERNEL_CLASSES += "${CLASS_DEVICETREE_PREFIX}" +IMAGE_CLASSES += "${CLASS_DEVICETREE_PREFIX}" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb index 1feb7564..60b647f1 100644 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb @@ -2,8 +2,6 @@ require linux-ti-mainline_git.bb SUMMARY = "Linux-next kernel for TI devices" -include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} - # 6.6.0-rc3+ version SRCREV = "6465e260f48790807eef06b583b38ca9789b6072" PV = "6.6.0-rc3+git" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb index 40742fe6..db180e11 100644 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.12.bb @@ -7,7 +7,6 @@ inherit ${KERNEL_BASE_CLASS} require recipes-kernel/linux/setup-defconfig.inc require recipes-kernel/linux/ti-kernel.inc -include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} include ${@ 'recipes-kernel/linux/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} DEPENDS += "gmp-native libmpc-native" diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb index d550a031..321cdcbb 100644 --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging_6.6.bb @@ -7,7 +7,6 @@ inherit ${KERNEL_BASE_CLASS} require recipes-kernel/linux/setup-defconfig.inc require recipes-kernel/linux/ti-kernel.inc -include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} include ${@ 'recipes-kernel/linux/ti-extras.inc' if d.getVar('TI_EXTRAS') else ''} DEPENDS += "gmp-native libmpc-native" diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-fitimage.bb b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-fitimage.bb index fc20b713..cc90d390 100644 --- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-fitimage.bb +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-fitimage.bb @@ -7,6 +7,6 @@ require recipes-kernel/linux/linux-yocto-fitimage.bb inherit ti-secdev -include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} +inherit ${@ 'ti-devicetree-prefix' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} do_compile[depends] += "virtual/kernel:do_shared_workdir"