All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting
@ 2022-05-02 16:36 Pali Rohár
  2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Pali Rohár @ 2022-05-02 16:36 UTC (permalink / raw)
  To: Priyanka Jain, Simon Glass, Wolfgang Denk; +Cc: Sinan Akman, u-boot

NOR version of U-Boot for mpc85xx is currently broken.

NOR booting with CONFIG_OF_SEPARATE is broken since my commit
e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support") which
was merged into master few days ago and was fixing SD card booting.

NOR booting with CONFIG_OF_EMBED seems to be broken for a longer time.

This patch series fix it. Tested on P2020 board, both SD and NOR booting
with CONFIG_OF_SEPARATE and also with CONFIG_OF_EMBED.

Pali Rohár (2):
  powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting
  powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting

 Makefile                     | 2 +-
 arch/powerpc/dts/u-boot.dtsi | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

-- 
2.20.1


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

* [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting
  2022-05-02 16:36 [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting Pali Rohár
@ 2022-05-02 16:36 ` Pali Rohár
  2022-05-23 17:57   ` Tom Rini
  2022-05-02 16:36 ` [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED " Pali Rohár
  2022-05-10 11:26 ` [PATCH 0/2] powerpc: mpc85xx: Fix " Pali Rohár
  2 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2022-05-02 16:36 UTC (permalink / raw)
  To: Priyanka Jain, Simon Glass, Wolfgang Denk; +Cc: Sinan Akman, u-boot

Commit e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
fixed SD card booting on mpc85xx boards but broke NOR booting on these
boards. Reason is that U-Boot build system for NOR images uses binman and
this binman ignores alignment defined in linker script. Instead it has own
config file where is alignment defined.

Fix binman alignment for mpc85xx boards to match what is _now_ defined in
linker script.

This change fixes building of U-Boot for NOR booting on P2020 board.

Fixes: e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/powerpc/dts/u-boot.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/powerpc/dts/u-boot.dtsi b/arch/powerpc/dts/u-boot.dtsi
index 9661f4dc88d3..67de476a45ed 100644
--- a/arch/powerpc/dts/u-boot.dtsi
+++ b/arch/powerpc/dts/u-boot.dtsi
@@ -20,7 +20,7 @@
 
 		u-boot-dtb-with-ucode {
 #ifdef CONFIG_MPC85xx
-			align = <256>;
+			align = <4>;
 #endif
 		};
 #ifdef CONFIG_MPC85XX_HAVE_RESET_VECTOR
-- 
2.20.1


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

* [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting
  2022-05-02 16:36 [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting Pali Rohár
  2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
@ 2022-05-02 16:36 ` Pali Rohár
  2022-05-23 17:57   ` Tom Rini
  2022-05-10 11:26 ` [PATCH 0/2] powerpc: mpc85xx: Fix " Pali Rohár
  2 siblings, 1 reply; 7+ messages in thread
From: Pali Rohár @ 2022-05-02 16:36 UTC (permalink / raw)
  To: Priyanka Jain, Simon Glass, Wolfgang Denk; +Cc: Sinan Akman, u-boot

mpc85xx NOR binary contains also reset vector and therefore option
CONFIG_MPC85XX_HAVE_RESET_VECTOR must be defined.

When build system uses binman, it takes care of constructing final image
which consist of u-boot-without-reset-vector, DTB and reset-vector.

CONFIG_OF_EMBED does not use binman, there is no external DTB and Makefile
produce directly final u-boot.bin binary.

So in this case mpc85xx reset vector must not be stripped from the final
u-boot.bin binary. Fix it.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index ad83d60dc39d..631de02b55f2 100644
--- a/Makefile
+++ b/Makefile
@@ -1249,7 +1249,7 @@ spl/u-boot-spl.srec: spl/u-boot-spl FORCE
 
 OBJCOPYFLAGS_u-boot-nodtb.bin := -O binary \
 		$(if $(CONFIG_X86_16BIT_INIT),-R .start16 -R .resetvec) \
-		$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),-R .bootpg -R .resetvec)
+		$(if $(CONFIG_MPC85XX_HAVE_RESET_VECTOR),$(if $(CONFIG_OF_EMBED),,-R .bootpg -R .resetvec))
 
 binary_size_check: u-boot-nodtb.bin FORCE
 	@file_size=$(shell wc -c u-boot-nodtb.bin | awk '{print $$1}') ; \
-- 
2.20.1


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

* Re: [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting
  2022-05-02 16:36 [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting Pali Rohár
  2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
  2022-05-02 16:36 ` [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED " Pali Rohár
@ 2022-05-10 11:26 ` Pali Rohár
  2 siblings, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2022-05-10 11:26 UTC (permalink / raw)
  To: Priyanka Jain, Simon Glass, Wolfgang Denk; +Cc: Sinan Akman, u-boot

On Monday 02 May 2022 18:36:37 Pali Rohár wrote:
> NOR version of U-Boot for mpc85xx is currently broken.
> 
> NOR booting with CONFIG_OF_SEPARATE is broken since my commit
> e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support") which
> was merged into master few days ago and was fixing SD card booting.

PING. v2022.07-rc2 was already released with with above commit!

> NOR booting with CONFIG_OF_EMBED seems to be broken for a longer time.
> 
> This patch series fix it. Tested on P2020 board, both SD and NOR booting
> with CONFIG_OF_SEPARATE and also with CONFIG_OF_EMBED.
> 
> Pali Rohár (2):
>   powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting
>   powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting
> 
>  Makefile                     | 2 +-
>  arch/powerpc/dts/u-boot.dtsi | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> -- 
> 2.20.1
> 

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

* Re: [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting
  2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
@ 2022-05-23 17:57   ` Tom Rini
  2022-05-23 17:58     ` Pali Rohár
  0 siblings, 1 reply; 7+ messages in thread
From: Tom Rini @ 2022-05-23 17:57 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Priyanka Jain, Simon Glass, Wolfgang Denk, Sinan Akman, u-boot

[-- Attachment #1: Type: text/plain, Size: 762 bytes --]

On Mon, May 02, 2022 at 06:36:38PM +0200, Pali Rohár wrote:

> Commit e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
> fixed SD card booting on mpc85xx boards but broke NOR booting on these
> boards. Reason is that U-Boot build system for NOR images uses binman and
> this binman ignores alignment defined in linker script. Instead it has own
> config file where is alignment defined.
> 
> Fix binman alignment for mpc85xx boards to match what is _now_ defined in
> linker script.
> 
> This change fixes building of U-Boot for NOR booting on P2020 board.
> 
> Fixes: e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
> Signed-off-by: Pali Rohár <pali@kernel.org>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED support for NOR booting
  2022-05-02 16:36 ` [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED " Pali Rohár
@ 2022-05-23 17:57   ` Tom Rini
  0 siblings, 0 replies; 7+ messages in thread
From: Tom Rini @ 2022-05-23 17:57 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Priyanka Jain, Simon Glass, Wolfgang Denk, Sinan Akman, u-boot

[-- Attachment #1: Type: text/plain, Size: 674 bytes --]

On Mon, May 02, 2022 at 06:36:39PM +0200, Pali Rohár wrote:

> mpc85xx NOR binary contains also reset vector and therefore option
> CONFIG_MPC85XX_HAVE_RESET_VECTOR must be defined.
> 
> When build system uses binman, it takes care of constructing final image
> which consist of u-boot-without-reset-vector, DTB and reset-vector.
> 
> CONFIG_OF_EMBED does not use binman, there is no external DTB and Makefile
> produce directly final u-boot.bin binary.
> 
> So in this case mpc85xx reset vector must not be stripped from the final
> u-boot.bin binary. Fix it.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for NOR booting
  2022-05-23 17:57   ` Tom Rini
@ 2022-05-23 17:58     ` Pali Rohár
  0 siblings, 0 replies; 7+ messages in thread
From: Pali Rohár @ 2022-05-23 17:58 UTC (permalink / raw)
  To: Tom Rini; +Cc: Priyanka Jain, Simon Glass, Wolfgang Denk, Sinan Akman, u-boot

On Monday 23 May 2022 13:57:07 Tom Rini wrote:
> On Mon, May 02, 2022 at 06:36:38PM +0200, Pali Rohár wrote:
> 
> > Commit e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
> > fixed SD card booting on mpc85xx boards but broke NOR booting on these
> > boards. Reason is that U-Boot build system for NOR images uses binman and
> > this binman ignores alignment defined in linker script. Instead it has own
> > config file where is alignment defined.
> > 
> > Fix binman alignment for mpc85xx boards to match what is _now_ defined in
> > linker script.
> > 
> > This change fixes building of U-Boot for NOR booting on P2020 board.
> > 
> > Fixes: e8c0e0064c8a ("powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support")
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> 
> Applied to u-boot/master, thanks!

Perfect!!!

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

end of thread, other threads:[~2022-05-23 17:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-02 16:36 [PATCH 0/2] powerpc: mpc85xx: Fix NOR booting Pali Rohár
2022-05-02 16:36 ` [PATCH 1/2] powerpc: mpc85xx: Fix CONFIG_OF_SEPARATE support for " Pali Rohár
2022-05-23 17:57   ` Tom Rini
2022-05-23 17:58     ` Pali Rohár
2022-05-02 16:36 ` [PATCH 2/2] powerpc: mpc85xx: Fix CONFIG_OF_EMBED " Pali Rohár
2022-05-23 17:57   ` Tom Rini
2022-05-10 11:26 ` [PATCH 0/2] powerpc: mpc85xx: Fix " Pali Rohár

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.