diff mbox series

[1/1] boot/ti-k3-boot-firmware: Add config option to specify version

Message ID 20240604061556.3167647-1-p-bhagat@ti.com
State Superseded
Headers show
Series [1/1] boot/ti-k3-boot-firmware: Add config option to specify version | expand

Commit Message

Paresh Bhagat June 4, 2024, 6:15 a.m. UTC
Previously the version of ti-k3-boot-firmware (TI_K3_BOOT_FIRMWARE_VERSION) was
fixed in mk file. Introduce a new config option 
BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION so that user can change the version
for ti-k3-boot-firmware using menuconfig.

This provides greater flexibilty for users to select different versions of
ti-k3-boot-firmware without modfying the build script directly.

Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
---
 boot/ti-k3-boot-firmware/Config.in            | 30 +++++++++++++++++++
 .../ti-k3-boot-firmware.mk                    |  2 +-
 2 files changed, 31 insertions(+), 1 deletion(-)

Comments

Bryan Brattlof June 5, 2024, 5:02 p.m. UTC | #1
Hi Paresh,

On June  4, 2024 thus sayeth Paresh Bhagat via buildroot:
> Previously the version of ti-k3-boot-firmware (TI_K3_BOOT_FIRMWARE_VERSION) was
> fixed in mk file. Introduce a new config option 
> BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION so that user can change the version
> for ti-k3-boot-firmware using menuconfig.
> 
> This provides greater flexibilty for users to select different versions of
> ti-k3-boot-firmware without modfying the build script directly.
> 
> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> ---
>  boot/ti-k3-boot-firmware/Config.in            | 30 +++++++++++++++++++
>  .../ti-k3-boot-firmware.mk                    |  2 +-
>  2 files changed, 31 insertions(+), 1 deletion(-)
> 

Reviewed-by: Bryan Brattlof <bb@ti.com>

Looks great to me! I will say the process is starting internally to move 
away from this linux-firmware fork in favor for sending things to 
linux-firmware directly. My hope is we can begin deprecating this 
package in a few months depending on how things go. 

~Bryan
Bryan Brattlof June 5, 2024, 5:54 p.m. UTC | #2
Oops! Just noticed some white-space issues while cleaning up.

On June  4, 2024 thus sayeth Paresh Bhagat via buildroot:
> Previously the version of ti-k3-boot-firmware (TI_K3_BOOT_FIRMWARE_VERSION) was
> fixed in mk file. Introduce a new config option 
> BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION so that user can change the version
> for ti-k3-boot-firmware using menuconfig.
> 
> This provides greater flexibilty for users to select different versions of
> ti-k3-boot-firmware without modfying the build script directly.
> 
> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
> ---
>  boot/ti-k3-boot-firmware/Config.in            | 30 +++++++++++++++++++
>  .../ti-k3-boot-firmware.mk                    |  2 +-
>  2 files changed, 31 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
> index d80bb4bdb3..adc201c468 100644
> --- a/boot/ti-k3-boot-firmware/Config.in
> +++ b/boot/ti-k3-boot-firmware/Config.in
> @@ -5,3 +5,33 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE
>  	  This package downloads and installs the TI-specific ti-sysfw
>  	  and ti-dm firmware needed to boot TI K3 platforms (which
>  	  include AM62x, AM64x, AM65x and more).
> +
> +if BR2_TARGET_TI_K3_BOOT_FIRMWARE
> +choice
> +	prompt "ti-k3-boot-firmware version"
> +	default BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
> +	help
> +		Select the version of Ti k3 boot firmware you want to use

Do you mind replacing the indentation with a <Tab> + 2 <Space> here? to 
align with the help label a little better. 

> +
> +config BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
> +	bool "09.02.00.009"
> +
> +config BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION
> +	bool "Custom version"
> +	help
> +      This option allows to use a specific official version from
> +      git.ti.org.
> +

For now ;) but same here. <Tab> + 2 <Space>

~Bryan
Paresh Bhagat June 6, 2024, 10:28 a.m. UTC | #3
Hi Bryan,

Thanks for the review. I will send v2 with your suggested changes.

Regards,

Paresh

On 05/06/24 23:24, Bryan Brattlof wrote:
> Oops! Just noticed some white-space issues while cleaning up.
>
> On June  4, 2024 thus sayeth Paresh Bhagat via buildroot:
>> Previously the version of ti-k3-boot-firmware (TI_K3_BOOT_FIRMWARE_VERSION) was
>> fixed in mk file. Introduce a new config option
>> BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION so that user can change the version
>> for ti-k3-boot-firmware using menuconfig.
>>
>> This provides greater flexibilty for users to select different versions of
>> ti-k3-boot-firmware without modfying the build script directly.
>>
>> Signed-off-by: Paresh Bhagat <p-bhagat@ti.com>
>> ---
>>   boot/ti-k3-boot-firmware/Config.in            | 30 +++++++++++++++++++
>>   .../ti-k3-boot-firmware.mk                    |  2 +-
>>   2 files changed, 31 insertions(+), 1 deletion(-)
>>
>> diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
>> index d80bb4bdb3..adc201c468 100644
>> --- a/boot/ti-k3-boot-firmware/Config.in
>> +++ b/boot/ti-k3-boot-firmware/Config.in
>> @@ -5,3 +5,33 @@ config BR2_TARGET_TI_K3_BOOT_FIRMWARE
>>   	  This package downloads and installs the TI-specific ti-sysfw
>>   	  and ti-dm firmware needed to boot TI K3 platforms (which
>>   	  include AM62x, AM64x, AM65x and more).
>> +
>> +if BR2_TARGET_TI_K3_BOOT_FIRMWARE
>> +choice
>> +	prompt "ti-k3-boot-firmware version"
>> +	default BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
>> +	help
>> +		Select the version of Ti k3 boot firmware you want to use
> Do you mind replacing the indentation with a <Tab> + 2 <Space> here? to
> align with the help label a little better.
>
>> +
>> +config BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
>> +	bool "09.02.00.009"
>> +
>> +config BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION
>> +	bool "Custom version"
>> +	help
>> +      This option allows to use a specific official version from
>> +      git.ti.org.
>> +
> For now ;) but same here. <Tab> + 2 <Space>
>
> ~Bryan
diff mbox series

Patch

diff --git a/boot/ti-k3-boot-firmware/Config.in b/boot/ti-k3-boot-firmware/Config.in
index d80bb4bdb3..adc201c468 100644
--- a/boot/ti-k3-boot-firmware/Config.in
+++ b/boot/ti-k3-boot-firmware/Config.in
@@ -5,3 +5,33 @@  config BR2_TARGET_TI_K3_BOOT_FIRMWARE
 	  This package downloads and installs the TI-specific ti-sysfw
 	  and ti-dm firmware needed to boot TI K3 platforms (which
 	  include AM62x, AM64x, AM65x and more).
+
+if BR2_TARGET_TI_K3_BOOT_FIRMWARE
+choice
+	prompt "ti-k3-boot-firmware version"
+	default BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
+	help
+		Select the version of Ti k3 boot firmware you want to use
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
+	bool "09.02.00.009"
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION
+	bool "Custom version"
+	help
+      This option allows to use a specific official version from
+      git.ti.org.
+
+endchoice
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION_VALUE
+    string "Custom ti-k3-boot-firmware version"
+    depends on BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION
+
+config BR2_TARGET_TI_K3_BOOT_FIRMWARE_VERSION
+    string
+    default "09.02.00.009"     if BR2_TARGET_TI_K3_BOOT_FIRMWARE_LATEST_VERSION
+    default BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION_VALUE \
+                if BR2_TARGET_TI_K3_BOOT_FIRMWARE_CUSTOM_VERSION
+
+endif
diff --git a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
index 9332732ad4..350381ebbe 100644
--- a/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
+++ b/boot/ti-k3-boot-firmware/ti-k3-boot-firmware.mk
@@ -4,7 +4,7 @@ 
 #
 ################################################################################
 
-TI_K3_BOOT_FIRMWARE_VERSION = 09.02.00.009
+TI_K3_BOOT_FIRMWARE_VERSION = $(call qstrip,$(BR2_TARGET_TI_K3_BOOT_FIRMWARE_VERSION))
 TI_K3_BOOT_FIRMWARE_SITE = https://git.ti.com/cgit/processor-firmware/ti-linux-firmware/snapshot
 TI_K3_BOOT_FIRMWARE_SOURCE = ti-linux-firmware-$(TI_K3_BOOT_FIRMWARE_VERSION).tar.xz
 TI_K3_BOOT_FIRMWARE_INSTALL_IMAGES = YES