diff mbox series

[kirkstone] k3r5: Use the ?= default assignment to allow for overrides

Message ID 20231102104828.100681-1-massimiliano.minella@gmail.com
State Accepted
Delegated to: Ryan Eatmon
Headers show
Series [kirkstone] k3r5: Use the ?= default assignment to allow for overrides | expand

Commit Message

Massimiliano Minella Nov. 2, 2023, 10:48 a.m. UTC
From: Ryan Eatmon <reatmon@ti.com>

Move to setting the values for PREFERRED_PROVIDER using the
?= default assignment so that we can override the setting if
we would like to.

Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
---
 meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Chirag Shilwant Nov. 2, 2023, 12:31 p.m. UTC | #1
On 02/11/23 16:18, Massimiliano Minella wrote:
> From: Ryan Eatmon <reatmon@ti.com>
>
> Move to setting the values for PREFERRED_PROVIDER using the
> ?= default assignment so that we can override the setting if
> we would like to.
>
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>


Acked-by: Chirag Shilwant <c-shilwant@ti.com>


> ---
>   meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
> index c5c03cbf..184d3a09 100644
> --- a/meta-ti-bsp/conf/machine/include/k3r5.inc
> +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
> @@ -11,9 +11,9 @@ require conf/machine/include/arm/armv7a/tune-cortexa8.inc
>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
> -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
> -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
> -PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
> +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>   
>   SPL_SUFFIX = "bin"
>   SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#17221): https://lists.yoctoproject.org/g/meta-ti/message/17221
> Mute This Topic: https://lists.yoctoproject.org/mt/102339031/7030289
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub [c-shilwant@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Denys Dmytriyenko Nov. 3, 2023, 1:08 a.m. UTC | #2
On Thu, Nov 02, 2023 at 11:48:28AM +0100, Massimiliano Minella wrote:
> From: Ryan Eatmon <reatmon@ti.com>
> 
> Move to setting the values for PREFERRED_PROVIDER using the
> ?= default assignment so that we can override the setting if
> we would like to.
> 
> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
> ---
>  meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
> index c5c03cbf..184d3a09 100644
> --- a/meta-ti-bsp/conf/machine/include/k3r5.inc
> +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
> @@ -11,9 +11,9 @@ require conf/machine/include/arm/armv7a/tune-cortexa8.inc
>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
> -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
> -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
> -PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
> +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"

Being able to override u-boot for k3r5 makes sense.

But allowing to change the kernel for k3r5 multiconfig that is now marked as 
baremetal is rather dubious...

What kind of use-case requires it?


>  SPL_SUFFIX = "bin"
>  SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
> -- 
> 2.42.0
Ryan Eatmon Nov. 3, 2023, 4:23 p.m. UTC | #3
On 11/2/2023 8:08 PM, Denys Dmytriyenko wrote:
> On Thu, Nov 02, 2023 at 11:48:28AM +0100, Massimiliano Minella wrote:
>> From: Ryan Eatmon <reatmon@ti.com>
>>
>> Move to setting the values for PREFERRED_PROVIDER using the
>> ?= default assignment so that we can override the setting if
>> we would like to.
>>
>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>> Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
>> ---
>>   meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
>> index c5c03cbf..184d3a09 100644
>> --- a/meta-ti-bsp/conf/machine/include/k3r5.inc
>> +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
>> @@ -11,9 +11,9 @@ require conf/machine/include/arm/armv7a/tune-cortexa8.inc
>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
>> -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
>> -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
>> -PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
>> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>> +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> 
> Being able to override u-boot for k3r5 makes sense.
> 
> But allowing to change the kernel for k3r5 multiconfig that is now marked as
> baremetal is rather dubious...
> 
> What kind of use-case requires it?

I think the the use case that I created the original patch for was the 
upstream testing.  We need to be able to change the kernel and uboot 
versions for the testing not having the ?= was causing issues.

And since this patch is on master and thus will be coming to the 
upcoming scarthgap branch shortly, I see no reason to not take it for 
kirkstone.

But if we want to rethink all of this, I'm not opposed.

> 
>>   SPL_SUFFIX = "bin"
>>   SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
>> -- 
>> 2.42.0
Denys Dmytriyenko Nov. 3, 2023, 8:05 p.m. UTC | #4
On Fri, Nov 03, 2023 at 11:23:47AM -0500, Ryan Eatmon wrote:
> 
> 
> On 11/2/2023 8:08 PM, Denys Dmytriyenko wrote:
> >On Thu, Nov 02, 2023 at 11:48:28AM +0100, Massimiliano Minella wrote:
> >>From: Ryan Eatmon <reatmon@ti.com>
> >>
> >>Move to setting the values for PREFERRED_PROVIDER using the
> >>?= default assignment so that we can override the setting if
> >>we would like to.
> >>
> >>Signed-off-by: Ryan Eatmon <reatmon@ti.com>
> >>Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
> >>---
> >>  meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
> >>  1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
> >>index c5c03cbf..184d3a09 100644
> >>--- a/meta-ti-bsp/conf/machine/include/k3r5.inc
> >>+++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
> >>@@ -11,9 +11,9 @@ require conf/machine/include/arm/armv7a/tune-cortexa8.inc
> >>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
> >>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
> >>  # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
> >>-PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
> >>-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
> >>-PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
> >>+PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
> >>+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
> >>+PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
> >
> >Being able to override u-boot for k3r5 makes sense.
> >
> >But allowing to change the kernel for k3r5 multiconfig that is now marked as
> >baremetal is rather dubious...
> >
> >What kind of use-case requires it?
> 
> I think the the use case that I created the original patch for was
> the upstream testing.  We need to be able to change the kernel and
> uboot versions for the testing not having the ?= was causing issues.

Please note this is specifically for k3r5, a baremetal config, where 
kernel is "neutered" by setting it to "linux-dummy". There are tons of 
implicit dependencies deep inside the OE on the kernel and all its pieces, 
modules, packages, and supporting components, which linux-dummy cuts out, 
making it a NOP.

There's no reason to ever change it even for upstream builds and testing. 
Not allowing it to be changed is a safeguard of sorts.

And since it is now being requested for backporting by Massimiliano, hence 
my question about the use-case...


> And since this patch is on master and thus will be coming to the
> upcoming scarthgap branch shortly, I see no reason to not take it
> for kirkstone.
> 
> But if we want to rethink all of this, I'm not opposed.
> 
> >
> >>  SPL_SUFFIX = "bin"
> >>  SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
> >>-- 
> >>2.42.0
Ryan Eatmon Nov. 3, 2023, 9:01 p.m. UTC | #5
On 11/3/2023 3:05 PM, Denys Dmytriyenko wrote:
> On Fri, Nov 03, 2023 at 11:23:47AM -0500, Ryan Eatmon wrote:
>>
>>
>> On 11/2/2023 8:08 PM, Denys Dmytriyenko wrote:
>>> On Thu, Nov 02, 2023 at 11:48:28AM +0100, Massimiliano Minella wrote:
>>>> From: Ryan Eatmon <reatmon@ti.com>
>>>>
>>>> Move to setting the values for PREFERRED_PROVIDER using the
>>>> ?= default assignment so that we can override the setting if
>>>> we would like to.
>>>>
>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>> Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
>>>> ---
>>>>   meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
>>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>> index c5c03cbf..184d3a09 100644
>>>> --- a/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>> +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>> @@ -11,9 +11,9 @@ require conf/machine/include/arm/armv7a/tune-cortexa8.inc
>>>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
>>>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
>>>>   # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
>>>> -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
>>>> -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
>>>> -PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
>>>> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
>>>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>>>> +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>>>
>>> Being able to override u-boot for k3r5 makes sense.
>>>
>>> But allowing to change the kernel for k3r5 multiconfig that is now marked as
>>> baremetal is rather dubious...
>>>
>>> What kind of use-case requires it?
>>
>> I think the the use case that I created the original patch for was
>> the upstream testing.  We need to be able to change the kernel and
>> uboot versions for the testing not having the ?= was causing issues.
> 
> Please note this is specifically for k3r5, a baremetal config, where
> kernel is "neutered" by setting it to "linux-dummy". There are tons of
> implicit dependencies deep inside the OE on the kernel and all its pieces,
> modules, packages, and supporting components, which linux-dummy cuts out,
> making it a NOP.
> 
> There's no reason to ever change it even for upstream builds and testing.
> Not allowing it to be changed is a safeguard of sorts.
> 
> And since it is now being requested for backporting by Massimiliano, hence
> my question about the use-case...

Yep.  I'll take a look and see if it is needed for upstream...


> 
>> And since this patch is on master and thus will be coming to the
>> upcoming scarthgap branch shortly, I see no reason to not take it
>> for kirkstone.
>>
>> But if we want to rethink all of this, I'm not opposed.
>>
>>>
>>>>   SPL_SUFFIX = "bin"
>>>>   SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
>>>> -- 
>>>> 2.42.0
Ryan Eatmon Nov. 3, 2023, 10:07 p.m. UTC | #6
On 11/3/2023 4:01 PM, Ryan Eatmon via lists.yoctoproject.org wrote:
> 
> 
> On 11/3/2023 3:05 PM, Denys Dmytriyenko wrote:
>> On Fri, Nov 03, 2023 at 11:23:47AM -0500, Ryan Eatmon wrote:
>>>
>>>
>>> On 11/2/2023 8:08 PM, Denys Dmytriyenko wrote:
>>>> On Thu, Nov 02, 2023 at 11:48:28AM +0100, Massimiliano Minella wrote:
>>>>> From: Ryan Eatmon <reatmon@ti.com>
>>>>>
>>>>> Move to setting the values for PREFERRED_PROVIDER using the
>>>>> ?= default assignment so that we can override the setting if
>>>>> we would like to.
>>>>>
>>>>> Signed-off-by: Ryan Eatmon <reatmon@ti.com>
>>>>> Signed-off-by: Massimiliano Minella <massimiliano.minella@se.com>
>>>>> ---
>>>>>   meta-ti-bsp/conf/machine/include/k3r5.inc | 6 +++---
>>>>>   1 file changed, 3 insertions(+), 3 deletions(-)
>>>>>
>>>>> diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc 
>>>>> b/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>>> index c5c03cbf..184d3a09 100644
>>>>> --- a/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>>> +++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
>>>>> @@ -11,9 +11,9 @@ require 
>>>>> conf/machine/include/arm/armv7a/tune-cortexa8.inc
>>>>>   # 
>>>>> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
>>>>>   # 
>>>>> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
>>>>>   # 
>>>>> https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
>>>>> -PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
>>>>> -PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
>>>>> -PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
>>>>> +PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
>>>>> +PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
>>>>> +PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
>>>>
>>>> Being able to override u-boot for k3r5 makes sense.
>>>>
>>>> But allowing to change the kernel for k3r5 multiconfig that is now 
>>>> marked as
>>>> baremetal is rather dubious...
>>>>
>>>> What kind of use-case requires it?
>>>
>>> I think the the use case that I created the original patch for was
>>> the upstream testing.  We need to be able to change the kernel and
>>> uboot versions for the testing not having the ?= was causing issues.
>>
>> Please note this is specifically for k3r5, a baremetal config, where
>> kernel is "neutered" by setting it to "linux-dummy". There are tons of
>> implicit dependencies deep inside the OE on the kernel and all its 
>> pieces,
>> modules, packages, and supporting components, which linux-dummy cuts out,
>> making it a NOP.
>>
>> There's no reason to ever change it even for upstream builds and testing.
>> Not allowing it to be changed is a safeguard of sorts.
>>
>> And since it is now being requested for backporting by Massimiliano, 
>> hence
>> my question about the use-case...
> 
> Yep.  I'll take a look and see if it is needed for upstream...

You know what it may have been... I needed to add the ?= for the uboot 
settings, and I just added it for the kernel as well since I was testing 
that stuff.

I agree.  The kernel one should go back to just =.  I'll submit the 
patch for that.


> 
>>
>>> And since this patch is on master and thus will be coming to the
>>> upcoming scarthgap branch shortly, I see no reason to not take it
>>> for kirkstone.
>>>
>>> But if we want to rethink all of this, I'm not opposed.
>>>
>>>>
>>>>>   SPL_SUFFIX = "bin"
>>>>>   SPL_BINARY = 
>>>>> "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"
>>>>> -- 
>>>>> 2.42.0
> 
> 
> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#17238): https://lists.yoctoproject.org/g/meta-ti/message/17238
> Mute This Topic: https://lists.yoctoproject.org/mt/102339031/6551054
> Group Owner: meta-ti+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/leave/10828724/6551054/1815494134/xyzzy [reatmon@ti.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta-ti-bsp/conf/machine/include/k3r5.inc b/meta-ti-bsp/conf/machine/include/k3r5.inc
index c5c03cbf..184d3a09 100644
--- a/meta-ti-bsp/conf/machine/include/k3r5.inc
+++ b/meta-ti-bsp/conf/machine/include/k3r5.inc
@@ -11,9 +11,9 @@  require conf/machine/include/arm/armv7a/tune-cortexa8.inc
 # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/j721e_evm.rst
 # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/am62x_sk.rst
 # https://git.ti.com/cgit/ti-u-boot/ti-u-boot/tree/doc/board/ti/k3.rst
-PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
-PREFERRED_PROVIDER_virtual/bootloader = "u-boot-ti-staging"
-PREFERRED_PROVIDER_u-boot = "u-boot-ti-staging"
+PREFERRED_PROVIDER_virtual/kernel ?= "linux-dummy"
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-ti-staging"
+PREFERRED_PROVIDER_u-boot ?= "u-boot-ti-staging"
 
 SPL_SUFFIX = "bin"
 SPL_BINARY = "tiboot3-${SYSFW_SOC}-${SYSFW_SUFFIX}-${SYSFW_CONFIG}.${SPL_SUFFIX}"