diff mbox series

[kirkstone,RFC] ti-extras: Add support for extra kernel features for RT

Message ID 20231107160558.2661070-1-p-bhagat@ti.com
State RFC
Delegated to: Ryan Eatmon
Headers show
Series [kirkstone,RFC] ti-extras: Add support for extra kernel features for RT | expand

Commit Message

Paresh Bhagat Nov. 7, 2023, 4:05 p.m. UTC
Add support for ti-extras features for rt as it was added for non
rt kernel and u-boot earlier. It will also be accessible via the
TI_EXTRAS variable in the local.conf file.

Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
---
 .../recipes-kernel/linux/linux-ti-staging-rt_6.1.bb   |  5 +++--
 meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc     | 11 +++++++++++
 2 files changed, 14 insertions(+), 2 deletions(-)
 create mode 100644 meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc

Comments

Ryan Eatmon Nov. 7, 2023, 4:28 p.m. UTC | #1
On 11/7/2023 10:05 AM, Paresh Bhagat wrote:
> Add support for ti-extras features for rt as it was added for non
> rt kernel and u-boot earlier. It will also be accessible via the
> TI_EXTRAS variable in the local.conf file.
> 
> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> ---
>   .../recipes-kernel/linux/linux-ti-staging-rt_6.1.bb   |  5 +++--
>   meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc     | 11 +++++++++++
>   2 files changed, 14 insertions(+), 2 deletions(-)
>   create mode 100644 meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> 
> diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> index a600630e..93e1be39 100644
> --- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> +++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> @@ -1,10 +1,11 @@
>   require linux-ti-staging_6.1.bb
> +include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if d.getVar('TI_EXTRAS') else ''}
>   
>   # Look in the generic major.minor directory for files
>   # This will have priority over generic non-rt path
>   FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:"
>   
> -BRANCH = "ti-rt-linux-6.1.y"
> +BRANCH ?= "ti-rt-linux-6.1.y"
>   
> -SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> +SRCREV ?= "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"

I may need Denys to weigh on these comments:

You cannot use the ?= here.  This recipe includes the 
linux-ti-staging_6.1.bb recipe which has the default lines already in 
there.  And the ?= is a soft default which will only set the value IF it 
is not already set.  So this will break RT builds.

Bitbake also processes the = at the moment you see it.  So the "last" 
time a variable is set with = it will be the value that wins.

So for the RT recipe, you will likely need to move the include to AFTER 
the above BRANCH/SRCREV settings.

Basically, I think you need:

   BRANCH = "ti-rt-linux-6.1.y"

   SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"

   include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if 
d.getVar('TI_EXTRAS') else ''}


So this inclusion of the extra will need to be different in the RT 
recipe versus the non-RT recipe.  All because the RT recipe includes the 
non-RT recipe.


>   PV = "6.1.46+git${SRCPV}"
> diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> new file mode 100644
> index 00000000..1fc40934
> --- /dev/null
> +++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> @@ -0,0 +1,11 @@
> +
> +# Use different commit, repo and branch for TI extras build
> +# This will have priority over generic rt path
> +
> +COMPATIBLE_MACHINE = "am62xx"
> +
> +BRANCH = "ti-rt-linux-6.1.y"
> +BRANCH:tie-jailhouse = "ti-rt-linux-6.1.y-jailhouse"
> +
> +SRCREV = "685e77152461bd6b791500f717bec62d17c1b36d"
> +SRCREV:tie-jailhouse = "a74088b40b4d27478a2af5c20cdc0b4ec8ed9470"

This file should be fine.
Denys Dmytriyenko Nov. 7, 2023, 8:30 p.m. UTC | #2
On Tue, Nov 07, 2023 at 10:28:11AM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 11/7/2023 10:05 AM, Paresh Bhagat wrote:
> >Add support for ti-extras features for rt as it was added for non
> >rt kernel and u-boot earlier. It will also be accessible via the
> >TI_EXTRAS variable in the local.conf file.
> >
> >Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> >---
> >  .../recipes-kernel/linux/linux-ti-staging-rt_6.1.bb   |  5 +++--
> >  meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc     | 11 +++++++++++
> >  2 files changed, 14 insertions(+), 2 deletions(-)
> >  create mode 100644 meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >
> >diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >index a600630e..93e1be39 100644
> >--- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >+++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >@@ -1,10 +1,11 @@
> >  require linux-ti-staging_6.1.bb
> >+include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if d.getVar('TI_EXTRAS') else ''}
> >  # Look in the generic major.minor directory for files
> >  # This will have priority over generic non-rt path
> >  FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:"
> >-BRANCH = "ti-rt-linux-6.1.y"
> >+BRANCH ?= "ti-rt-linux-6.1.y"
> >-SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> >+SRCREV ?= "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> 
> I may need Denys to weigh on these comments:
> 
> You cannot use the ?= here.  This recipe includes the
> linux-ti-staging_6.1.bb recipe which has the default lines already
> in there.  And the ?= is a soft default which will only set the
> value IF it is not already set.  So this will break RT builds.
> 
> Bitbake also processes the = at the moment you see it.  So the
> "last" time a variable is set with = it will be the value that wins.
> 
> So for the RT recipe, you will likely need to move the include to
> AFTER the above BRANCH/SRCREV settings.
> 
> Basically, I think you need:
> 
>   BRANCH = "ti-rt-linux-6.1.y"
> 
>   SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> 
>   include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if
> d.getVar('TI_EXTRAS') else ''}
> 
> 
> So this inclusion of the extra will need to be different in the RT
> recipe versus the non-RT recipe.  All because the RT recipe includes
> the non-RT recipe.

Yes, this explanation is correct. Some re-ordering is required. Simply making 
those assignments as weak at the end of -rt recipe is incorrect - that will 
break -rt recipe regardless of whether ti-extras is enabled or not.


> >  PV = "6.1.46+git${SRCPV}"
> >diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >new file mode 100644
> >index 00000000..1fc40934
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >@@ -0,0 +1,11 @@
> >+
> >+# Use different commit, repo and branch for TI extras build
> >+# This will have priority over generic rt path
> >+
> >+COMPATIBLE_MACHINE = "am62xx"
> >+
> >+BRANCH = "ti-rt-linux-6.1.y"
> >+BRANCH:tie-jailhouse = "ti-rt-linux-6.1.y-jailhouse"
> >+
> >+SRCREV = "685e77152461bd6b791500f717bec62d17c1b36d"
> >+SRCREV:tie-jailhouse = "a74088b40b4d27478a2af5c20cdc0b4ec8ed9470"
> 
> This file should be fine.
Paresh Bhagat Nov. 8, 2023, 2:57 a.m. UTC | #3
Hi Denys and Ryan,

Thanks for the review. I will address the comments and send an updated patch.

-----Original Message-----
From: Denys Dmytriyenko <denis@denix.org> 
Sent: Wednesday, November 8, 2023 2:01 AM
To: Eatmon, Ryan <reatmon@ti.com>
Cc: Bhagat, Paresh <p-bhagat@ti.com>; meta-ti@lists.yoctoproject.org; Bajjuri, Praneeth <praneeth@ti.com>; denys@konsulko.com; Shilwant, Chirag <c-shilwant@ti.com>; Adivi, Sai Sree Kartheek <s-adivi@ti.com>; Khasim, Syed Mohammed <khasim@ti.com>; Gupta, Gyan <g-gupta@ti.com>
Subject: [EXTERNAL] Re: [meta-ti] [kirkstone][RFC] ti-extras: Add support for extra kernel features for RT

On Tue, Nov 07, 2023 at 10:28:11AM -0600, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 11/7/2023 10:05 AM, Paresh Bhagat wrote:
> >Add support for ti-extras features for rt as it was added for non rt 
> >kernel and u-boot earlier. It will also be accessible via the 
> >TI_EXTRAS variable in the local.conf file.
> >
> >Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> >---
> >  .../recipes-kernel/linux/linux-ti-staging-rt_6.1.bb   |  5 +++--
> >  meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc     | 11 +++++++++++
> >  2 files changed, 14 insertions(+), 2 deletions(-)
> >  create mode 100644 
> >meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >
> >diff --git 
> >a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb 
> >b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >index a600630e..93e1be39 100644
> >--- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >+++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
> >@@ -1,10 +1,11 @@
> >  require linux-ti-staging_6.1.bb
> >+include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if 
> >+d.getVar('TI_EXTRAS') else ''}
> >  # Look in the generic major.minor directory for files
> >  # This will have priority over generic non-rt path
> >  FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:"
> >-BRANCH = "ti-rt-linux-6.1.y"
> >+BRANCH ?= "ti-rt-linux-6.1.y"
> >-SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> >+SRCREV ?= "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> 
> I may need Denys to weigh on these comments:
> 
> You cannot use the ?= here.  This recipe includes the 
> linux-ti-staging_6.1.bb recipe which has the default lines already in 
> there.  And the ?= is a soft default which will only set the value IF 
> it is not already set.  So this will break RT builds.
> 
> Bitbake also processes the = at the moment you see it.  So the "last" 
> time a variable is set with = it will be the value that wins.
> 
> So for the RT recipe, you will likely need to move the include to 
> AFTER the above BRANCH/SRCREV settings.
> 
> Basically, I think you need:
> 
>   BRANCH = "ti-rt-linux-6.1.y"
> 
>   SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
> 
>   include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if
> d.getVar('TI_EXTRAS') else ''}
> 
> 
> So this inclusion of the extra will need to be different in the RT 
> recipe versus the non-RT recipe.  All because the RT recipe includes 
> the non-RT recipe.

Yes, this explanation is correct. Some re-ordering is required. Simply making those assignments as weak at the end of -rt recipe is incorrect - that will break -rt recipe regardless of whether ti-extras is enabled or not.


> >  PV = "6.1.46+git${SRCPV}"
> >diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc 
> >b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >new file mode 100644
> >index 00000000..1fc40934
> >--- /dev/null
> >+++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
> >@@ -0,0 +1,11 @@
> >+
> >+# Use different commit, repo and branch for TI extras build # This 
> >+will have priority over generic rt path
> >+
> >+COMPATIBLE_MACHINE = "am62xx"
> >+
> >+BRANCH = "ti-rt-linux-6.1.y"
> >+BRANCH:tie-jailhouse = "ti-rt-linux-6.1.y-jailhouse"
> >+
> >+SRCREV = "685e77152461bd6b791500f717bec62d17c1b36d"
> >+SRCREV:tie-jailhouse = "a74088b40b4d27478a2af5c20cdc0b4ec8ed9470"
> 
> This file should be fine.
diff mbox series

Patch

diff --git a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
index a600630e..93e1be39 100644
--- a/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
+++ b/meta-ti-bsp/recipes-kernel/linux/linux-ti-staging-rt_6.1.bb
@@ -1,10 +1,11 @@ 
 require linux-ti-staging_6.1.bb
+include ${@ 'recipes-kernel/linux/ti-extras-rt.inc' if d.getVar('TI_EXTRAS') else ''}
 
 # Look in the generic major.minor directory for files
 # This will have priority over generic non-rt path
 FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-6.1:"
 
-BRANCH = "ti-rt-linux-6.1.y"
+BRANCH ?= "ti-rt-linux-6.1.y"
 
-SRCREV = "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
+SRCREV ?= "eda9974e8513cdd2c5cc20c3c6b851f9977acd4d"
 PV = "6.1.46+git${SRCPV}"
diff --git a/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
new file mode 100644
index 00000000..1fc40934
--- /dev/null
+++ b/meta-ti-bsp/recipes-kernel/linux/ti-extras-rt.inc
@@ -0,0 +1,11 @@ 
+
+# Use different commit, repo and branch for TI extras build
+# This will have priority over generic rt path
+
+COMPATIBLE_MACHINE = "am62xx"
+
+BRANCH = "ti-rt-linux-6.1.y"
+BRANCH:tie-jailhouse = "ti-rt-linux-6.1.y-jailhouse"
+
+SRCREV = "685e77152461bd6b791500f717bec62d17c1b36d"
+SRCREV:tie-jailhouse = "a74088b40b4d27478a2af5c20cdc0b4ec8ed9470"