diff mbox series

boot/arm-trusted-firmware: add new version

Message ID 20190205221414.23720-1-michal.lyszczek@bofc.pl
State Changes Requested
Headers show
Series boot/arm-trusted-firmware: add new version | expand

Commit Message

Michał Łyszczek Feb. 5, 2019, 10:14 p.m. UTC
Allow user to choose specific version of ATF apart from latest or custom
version.

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
---
 boot/arm-trusted-firmware/Config.in                 | 10 +++++++++-
 boot/arm-trusted-firmware/arm-trusted-firmware.hash |  1 +
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Baruch Siach Feb. 6, 2019, 5:45 a.m. UTC | #1
Hi Michał,

On Tue, Feb 05, 2019 at 11:14:14PM +0100, Michał Łyszczek wrote:
> Allow user to choose specific version of ATF apart from latest or custom
> version.
> 
> Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
> ---
>  boot/arm-trusted-firmware/Config.in                 | 10 +++++++++-
>  boot/arm-trusted-firmware/arm-trusted-firmware.hash |  1 +
>  2 files changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> index 885d93e62f..646ca1dee2 100644
> --- a/boot/arm-trusted-firmware/Config.in
> +++ b/boot/arm-trusted-firmware/Config.in
> @@ -14,6 +14,12 @@ choice
>  	  Select the specific ATF version you want to use
>  
>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
> +	bool "Latest (v2.0)"
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
> +	bool "v2.0"
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
>  	bool "v1.4"

Any specific reason to keep 1.4 as a config choice?

baruch

>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
> @@ -33,7 +39,9 @@ endif
>  
>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
>  	string
> -	default "v1.4"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
> +	default "v2.0"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
> +	default "v2.0"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
> +	default "v1.4"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
>  	default "custom"	if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
>  	default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
>  				if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
> diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.hash b/boot/arm-trusted-firmware/arm-trusted-firmware.hash
> index 394071865e..8154185301 100644
> --- a/boot/arm-trusted-firmware/arm-trusted-firmware.hash
> +++ b/boot/arm-trusted-firmware/arm-trusted-firmware.hash
> @@ -1,3 +1,4 @@
>  # Locally calculated
> +sha256 7d699a1683bb7a5909de37b6eb91b6e38db32cd6fc5ae48a08eb0718d6504ae4 arm-trusted-firmware-v2.0.tar.gz
>  sha256 6dae02acd85278394bfad6e2683e186e5332a711e4491ac4632ad6480f6e5494 arm-trusted-firmware-v1.4.tar.gz
>  sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164  license.rst
Thomas Petazzoni Feb. 6, 2019, 8:40 a.m. UTC | #2
On Tue,  5 Feb 2019 23:14:14 +0100
Michał Łyszczek <michal.lyszczek@bofc.pl> wrote:

>  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
> +	bool "Latest (v2.0)"
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
> +	bool "v2.0"
> +
> +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
>  	bool "v1.4"

This is not really what I suggested, but maybe I wasn't clear. I
suggested to do a similar thing to what we have for U-Boot:

 - One option to select the latest stable

 - One option to select an arbitrary stable version

See boot/uboot/Config.in:

choice
        prompt "U-Boot Version"
        help
          Select the specific U-Boot version you want to use

config BR2_TARGET_UBOOT_LATEST_VERSION
        bool "2018.09"

config BR2_TARGET_UBOOT_CUSTOM_VERSION
        bool "Custom version"
        help
          This option allows to use a specific official versions

config BR2_TARGET_UBOOT_CUSTOM_TARBALL
        bool "Custom tarball"

config BR2_TARGET_UBOOT_CUSTOM_GIT
        bool "Custom Git repository"

config BR2_TARGET_UBOOT_CUSTOM_HG
        bool "Custom Mercurial repository"

config BR2_TARGET_UBOOT_CUSTOM_SVN
        bool "Custom Subversion repository"

endchoice

Also, if you're bumping the default ATF version from 1.4 to 2.0, it
should be a separate patch.

Thanks!

Thomas
Michał Łyszczek Feb. 6, 2019, 8:45 a.m. UTC | #3
Hi Baruch,

On 2019-02-06 07:45:29, Baruch Siach wrote:
> Hi Michał,
> 
> On Tue, Feb 05, 2019 at 11:14:14PM +0100, Michał Łyszczek wrote:
> > Allow user to choose specific version of ATF apart from latest or custom
> > version.
> > 
> > Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
> > ---
> >  boot/arm-trusted-firmware/Config.in                 | 10 +++++++++-
> >  boot/arm-trusted-firmware/arm-trusted-firmware.hash |  1 +
> >  2 files changed, 10 insertions(+), 1 deletion(-)
> > 
> > diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
> > index 885d93e62f..646ca1dee2 100644
> > --- a/boot/arm-trusted-firmware/Config.in
> > +++ b/boot/arm-trusted-firmware/Config.in
> > @@ -14,6 +14,12 @@ choice
> >  	  Select the specific ATF version you want to use
> >  
> >  config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
> > +	bool "Latest (v2.0)"
> > +
> > +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
> > +	bool "v2.0"
> > +
> > +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
> >  	bool "v1.4"
> 
> Any specific reason to keep 1.4 as a config choice?

Yes, backward compatibility. arm_juno_defconfig and rock64_defconfig use v1.4
version of ATF, but juno specifies it in custom repo version field and this
patch is to enable rock64 (which is not yet merged) to chose specific v1.4
version. Now it could be good to modify juno config to use v1.4 instead of
custom repo version with string "v1.4", but according to the rule - if it works
don't change it - I didn't change it. If you wish I can prepare v2 patch that
changes it.
diff mbox series

Patch

diff --git a/boot/arm-trusted-firmware/Config.in b/boot/arm-trusted-firmware/Config.in
index 885d93e62f..646ca1dee2 100644
--- a/boot/arm-trusted-firmware/Config.in
+++ b/boot/arm-trusted-firmware/Config.in
@@ -14,6 +14,12 @@  choice
 	  Select the specific ATF version you want to use
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
+	bool "Latest (v2.0)"
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
+	bool "v2.0"
+
+config BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
 	bool "v1.4"
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
@@ -33,7 +39,9 @@  endif
 
 config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION
 	string
-	default "v1.4"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
+	default "v2.0"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION
+	default "v2.0"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_2_0
+	default "v1.4"		if BR2_TARGET_ARM_TRUSTED_FIRMWARE_1_4
 	default "custom"	if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL
 	default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \
 				if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
diff --git a/boot/arm-trusted-firmware/arm-trusted-firmware.hash b/boot/arm-trusted-firmware/arm-trusted-firmware.hash
index 394071865e..8154185301 100644
--- a/boot/arm-trusted-firmware/arm-trusted-firmware.hash
+++ b/boot/arm-trusted-firmware/arm-trusted-firmware.hash
@@ -1,3 +1,4 @@ 
 # Locally calculated
+sha256 7d699a1683bb7a5909de37b6eb91b6e38db32cd6fc5ae48a08eb0718d6504ae4 arm-trusted-firmware-v2.0.tar.gz
 sha256 6dae02acd85278394bfad6e2683e186e5332a711e4491ac4632ad6480f6e5494 arm-trusted-firmware-v1.4.tar.gz
 sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164  license.rst