All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] imx: Fix imx8m FIT script issue
@ 2020-04-09  8:44 Ye Li
  2020-04-09 12:12 ` Fabio Estevam
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ye Li @ 2020-04-09  8:44 UTC (permalink / raw)
  To: u-boot

The FIT config node has reversed ATF and u-boot: ATF is set to
firmware but u-boot is set to loadable.
This script can work previously because spl fit driver wrongly
appends fdt to all loadable images. With the issue fixed, the u-boot
in loadable does not have fdt appended and fails to work.
So correct script by moving u-boot to firmware and ATF to loadable.

Signed-off-by: Ye Li <ye.li@nxp.com>
---
 arch/arm/mach-imx/mkimage_fit_atf.sh | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh
index ad81d5e..dd1ca5a 100755
--- a/arch/arm/mach-imx/mkimage_fit_atf.sh
+++ b/arch/arm/mach-imx/mkimage_fit_atf.sh
@@ -116,8 +116,8 @@ if [ -f $BL32 ]; then
 cat << __CONF_SECTION_EOF
 		config@$cnt {
 			description = "$(basename $dtname .dtb)";
-			firmware = "atf at 1";
-			loadables = "uboot at 1", "tee at 1";
+			firmware = "uboot at 1";
+			loadables = "atf at 1", "tee at 1";
 			fdt = "fdt@$cnt";
 		};
 __CONF_SECTION_EOF
@@ -125,8 +125,8 @@ else
 cat << __CONF_SECTION1_EOF
 		config@$cnt {
 			description = "$(basename $dtname .dtb)";
-			firmware = "atf at 1";
-			loadables = "uboot at 1";
+			firmware = "uboot at 1";
+			loadables = "atf@1";
 			fdt = "fdt@$cnt";
 		};
 __CONF_SECTION1_EOF
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09  8:44 [PATCH] imx: Fix imx8m FIT script issue Ye Li
@ 2020-04-09 12:12 ` Fabio Estevam
  2020-04-09 13:09 ` Matt Porter
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Fabio Estevam @ 2020-04-09 12:12 UTC (permalink / raw)
  To: u-boot

Hi Ye Li,

Thanks for the fix.

On Thu, Apr 9, 2020 at 5:45 AM Ye Li <ye.li@nxp.com> wrote:
>
> The FIT config node has reversed ATF and u-boot: ATF is set to
> firmware but u-boot is set to loadable.
> This script can work previously because spl fit driver wrongly
> appends fdt to all loadable images. With the issue fixed, the u-boot

Please mention the commit that fixed the issue:

With the issue fixed in commit 9d15d1d1c24f ("Revert "common:
spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled"")

> in loadable does not have fdt appended and fails to work.
> So correct script by moving u-boot to firmware and ATF to loadable.

Since Matt reported this problem, please add:

Reported-by: Matt Porter <mporter@konsulko.com>

> Signed-off-by: Ye Li <ye.li@nxp.com>

Let's wait for Matt's Tested-by.

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09  8:44 [PATCH] imx: Fix imx8m FIT script issue Ye Li
  2020-04-09 12:12 ` Fabio Estevam
@ 2020-04-09 13:09 ` Matt Porter
  2020-04-09 13:18   ` Fabio Estevam
  2020-04-09 17:32 ` Tom Rini
  2020-04-27 12:32 ` Schrempf Frieder
  3 siblings, 1 reply; 7+ messages in thread
From: Matt Porter @ 2020-04-09 13:09 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 09, 2020 at 01:44:43AM -0700, Ye Li wrote:
> The FIT config node has reversed ATF and u-boot: ATF is set to
> firmware but u-boot is set to loadable.
> This script can work previously because spl fit driver wrongly
> appends fdt to all loadable images. With the issue fixed, the u-boot
> in loadable does not have fdt appended and fails to work.
> So correct script by moving u-boot to firmware and ATF to loadable.
> 
> Signed-off-by: Ye Li <ye.li@nxp.com>

Hi Ye Li,

Thanks, this patch does fix the issue.

Tested-by: Matt Porter <mporter@konsulko.com>

-Matt

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09 13:09 ` Matt Porter
@ 2020-04-09 13:18   ` Fabio Estevam
  2020-04-09 13:21     ` Tom Rini
  0 siblings, 1 reply; 7+ messages in thread
From: Fabio Estevam @ 2020-04-09 13:18 UTC (permalink / raw)
  To: u-boot

Hi Tom,

On Thu, Apr 9, 2020 at 10:09 AM Matt Porter <mporter@konsulko.com> wrote:
>
> On Thu, Apr 09, 2020 at 01:44:43AM -0700, Ye Li wrote:
> > The FIT config node has reversed ATF and u-boot: ATF is set to
> > firmware but u-boot is set to loadable.
> > This script can work previously because spl fit driver wrongly
> > appends fdt to all loadable images. With the issue fixed, the u-boot
> > in loadable does not have fdt appended and fails to work.
> > So correct script by moving u-boot to firmware and ATF to loadable.
> >
> > Signed-off-by: Ye Li <ye.li@nxp.com>
>
> Hi Ye Li,
>
> Thanks, this patch does fix the issue.
>
> Tested-by: Matt Porter <mporter@konsulko.com>

Not sure if Stefano plans to send another pull request. If not, maybe
you could apply this one directly?

Thanks

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09 13:18   ` Fabio Estevam
@ 2020-04-09 13:21     ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2020-04-09 13:21 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 09, 2020 at 10:18:28AM -0300, Fabio Estevam wrote:
> Hi Tom,
> 
> On Thu, Apr 9, 2020 at 10:09 AM Matt Porter <mporter@konsulko.com> wrote:
> >
> > On Thu, Apr 09, 2020 at 01:44:43AM -0700, Ye Li wrote:
> > > The FIT config node has reversed ATF and u-boot: ATF is set to
> > > firmware but u-boot is set to loadable.
> > > This script can work previously because spl fit driver wrongly
> > > appends fdt to all loadable images. With the issue fixed, the u-boot
> > > in loadable does not have fdt appended and fails to work.
> > > So correct script by moving u-boot to firmware and ATF to loadable.
> > >
> > > Signed-off-by: Ye Li <ye.li@nxp.com>
> >
> > Hi Ye Li,
> >
> > Thanks, this patch does fix the issue.
> >
> > Tested-by: Matt Porter <mporter@konsulko.com>
> 
> Not sure if Stefano plans to send another pull request. If not, maybe
> you could apply this one directly?

I'm fine picking this up directly, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200409/8f0df120/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09  8:44 [PATCH] imx: Fix imx8m FIT script issue Ye Li
  2020-04-09 12:12 ` Fabio Estevam
  2020-04-09 13:09 ` Matt Porter
@ 2020-04-09 17:32 ` Tom Rini
  2020-04-27 12:32 ` Schrempf Frieder
  3 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2020-04-09 17:32 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 09, 2020 at 01:44:43AM -0700, Ye Li wrote:

> The FIT config node has reversed ATF and u-boot: ATF is set to 'firmware' but
> u-boot is set to 'loadables'.
> This script can work previously because spl fit driver wrongly appends fdt to
> all loadable images. With the issue fixed in commit 9d15d1d1c24f ("Revert
> "common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled"") the
> u-boot in 'loadables' does not have fdt appended and fails to work.  So correct
> the script by moving u-boot to 'firmware' and ATF to 'loadables'.
> 
> Signed-off-by: Ye Li <ye.li@nxp.com>
> Reported-by: Matt Porter <mporter@konsulko.com>
> Tested-by: Matt Porter <mporter@konsulko.com>

Rewording the commit per Fabio's suggestion with a few other tweaks as I
read over the code to the above, and taking directly also at his
suggestion.

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200409/d8ab05a7/attachment.sig>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] imx: Fix imx8m FIT script issue
  2020-04-09  8:44 [PATCH] imx: Fix imx8m FIT script issue Ye Li
                   ` (2 preceding siblings ...)
  2020-04-09 17:32 ` Tom Rini
@ 2020-04-27 12:32 ` Schrempf Frieder
  3 siblings, 0 replies; 7+ messages in thread
From: Schrempf Frieder @ 2020-04-27 12:32 UTC (permalink / raw)
  To: u-boot

On 09.04.20 10:44, Ye Li wrote:
> The FIT config node has reversed ATF and u-boot: ATF is set to
> firmware but u-boot is set to loadable.
> This script can work previously because spl fit driver wrongly
> appends fdt to all loadable images. With the issue fixed, the u-boot
> in loadable does not have fdt appended and fails to work.
> So correct script by moving u-boot to firmware and ATF to loadable.

I know this has been applied and the change itself is probably correct. 
But when I apply this to my 2020.01-based tree, TFA/U-Boot isn't loaded 
anymore.

Please note, that I have disabled CONFIG_SPL_FIT_IMAGE_TINY, so 
9d15d1d1c24f ("Revert "common: spl_fit: Default to IH_OS_U_BOOT if 
FIT_IMAGE_TINY enabled"") won't help.

I haven't tested with master so far, so I'm not sure if I miss some 
other patch or if there is an actual issue.

I just wondered why I switched the order in the first place in 
fa99af41e0da ("imx: mkimage_fit_atf: Fix FIT image for correct boot order").

It would also have been nice if I would have been cc-ed for this patch 
as I was the one introducing the "wrong" order in fa99af41e0da.

> 
> Signed-off-by: Ye Li <ye.li@nxp.com>
> ---
>   arch/arm/mach-imx/mkimage_fit_atf.sh | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/mach-imx/mkimage_fit_atf.sh b/arch/arm/mach-imx/mkimage_fit_atf.sh
> index ad81d5e..dd1ca5a 100755
> --- a/arch/arm/mach-imx/mkimage_fit_atf.sh
> +++ b/arch/arm/mach-imx/mkimage_fit_atf.sh
> @@ -116,8 +116,8 @@ if [ -f $BL32 ]; then
>   cat << __CONF_SECTION_EOF
>   		config@$cnt {
>   			description = "$(basename $dtname .dtb)";
> -			firmware = "atf at 1";
> -			loadables = "uboot at 1", "tee at 1";
> +			firmware = "uboot at 1";
> +			loadables = "atf at 1", "tee at 1";
>   			fdt = "fdt@$cnt";
>   		};
>   __CONF_SECTION_EOF
> @@ -125,8 +125,8 @@ else
>   cat << __CONF_SECTION1_EOF
>   		config@$cnt {
>   			description = "$(basename $dtname .dtb)";
> -			firmware = "atf at 1";
> -			loadables = "uboot at 1";
> +			firmware = "uboot at 1";
> +			loadables = "atf at 1";
>   			fdt = "fdt@$cnt";
>   		};
>   __CONF_SECTION1_EOF
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-04-27 12:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-09  8:44 [PATCH] imx: Fix imx8m FIT script issue Ye Li
2020-04-09 12:12 ` Fabio Estevam
2020-04-09 13:09 ` Matt Porter
2020-04-09 13:18   ` Fabio Estevam
2020-04-09 13:21     ` Tom Rini
2020-04-09 17:32 ` Tom Rini
2020-04-27 12:32 ` Schrempf Frieder

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.