Re: [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header

2016-05-06 Thread Steve Rae
On Fri, May 6, 2016 at 2:27 PM, André Przywara 
wrote:

> On 06/05/16 22:15, Steve Rae wrote:
> > Hi Andre,
> >
> > On Wed, May 4, 2016 at 2:15 PM, Andre Przywara  > > wrote:
> >
> > The Allwinner provided boot0 boot loader requires a header before the
> > U-Boot binary to both check its validity and to find other blobs to
> > load. There is a tool called boot0img which fills the header
> > appropriately.
> > Reserve some space at the beginning of the binary to later hold the
> > header if needed.
> > Please note that the header is jumped over already by U-Boot anyway,
> > so filling the header is optional and can be skipped if for instance
> > boot0 is not used.
> >
> > Signed-off-by: Andre Przywara  > >
> > ---
> >  arch/arm/cpu/armv8/start.S | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> > index deb44a8..b4c4867 100644
> > --- a/arch/arm/cpu/armv8/start.S
> > +++ b/arch/arm/cpu/armv8/start.S
> > @@ -21,6 +21,9 @@
> >  _start:
> > b   reset
> >
> > +#ifdef CONFIG_ARCH_SUNXI
> > +   .space 0x5fc/* can be filled with a boot0 header if
> > needed */
> > +#endif
> >
> >
> > NAK !
> > this is NOT the _only_ board that would need this, so I propose:
>
> Well, I was thinking about this as well, but wondered why nobody has
> ever come up with something like this before.
>
> So I am happy indeed with a more generic solution.
>
> >
> > #ifdef CONFIG_RESERVE_SPACE_BOOT0
> > .space  CONFIG_RESERVE_SPACE_BOOT0
> > #endif
>
> If you don't mind, I will put these three lines as your patch in a new
> post. Feel free to send it yourself if you prefer this.
> And it seems that boot0 is an Allwinner term, so maybe some more generic
> naming like CONFIG_RESERVED_HEADER_SPACE or the like?
>

I'm OK with your "v2" - thanks!
And Broadcom uses the term "boot0" -- but your define is fine if "boot0" is
too vendor specific!
PS. would you add it the "arm" as well - thanks!

diff --git a/arch/arm/lib/vectors.S b/arch/arm/lib/vectors.S
index 49238ed..f0d0bb1 100644
--- a/arch/arm/lib/vectors.S
+++ b/arch/arm/lib/vectors.S
@@ -60,6 +60,10 @@ _start:
ldr pc, _irq
ldr pc, _fiq

+#ifdef CONFIG_RESERVE_SPACE_BOOT0
+   .space  CONFIG_RESERVE_SPACE_BOOT0
+#endif
+




> Cheers,
> Andre.
>
> >
> > Thanks, Steve
> >
> > .align 3
> >
> >  .globl _TEXT_BASE
> > --
> > 2.7.3
> >
> > ___
> > U-Boot mailing list
> > U-Boot@lists.denx.de 
> > http://lists.denx.de/mailman/listinfo/u-boot
> >
> >
>
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header

2016-05-06 Thread André Przywara
On 06/05/16 22:15, Steve Rae wrote:
> Hi Andre,
> 
> On Wed, May 4, 2016 at 2:15 PM, Andre Przywara  > wrote:
> 
> The Allwinner provided boot0 boot loader requires a header before the
> U-Boot binary to both check its validity and to find other blobs to
> load. There is a tool called boot0img which fills the header
> appropriately.
> Reserve some space at the beginning of the binary to later hold the
> header if needed.
> Please note that the header is jumped over already by U-Boot anyway,
> so filling the header is optional and can be skipped if for instance
> boot0 is not used.
> 
> Signed-off-by: Andre Przywara  >
> ---
>  arch/arm/cpu/armv8/start.S | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index deb44a8..b4c4867 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -21,6 +21,9 @@
>  _start:
> b   reset
> 
> +#ifdef CONFIG_ARCH_SUNXI
> +   .space 0x5fc/* can be filled with a boot0 header if
> needed */
> +#endif
> 
> 
> NAK !
> this is NOT the _only_ board that would need this, so I propose:

Well, I was thinking about this as well, but wondered why nobody has
ever come up with something like this before.

So I am happy indeed with a more generic solution.

> 
> #ifdef CONFIG_RESERVE_SPACE_BOOT0
> .space  CONFIG_RESERVE_SPACE_BOOT0
> #endif

If you don't mind, I will put these three lines as your patch in a new
post. Feel free to send it yourself if you prefer this.
And it seems that boot0 is an Allwinner term, so maybe some more generic
naming like CONFIG_RESERVED_HEADER_SPACE or the like?

Cheers,
Andre.

>  
> Thanks, Steve
> 
> .align 3
> 
>  .globl _TEXT_BASE
> --
> 2.7.3
> 
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de 
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header

2016-05-06 Thread Steve Rae
Hi Andre,

On Wed, May 4, 2016 at 2:15 PM, Andre Przywara 
wrote:

> The Allwinner provided boot0 boot loader requires a header before the
> U-Boot binary to both check its validity and to find other blobs to
> load. There is a tool called boot0img which fills the header
> appropriately.
> Reserve some space at the beginning of the binary to later hold the
> header if needed.
> Please note that the header is jumped over already by U-Boot anyway,
> so filling the header is optional and can be skipped if for instance
> boot0 is not used.
>
> Signed-off-by: Andre Przywara 
> ---
>  arch/arm/cpu/armv8/start.S | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
> index deb44a8..b4c4867 100644
> --- a/arch/arm/cpu/armv8/start.S
> +++ b/arch/arm/cpu/armv8/start.S
> @@ -21,6 +21,9 @@
>  _start:
> b   reset
>
> +#ifdef CONFIG_ARCH_SUNXI
> +   .space 0x5fc/* can be filled with a boot0 header if needed */
> +#endif
>

NAK !
this is NOT the _only_ board that would need this, so I propose:

#ifdef CONFIG_RESERVE_SPACE_BOOT0
.space  CONFIG_RESERVE_SPACE_BOOT0
#endif

Thanks, Steve

.align 3
>
>  .globl _TEXT_BASE
> --
> 2.7.3
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH 3/6] arm64: sunxi: reserve space for boot0 header

2016-05-04 Thread Andre Przywara
The Allwinner provided boot0 boot loader requires a header before the
U-Boot binary to both check its validity and to find other blobs to
load. There is a tool called boot0img which fills the header
appropriately.
Reserve some space at the beginning of the binary to later hold the
header if needed.
Please note that the header is jumped over already by U-Boot anyway,
so filling the header is optional and can be skipped if for instance
boot0 is not used.

Signed-off-by: Andre Przywara 
---
 arch/arm/cpu/armv8/start.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S
index deb44a8..b4c4867 100644
--- a/arch/arm/cpu/armv8/start.S
+++ b/arch/arm/cpu/armv8/start.S
@@ -21,6 +21,9 @@
 _start:
b   reset
 
+#ifdef CONFIG_ARCH_SUNXI
+   .space 0x5fc/* can be filled with a boot0 header if needed */
+#endif
.align 3
 
 .globl _TEXT_BASE
-- 
2.7.3

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot