From patchwork Thu Jul 27 15:12:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 28003 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 EF09AC001E0 for ; Thu, 27 Jul 2023 15:12:30 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.9933.1690470740744339493 for ; Thu, 27 Jul 2023 08:12:20 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gK9WzXPA; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: reatmon@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36RFCGOO039651; Thu, 27 Jul 2023 10:12:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690470736; bh=N/CIAROgo2S0grthMV2MiX2JpGQ4obMErjl+woBdKtE=; h=From:To:Subject:Date; b=gK9WzXPAy1eyfG8UPGTrbcwT60V4ZMl1nQczOzx7gS6Xpm4WoeGzwAS7D6z2gcDyl YVC2tlKXDGU37qf1J7+2T3QlaDYpl19I02WDx3zvDWRSWMRhyNlIpOo96+tN9xNh0o QNqNs45pjE3wtPAYiOy75IuuGUdDKepWdn6KXKeI= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36RFCGJq023391 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 27 Jul 2023 10:12:16 -0500 Received: from DFLE105.ent.ti.com (10.64.6.26) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 27 Jul 2023 10:12:16 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE105.ent.ti.com (10.64.6.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 27 Jul 2023 10:12:16 -0500 Received: from uda0214219 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36RFCGJu056301; Thu, 27 Jul 2023 10:12:16 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qP2f2-00063J-A4; Thu, 27 Jul 2023 10:12:16 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-ti][master/kirkstone][PATCH v2 1/2] ti-kernel-devicetree-prefix: Add search function for DTBMERGE Date: Thu, 27 Jul 2023 10:12:15 -0500 Message-ID: <20230727151216.23224-1-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 ; Thu, 27 Jul 2023 15:12:30 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/16864 With the change to the vendored arch/arm/boot/dts directory, we need to add support to the KERNEL_DEVICETREE_DTBMERGE to make it a search pattern instead of a fixed list. Signed-off-by: Ryan Eatmon --- .../linux/ti-kernel-devicetree-prefix.inc | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc index 1496a749..04c91004 100644 --- a/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc +++ b/meta-ti-bsp/recipes-kernel/linux/ti-kernel-devicetree-prefix.inc @@ -18,5 +18,25 @@ def get_dtbs_from_kernel(dts_dir, dts_prefix): matches.append(filename) return ' '.join(matches) -KERNEL_DEVICETREE = "${@get_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} ${KERNEL_DEVICETREE_DTBMERGE}" +def get_merge_dtbs_from_kernel(dts_dir, dts_pattern): + import os + matches = [] + if dts_dir == "": + return ' ' + for pattern in dts_pattern.split(): + pattern_dir = os.path.split(pattern)[0] + pattern_target = os.path.split(pattern)[1].replace(".","-") + "s" + makefile = dts_dir + "/" + pattern_dir + "/Makefile" + if os.path.exists(makefile): + with open(makefile) as f: + if pattern_target in f.read(): + matches.append(pattern) + return ' '.join(matches) + +KERNEL_DEVICETREE_DTBMERGE ?= "" + +KERNEL_DEVICETREE = " \ + ${@get_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_PREFIX}')} \ + ${@get_merge_dtbs_from_kernel('${S}/arch/${ARCH}/boot/dts/', '${KERNEL_DEVICETREE_DTBMERGE}')} \ +" From patchwork Thu Jul 27 15:12:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Eatmon X-Patchwork-Id: 28004 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 F24C7C41513 for ; Thu, 27 Jul 2023 15:12:30 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by mx.groups.io with SMTP id smtpd.web10.9935.1690470741262295454 for ; Thu, 27 Jul 2023 08:12:21 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ojTbMcQJ; spf=pass (domain: ti.com, ip: 198.47.19.142, mailfrom: reatmon@ti.com) Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 36RFCG4B039655; Thu, 27 Jul 2023 10:12:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1690470736; bh=BawgSJ26fVLXW7RD9/L0DPUifmPEl7EiaqeXI4oQusc=; h=From:To:Subject:Date:In-Reply-To:References; b=ojTbMcQJtDQW10B3KOMvOx3oTrNiAhkBv2IXlBP0YPb0DrCw2iXGbpnmvO8Ev1AOm 0Awxuaw9l8iv4ieQnByuzso/hcXNywtaq+EV6aVbTQldRlImNpapZsuJRy5JY5DIvp NmF8kCPKA61L7iTiPSXHDp0WkTgocCXQp918trv0= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 36RFCGsu023394 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 27 Jul 2023 10:12:16 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 27 Jul 2023 10:12:16 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Thu, 27 Jul 2023 10:12:16 -0500 Received: from uda0214219 (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 36RFCGi3015780; Thu, 27 Jul 2023 10:12:16 -0500 Received: from reatmon by uda0214219 with local (Exim 4.90_1) (envelope-from ) id 1qP2f2-00063L-FX; Thu, 27 Jul 2023 10:12:16 -0500 From: Ryan Eatmon To: Praneeth Bajjuri , Denys Dmytriyenko , Subject: [meta-ti][master/kirkstone][PATCH v2 2/2] linux-ti-next,conf/machine: Add support for new vendored dts dir Date: Thu, 27 Jul 2023 10:12:16 -0500 Message-ID: <20230727151216.23224-2-reatmon@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230727151216.23224-1-reatmon@ti.com> References: <20230727151216.23224-1-reatmon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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 ; Thu, 27 Jul 2023 15:12:30 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-ti/message/16865 The latest kernel has made the change to add vendor subdirectories into the arch/arm/boot/dts directory. This effectively breaks the KERNEL_DEVICETREE settings in the machine configs for 32bit platforms, so switch them over to using the PREFIX variable. Also change the linux-ti-next to use the PREFIX setting for KERNEL_DEVICETREE. Signed-off-by: Ryan Eatmon --- v2: Added previous KERNEL_DEVICETREE entries back in. meta-ti-bsp/conf/machine/am57xx-evm.conf | 3 +++ meta-ti-bsp/conf/machine/dra7xx-evm.conf | 1 + meta-ti-bsp/conf/machine/include/ti33x.inc | 5 ++++- meta-ti-bsp/conf/machine/include/ti43x.inc | 2 ++ meta-ti-bsp/conf/machine/omapl138-lcdk.conf | 5 ++++- meta-ti-bsp/recipes-kernel/linux/linux-ti-next_git.bb | 1 + 6 files changed, 15 insertions(+), 2 deletions(-) diff --git a/meta-ti-bsp/conf/machine/am57xx-evm.conf b/meta-ti-bsp/conf/machine/am57xx-evm.conf index 26b7f78c..43a6a833 100644 --- a/meta-ti-bsp/conf/machine/am57xx-evm.conf +++ b/meta-ti-bsp/conf/machine/am57xx-evm.conf @@ -13,11 +13,14 @@ KERNEL_DEVICETREE_PREFIX = " \ ti/am57 \ ti/lcd \ ti/ov10635 \ + ti/omap/am57 \ " KERNEL_DEVICETREE_DTBMERGE = " \ am57xx-evm.dtb \ am57xx-evm-reva3.dtb \ + ti/omap/am57xx-evm.dtb \ + ti/omap/am57xx-evm-reva3.dtb \ " KERNEL_DEVICETREE = " \ diff --git a/meta-ti-bsp/conf/machine/dra7xx-evm.conf b/meta-ti-bsp/conf/machine/dra7xx-evm.conf index c47a1e80..30884ae1 100644 --- a/meta-ti-bsp/conf/machine/dra7xx-evm.conf +++ b/meta-ti-bsp/conf/machine/dra7xx-evm.conf @@ -12,6 +12,7 @@ KERNEL_DEVICETREE_PREFIX = " \ dra7 \ ti/dra7 \ ti/lcd \ + ti/omap/dra7 \ " KERNEL_DEVICETREE = " \ diff --git a/meta-ti-bsp/conf/machine/include/ti33x.inc b/meta-ti-bsp/conf/machine/include/ti33x.inc index f7f126f4..bc61a773 100644 --- a/meta-ti-bsp/conf/machine/include/ti33x.inc +++ b/meta-ti-bsp/conf/machine/include/ti33x.inc @@ -19,7 +19,10 @@ PVR_DISPLAY_CONTROLLER_ALIAS ?= "tilcdc" KERNEL_IMAGETYPE = "zImage" -KERNEL_DEVICETREE_PREFIX = "am335x" +KERNEL_DEVICETREE_PREFIX = " \ + am335x \ + ti/omap/am335x \ +" KERNEL_DEVICETREE = " \ am335x-evm.dtb \ diff --git a/meta-ti-bsp/conf/machine/include/ti43x.inc b/meta-ti-bsp/conf/machine/include/ti43x.inc index a6af56e3..ea5d1505 100644 --- a/meta-ti-bsp/conf/machine/include/ti43x.inc +++ b/meta-ti-bsp/conf/machine/include/ti43x.inc @@ -22,6 +22,8 @@ KERNEL_IMAGETYPE = "zImage" KERNEL_DEVICETREE_PREFIX = " \ am437x \ am43x \ + ti/omap/am437x \ + ti/omap/am43x \ " KERNEL_DEVICETREE = " \ diff --git a/meta-ti-bsp/conf/machine/omapl138-lcdk.conf b/meta-ti-bsp/conf/machine/omapl138-lcdk.conf index a8b08964..fdbaffae 100644 --- a/meta-ti-bsp/conf/machine/omapl138-lcdk.conf +++ b/meta-ti-bsp/conf/machine/omapl138-lcdk.conf @@ -15,7 +15,10 @@ IMAGE_FSTYPES += "tar.xz" SERIAL_CONSOLES = "115200;ttyS2" -KERNEL_DEVICETREE_PREFIX = "da850" +KERNEL_DEVICETREE_PREFIX = " \ + da850 \ + ti/davinci/da850 \ +" KERNEL_DEVICETREE = " \ da850-evm.dtb \ 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 9138c7c5..8228f4ff 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 @@ -6,6 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" inherit kernel require recipes-kernel/linux/ti-kernel.inc +include ${@ 'recipes-kernel/linux/ti-kernel-devicetree-prefix.inc' if d.getVar('KERNEL_DEVICETREE_PREFIX') else ''} DEPENDS += "gmp-native libmpc-native"