All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
@ 2017-03-01 16:03 Icenowy Zheng
  2017-03-03  9:22 ` Maxime Ripard
  0 siblings, 1 reply; 10+ messages in thread
From: Icenowy Zheng @ 2017-03-01 16:03 UTC (permalink / raw)
  To: u-boot


2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
>
> Hi Andre, 
>
> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> > The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> > ARM Trusted Firmware image beside the actual U-Boot proper. 
> > This can now be easily achieved by using the just extended SPL FIT 
> > loading support, so enable it in the Pine64 defconfig. 
> > Also add the FIT image as a build target to 64-bit sunxi board to 
> > trigger the respective Makefile rules. 
> > 
> > Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> > --- 
> >  configs/pine64_plus_defconfig  | 6 ++++++ 
> >  include/configs/sunxi-common.h | 4 ++++ 
> >  2 files changed, 10 insertions(+) 
> > 
> > diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> > index 7c7d86f..2b47157 100644 
> > --- a/configs/pine64_plus_defconfig 
> > +++ b/configs/pine64_plus_defconfig 
> > @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> >  CONFIG_ARCH_SUNXI=y 
> >  CONFIG_MACH_SUN50I=y 
> >  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> > +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> >  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> >  CONFIG_CONSOLE_MUX=y 
> >  CONFIG_SPL=y 
> > +CONFIG_FIT=y 
> > +CONFIG_SPL_FIT=y 
> > +CONFIG_SPL_LOAD_FIT=y 
> > +CONFIG_SPL_OF_LIBFDT=y 
>
> I'm not sure we want to force down that support to all our users. 

A64 boards are now unusable without proper ATF.

>
> We should definitely make that easy (basically just switching on an 
> option), for example a few selects here might be good. But switching 
> that on, and only for a few boards seems both weird and inconsistent. 
>
> >  # CONFIG_CMD_IMLS is not set 
> >  # CONFIG_CMD_FLASH is not set 
> >  # CONFIG_CMD_FPGA is not set 
> > @@ -14,3 +19,4 @@ CONFIG_SPL=y 
> >  # CONFIG_SPL_EFI_PARTITION is not set 
> >  CONFIG_SUN8I_EMAC=y 
> >  CONFIG_USB_EHCI_HCD=y 
> > +CONFIG_SPL_FIT_GENERATOR="board/sunxi/mksunxi_fit_atf.sh" 
>
> And that could be a default value. 
>
> Maxime 
>
> -- 
> Maxime Ripard, Free Electrons 
> Embedded Linux and Kernel engineering 
> http://free-electrons.com 
>
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group. 
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. 
> For more options, visit https://groups.google.com/d/optout. 

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-01 16:03 [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support Icenowy Zheng
@ 2017-03-03  9:22 ` Maxime Ripard
  2017-03-03  9:55   ` Andre Przywara
  0 siblings, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2017-03-03  9:22 UTC (permalink / raw)
  To: u-boot

On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
> 
> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
> >
> > Hi Andre, 
> >
> > On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> > > The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> > > ARM Trusted Firmware image beside the actual U-Boot proper. 
> > > This can now be easily achieved by using the just extended SPL FIT 
> > > loading support, so enable it in the Pine64 defconfig. 
> > > Also add the FIT image as a build target to 64-bit sunxi board to 
> > > trigger the respective Makefile rules. 
> > > 
> > > Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> > > --- 
> > >  configs/pine64_plus_defconfig  | 6 ++++++ 
> > >  include/configs/sunxi-common.h | 4 ++++ 
> > >  2 files changed, 10 insertions(+) 
> > > 
> > > diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> > > index 7c7d86f..2b47157 100644 
> > > --- a/configs/pine64_plus_defconfig 
> > > +++ b/configs/pine64_plus_defconfig 
> > > @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> > >  CONFIG_ARCH_SUNXI=y 
> > >  CONFIG_MACH_SUN50I=y 
> > >  CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> > > +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> > >  # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> > >  CONFIG_CONSOLE_MUX=y 
> > >  CONFIG_SPL=y 
> > > +CONFIG_FIT=y 
> > > +CONFIG_SPL_FIT=y 
> > > +CONFIG_SPL_LOAD_FIT=y 
> > > +CONFIG_SPL_OF_LIBFDT=y 
> >
> > I'm not sure we want to force down that support to all our users. 
> 
> A64 boards are now unusable without proper ATF.

That's debatable, but that's not really what I meant. What I meant was
that they're perfectly usable without FIT.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170303/bd9f9bff/attachment.sig>

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-03  9:22 ` Maxime Ripard
@ 2017-03-03  9:55   ` Andre Przywara
  2017-03-05  4:06     ` Jonathan Gray
  2017-03-06 10:00     ` Maxime Ripard
  0 siblings, 2 replies; 10+ messages in thread
From: Andre Przywara @ 2017-03-03  9:55 UTC (permalink / raw)
  To: u-boot

Hi,

On 03/03/17 09:22, Maxime Ripard wrote:
> On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
>>
>> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
>>>
>>> Hi Andre, 
>>>
>>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
>>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
>>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
>>>> This can now be easily achieved by using the just extended SPL FIT 
>>>> loading support, so enable it in the Pine64 defconfig. 
>>>> Also add the FIT image as a build target to 64-bit sunxi board to 
>>>> trigger the respective Makefile rules. 
>>>>
>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
>>>> --- 
>>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
>>>>   include/configs/sunxi-common.h | 4 ++++ 
>>>>   2 files changed, 10 insertions(+) 
>>>>
>>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
>>>> index 7c7d86f..2b47157 100644 
>>>> --- a/configs/pine64_plus_defconfig 
>>>> +++ b/configs/pine64_plus_defconfig 
>>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
>>>>   CONFIG_ARCH_SUNXI=y 
>>>>   CONFIG_MACH_SUN50I=y 
>>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
>>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
>>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
>>>>   CONFIG_CONSOLE_MUX=y 
>>>>   CONFIG_SPL=y 
>>>> +CONFIG_FIT=y 
>>>> +CONFIG_SPL_FIT=y 
>>>> +CONFIG_SPL_LOAD_FIT=y 
>>>> +CONFIG_SPL_OF_LIBFDT=y 
>>>
>>> I'm not sure we want to force down that support to all our users. 
>>
>> A64 boards are now unusable without proper ATF.
> 
> That's debatable, but that's not really what I meant. What I meant was
> that they're perfectly usable without FIT.

But this is a defconfig for a certain, and the Pine64 is not really
usable without ATF at the moment in an upstream tree.

Do you want a CONFIG_LOAD_ATF wrapper option, that would make it easier
to select / deselect?

Cheers,
Andre.

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-03  9:55   ` Andre Przywara
@ 2017-03-05  4:06     ` Jonathan Gray
  2017-03-05 10:40       ` André Przywara
  2017-03-06 10:00     ` Maxime Ripard
  1 sibling, 1 reply; 10+ messages in thread
From: Jonathan Gray @ 2017-03-05  4:06 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
> Hi,
> 
> On 03/03/17 09:22, Maxime Ripard wrote:
> > On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
> >>
> >> 2017???3???1??? 23:51??? Maxime Ripard <maxime.ripard@free-electrons.com>?????????
> >>>
> >>> Hi Andre, 
> >>>
> >>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> >>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> >>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
> >>>> This can now be easily achieved by using the just extended SPL FIT 
> >>>> loading support, so enable it in the Pine64 defconfig. 
> >>>> Also add the FIT image as a build target to 64-bit sunxi board to 
> >>>> trigger the respective Makefile rules. 
> >>>>
> >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> >>>> --- 
> >>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
> >>>>   include/configs/sunxi-common.h | 4 ++++ 
> >>>>   2 files changed, 10 insertions(+) 
> >>>>
> >>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> >>>> index 7c7d86f..2b47157 100644 
> >>>> --- a/configs/pine64_plus_defconfig 
> >>>> +++ b/configs/pine64_plus_defconfig 
> >>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> >>>>   CONFIG_ARCH_SUNXI=y 
> >>>>   CONFIG_MACH_SUN50I=y 
> >>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> >>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> >>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> >>>>   CONFIG_CONSOLE_MUX=y 
> >>>>   CONFIG_SPL=y 
> >>>> +CONFIG_FIT=y 
> >>>> +CONFIG_SPL_FIT=y 
> >>>> +CONFIG_SPL_LOAD_FIT=y 
> >>>> +CONFIG_SPL_OF_LIBFDT=y 
> >>>
> >>> I'm not sure we want to force down that support to all our users. 
> >>
> >> A64 boards are now unusable without proper ATF.
> > 
> > That's debatable, but that's not really what I meant. What I meant was
> > that they're perfectly usable without FIT.
> 
> But this is a defconfig for a certain, and the Pine64 is not really
> usable without ATF at the moment in an upstream tree.

Could board/sunxi/README.pine64 be updated for the current state of
things?

Without FIT is it now possible with u-boot 2017.03 to use sunxi-spl.bin
as a drop in replacement for Allwinner's boot0 and get a working
combination of SPL/u-boot/ATF that can be redistributed when combining
the parts with boot0img?

Using your repositories
https://github.com/apritzel/arm-trusted-firmware/tree/allwinner (for ATF)
https://github.com/apritzel/pine64 (for boot0img)

README.pine64 still states that there is no SPL available.

Does it make any sense to build a combined spl+u-boot as is done with
the armv7 sunxi targets without ATF?  Or will this not boot?

diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk
index 27b66d41b1..a323faf563 100644
--- a/arch/arm/cpu/armv8/config.mk
+++ b/arch/arm/cpu/armv8/config.mk
@@ -12,3 +12,12 @@ PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED)
 EFI_LDS := elf_aarch64_efi.lds
 EFI_CRT0 := crt0_aarch64_efi.o
 EFI_RELOC := reloc_aarch64_efi.o
+
+# Build a combined spl + u-boot image
+ifdef CONFIG_ARCH_SUNXI
+ifdef CONFIG_SPL
+ifndef CONFIG_SPL_BUILD
+ALL-y += u-boot-sunxi-with-spl.bin
+endif
+endif
+endif

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-05  4:06     ` Jonathan Gray
@ 2017-03-05 10:40       ` André Przywara
  0 siblings, 0 replies; 10+ messages in thread
From: André Przywara @ 2017-03-05 10:40 UTC (permalink / raw)
  To: u-boot

On 05/03/17 04:06, Jonathan Gray wrote:
> On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
>> Hi,
>>
>> On 03/03/17 09:22, Maxime Ripard wrote:
>>> On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
>>>>
>>>> 2017???3???1??? 23:51??? Maxime Ripard <maxime.ripard@free-electrons.com>?????????
>>>>>
>>>>> Hi Andre, 
>>>>>
>>>>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
>>>>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
>>>>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
>>>>>> This can now be easily achieved by using the just extended SPL FIT 
>>>>>> loading support, so enable it in the Pine64 defconfig. 
>>>>>> Also add the FIT image as a build target to 64-bit sunxi board to 
>>>>>> trigger the respective Makefile rules. 
>>>>>>
>>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
>>>>>> --- 
>>>>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
>>>>>>   include/configs/sunxi-common.h | 4 ++++ 
>>>>>>   2 files changed, 10 insertions(+) 
>>>>>>
>>>>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
>>>>>> index 7c7d86f..2b47157 100644 
>>>>>> --- a/configs/pine64_plus_defconfig 
>>>>>> +++ b/configs/pine64_plus_defconfig 
>>>>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
>>>>>>   CONFIG_ARCH_SUNXI=y 
>>>>>>   CONFIG_MACH_SUN50I=y 
>>>>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
>>>>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
>>>>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
>>>>>>   CONFIG_CONSOLE_MUX=y 
>>>>>>   CONFIG_SPL=y 
>>>>>> +CONFIG_FIT=y 
>>>>>> +CONFIG_SPL_FIT=y 
>>>>>> +CONFIG_SPL_LOAD_FIT=y 
>>>>>> +CONFIG_SPL_OF_LIBFDT=y 
>>>>>
>>>>> I'm not sure we want to force down that support to all our users. 
>>>>
>>>> A64 boards are now unusable without proper ATF.
>>>
>>> That's debatable, but that's not really what I meant. What I meant was
>>> that they're perfectly usable without FIT.
>>
>> But this is a defconfig for a certain, and the Pine64 is not really
>> usable without ATF at the moment in an upstream tree.
> 
> Could board/sunxi/README.pine64 be updated for the current state of
> things?

Ah, right, I forgot this, thanks for the heads up.

> Without FIT is it now possible with u-boot 2017.03 to use sunxi-spl.bin
> as a drop in replacement for Allwinner's boot0 and get a working
> combination of SPL/u-boot/ATF that can be redistributed when combining
> the parts with boot0img?

Yes, it boots - into U-Boot, but not yet into Linux. For this you need
ATF and thus this series.

> Using your repositories
> https://github.com/apritzel/arm-trusted-firmware/tree/allwinner (for ATF)

Yes.

> https://github.com/apritzel/pine64 (for boot0img)

This is now obsolete, at least with this series.

> README.pine64 still states that there is no SPL available.
> 
> Does it make any sense to build a combined spl+u-boot as is done with
> the armv7 sunxi targets without ATF?  Or will this not boot?

It will load and run U-Boot proper, but will crash once you try to load
Linux, because the ATF is missing.
But it would make sense to combine the SPL + u-boot.itb (which contains
the ATF) to one file. I just need to have a look what needs to be done
in the Makefile for this.

Cheers,
Andre.

> diff --git a/arch/arm/cpu/armv8/config.mk b/arch/arm/cpu/armv8/config.mk
> index 27b66d41b1..a323faf563 100644
> --- a/arch/arm/cpu/armv8/config.mk
> +++ b/arch/arm/cpu/armv8/config.mk
> @@ -12,3 +12,12 @@ PLATFORM_CPPFLAGS += $(PF_NO_UNALIGNED)
>  EFI_LDS := elf_aarch64_efi.lds
>  EFI_CRT0 := crt0_aarch64_efi.o
>  EFI_RELOC := reloc_aarch64_efi.o
> +
> +# Build a combined spl + u-boot image
> +ifdef CONFIG_ARCH_SUNXI
> +ifdef CONFIG_SPL
> +ifndef CONFIG_SPL_BUILD
> +ALL-y += u-boot-sunxi-with-spl.bin
> +endif
> +endif
> +endif
> 

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-03  9:55   ` Andre Przywara
  2017-03-05  4:06     ` Jonathan Gray
@ 2017-03-06 10:00     ` Maxime Ripard
  2017-03-06 15:11       ` Andre Przywara
  1 sibling, 1 reply; 10+ messages in thread
From: Maxime Ripard @ 2017-03-06 10:00 UTC (permalink / raw)
  To: u-boot

On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
> Hi,
> 
> On 03/03/17 09:22, Maxime Ripard wrote:
> > On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
> >>
> >> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
> >>>
> >>> Hi Andre, 
> >>>
> >>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> >>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> >>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
> >>>> This can now be easily achieved by using the just extended SPL FIT 
> >>>> loading support, so enable it in the Pine64 defconfig. 
> >>>> Also add the FIT image as a build target to 64-bit sunxi board to 
> >>>> trigger the respective Makefile rules. 
> >>>>
> >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> >>>> --- 
> >>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
> >>>>   include/configs/sunxi-common.h | 4 ++++ 
> >>>>   2 files changed, 10 insertions(+) 
> >>>>
> >>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> >>>> index 7c7d86f..2b47157 100644 
> >>>> --- a/configs/pine64_plus_defconfig 
> >>>> +++ b/configs/pine64_plus_defconfig 
> >>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> >>>>   CONFIG_ARCH_SUNXI=y 
> >>>>   CONFIG_MACH_SUN50I=y 
> >>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> >>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> >>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> >>>>   CONFIG_CONSOLE_MUX=y 
> >>>>   CONFIG_SPL=y 
> >>>> +CONFIG_FIT=y 
> >>>> +CONFIG_SPL_FIT=y 
> >>>> +CONFIG_SPL_LOAD_FIT=y 
> >>>> +CONFIG_SPL_OF_LIBFDT=y 
> >>>
> >>> I'm not sure we want to force down that support to all our users. 
> >>
> >> A64 boards are now unusable without proper ATF.
> > 
> > That's debatable, but that's not really what I meant. What I meant was
> > that they're perfectly usable without FIT.
> 
> But this is a defconfig for a certain, and the Pine64 is not really
> usable without ATF at the moment in an upstream tree.

Without ATF, yes, but there's no hard dependency between using ATF and
FIT. The documentation we have clearly states that, and we had no
dependency on FIT before, so there's no reason to *require* it now.

Even more so only for a few boards.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170306/6cc56c51/attachment.sig>

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-06 10:00     ` Maxime Ripard
@ 2017-03-06 15:11       ` Andre Przywara
  2017-03-06 15:48         ` Tom Rini
  0 siblings, 1 reply; 10+ messages in thread
From: Andre Przywara @ 2017-03-06 15:11 UTC (permalink / raw)
  To: u-boot

Hi,

On 06/03/17 10:00, Maxime Ripard wrote:
> On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
>> Hi,
>>
>> On 03/03/17 09:22, Maxime Ripard wrote:
>>> On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
>>>>
>>>> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
>>>>>
>>>>> Hi Andre, 
>>>>>
>>>>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
>>>>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
>>>>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
>>>>>> This can now be easily achieved by using the just extended SPL FIT 
>>>>>> loading support, so enable it in the Pine64 defconfig. 
>>>>>> Also add the FIT image as a build target to 64-bit sunxi board to 
>>>>>> trigger the respective Makefile rules. 
>>>>>>
>>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
>>>>>> --- 
>>>>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
>>>>>>   include/configs/sunxi-common.h | 4 ++++ 
>>>>>>   2 files changed, 10 insertions(+) 
>>>>>>
>>>>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
>>>>>> index 7c7d86f..2b47157 100644 
>>>>>> --- a/configs/pine64_plus_defconfig 
>>>>>> +++ b/configs/pine64_plus_defconfig 
>>>>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
>>>>>>   CONFIG_ARCH_SUNXI=y 
>>>>>>   CONFIG_MACH_SUN50I=y 
>>>>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
>>>>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
>>>>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
>>>>>>   CONFIG_CONSOLE_MUX=y 
>>>>>>   CONFIG_SPL=y 
>>>>>> +CONFIG_FIT=y 
>>>>>> +CONFIG_SPL_FIT=y 
>>>>>> +CONFIG_SPL_LOAD_FIT=y 
>>>>>> +CONFIG_SPL_OF_LIBFDT=y 
>>>>>
>>>>> I'm not sure we want to force down that support to all our users. 
>>>>
>>>> A64 boards are now unusable without proper ATF.
>>>
>>> That's debatable, but that's not really what I meant. What I meant was
>>> that they're perfectly usable without FIT.
>>
>> But this is a defconfig for a certain, and the Pine64 is not really
>> usable without ATF at the moment in an upstream tree.
> 
> Without ATF, yes, but there's no hard dependency between using ATF and
> FIT. The documentation we have clearly states that, and we had no
> dependency on FIT before, so there's no reason to *require* it now.

Sorry, but I still don't get it. Our current options to boot a Pine64
(and any other A64 board, really) are:
1) Use boot0img and a AW provided boot0.bin to build an image using just
the U-Boot proper (u-boot.bin).
2) Use the current SPL and U-Boot proper (in a legacy image file) to
boot into U-Boot, but missing out on the ATF and thus not being able to
run Linux.
3) Using a FIT image including DTs, U-Boot proper and the ATF to get the
full glory. This is what this series achieves just after a "make".

So definitely the ATF depends on the FIT support now, because I consider
the boot0img method just a (blob-involving) stopgap that is now
obsolete, and option 2) just being an intermediate step.
So yes: the documentation is outdated, because I forgot to update
README.pine64. Shall I send a 18/17 patch now to let people know what
they should do?

Am I missing something else here? Or is it indeed the misleading README
that causes confusion?

Cheers,
Andre.

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-06 15:11       ` Andre Przywara
@ 2017-03-06 15:48         ` Tom Rini
  2017-03-09 10:48           ` Maxime Ripard
  0 siblings, 1 reply; 10+ messages in thread
From: Tom Rini @ 2017-03-06 15:48 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 06, 2017 at 03:11:29PM +0000, Andre Przywara wrote:
> Hi,
> 
> On 06/03/17 10:00, Maxime Ripard wrote:
> > On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
> >> Hi,
> >>
> >> On 03/03/17 09:22, Maxime Ripard wrote:
> >>> On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
> >>>>
> >>>> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
> >>>>>
> >>>>> Hi Andre, 
> >>>>>
> >>>>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> >>>>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> >>>>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
> >>>>>> This can now be easily achieved by using the just extended SPL FIT 
> >>>>>> loading support, so enable it in the Pine64 defconfig. 
> >>>>>> Also add the FIT image as a build target to 64-bit sunxi board to 
> >>>>>> trigger the respective Makefile rules. 
> >>>>>>
> >>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> >>>>>> --- 
> >>>>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
> >>>>>>   include/configs/sunxi-common.h | 4 ++++ 
> >>>>>>   2 files changed, 10 insertions(+) 
> >>>>>>
> >>>>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> >>>>>> index 7c7d86f..2b47157 100644 
> >>>>>> --- a/configs/pine64_plus_defconfig 
> >>>>>> +++ b/configs/pine64_plus_defconfig 
> >>>>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> >>>>>>   CONFIG_ARCH_SUNXI=y 
> >>>>>>   CONFIG_MACH_SUN50I=y 
> >>>>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> >>>>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> >>>>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> >>>>>>   CONFIG_CONSOLE_MUX=y 
> >>>>>>   CONFIG_SPL=y 
> >>>>>> +CONFIG_FIT=y 
> >>>>>> +CONFIG_SPL_FIT=y 
> >>>>>> +CONFIG_SPL_LOAD_FIT=y 
> >>>>>> +CONFIG_SPL_OF_LIBFDT=y 
> >>>>>
> >>>>> I'm not sure we want to force down that support to all our users. 
> >>>>
> >>>> A64 boards are now unusable without proper ATF.
> >>>
> >>> That's debatable, but that's not really what I meant. What I meant was
> >>> that they're perfectly usable without FIT.
> >>
> >> But this is a defconfig for a certain, and the Pine64 is not really
> >> usable without ATF at the moment in an upstream tree.
> > 
> > Without ATF, yes, but there's no hard dependency between using ATF and
> > FIT. The documentation we have clearly states that, and we had no
> > dependency on FIT before, so there's no reason to *require* it now.
> 
> Sorry, but I still don't get it. Our current options to boot a Pine64
> (and any other A64 board, really) are:
> 1) Use boot0img and a AW provided boot0.bin to build an image using just
> the U-Boot proper (u-boot.bin).
> 2) Use the current SPL and U-Boot proper (in a legacy image file) to
> boot into U-Boot, but missing out on the ATF and thus not being able to
> run Linux.
> 3) Using a FIT image including DTs, U-Boot proper and the ATF to get the
> full glory. This is what this series achieves just after a "make".
> 
> So definitely the ATF depends on the FIT support now, because I consider
> the boot0img method just a (blob-involving) stopgap that is now
> obsolete, and option 2) just being an intermediate step.
> So yes: the documentation is outdated, because I forgot to update
> README.pine64. Shall I send a 18/17 patch now to let people know what
> they should do?
> 
> Am I missing something else here? Or is it indeed the misleading README
> that causes confusion?

I assume, but am not exactly in favor of option 4:
4) dd/objcopy together the various parts of the system (ATF, SPL,
U-Boot) into a binary file that can be written in-place instead.

I fear we're once again starting to verge into the territory where a FIT
image would make a rather nice solution to a given problem (how do we
put N distinct things together in a file for ease of use/etc) but people
see FIT as a "U-Boot thing" and don't want to be tied to that rather
than seeing FIT as just an image format anyone can use.  I'm not sure
what would prevent any other project from dealing with FIT images...

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170306/86b0a5e3/attachment.sig>

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
  2017-03-06 15:48         ` Tom Rini
@ 2017-03-09 10:48           ` Maxime Ripard
  0 siblings, 0 replies; 10+ messages in thread
From: Maxime Ripard @ 2017-03-09 10:48 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 06, 2017 at 10:48:15AM -0500, Tom Rini wrote:
> On Mon, Mar 06, 2017 at 03:11:29PM +0000, Andre Przywara wrote:
> > Hi,
> > 
> > On 06/03/17 10:00, Maxime Ripard wrote:
> > > On Fri, Mar 03, 2017 at 09:55:25AM +0000, Andre Przywara wrote:
> > >> Hi,
> > >>
> > >> On 03/03/17 09:22, Maxime Ripard wrote:
> > >>> On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote:
> > >>>>
> > >>>> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道:
> > >>>>>
> > >>>>> Hi Andre, 
> > >>>>>
> > >>>>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> > >>>>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> > >>>>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
> > >>>>>> This can now be easily achieved by using the just extended SPL FIT 
> > >>>>>> loading support, so enable it in the Pine64 defconfig. 
> > >>>>>> Also add the FIT image as a build target to 64-bit sunxi board to 
> > >>>>>> trigger the respective Makefile rules. 
> > >>>>>>
> > >>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> > >>>>>> --- 
> > >>>>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
> > >>>>>>   include/configs/sunxi-common.h | 4 ++++ 
> > >>>>>>   2 files changed, 10 insertions(+) 
> > >>>>>>
> > >>>>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> > >>>>>> index 7c7d86f..2b47157 100644 
> > >>>>>> --- a/configs/pine64_plus_defconfig 
> > >>>>>> +++ b/configs/pine64_plus_defconfig 
> > >>>>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> > >>>>>>   CONFIG_ARCH_SUNXI=y 
> > >>>>>>   CONFIG_MACH_SUN50I=y 
> > >>>>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> > >>>>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> > >>>>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> > >>>>>>   CONFIG_CONSOLE_MUX=y 
> > >>>>>>   CONFIG_SPL=y 
> > >>>>>> +CONFIG_FIT=y 
> > >>>>>> +CONFIG_SPL_FIT=y 
> > >>>>>> +CONFIG_SPL_LOAD_FIT=y 
> > >>>>>> +CONFIG_SPL_OF_LIBFDT=y 
> > >>>>>
> > >>>>> I'm not sure we want to force down that support to all our users. 
> > >>>>
> > >>>> A64 boards are now unusable without proper ATF.
> > >>>
> > >>> That's debatable, but that's not really what I meant. What I meant was
> > >>> that they're perfectly usable without FIT.
> > >>
> > >> But this is a defconfig for a certain, and the Pine64 is not really
> > >> usable without ATF at the moment in an upstream tree.
> > > 
> > > Without ATF, yes, but there's no hard dependency between using ATF and
> > > FIT. The documentation we have clearly states that, and we had no
> > > dependency on FIT before, so there's no reason to *require* it now.
> > 
> > Sorry, but I still don't get it. Our current options to boot a Pine64
> > (and any other A64 board, really) are:
> > 1) Use boot0img and a AW provided boot0.bin to build an image using just
> > the U-Boot proper (u-boot.bin).
> > 2) Use the current SPL and U-Boot proper (in a legacy image file) to
> > boot into U-Boot, but missing out on the ATF and thus not being able to
> > run Linux.
> > 3) Using a FIT image including DTs, U-Boot proper and the ATF to get the
> > full glory. This is what this series achieves just after a "make".
> > 
> > So definitely the ATF depends on the FIT support now, because I consider
> > the boot0img method just a (blob-involving) stopgap that is now
> > obsolete, and option 2) just being an intermediate step.
> > So yes: the documentation is outdated, because I forgot to update
> > README.pine64. Shall I send a 18/17 patch now to let people know what
> > they should do?
> > 
> > Am I missing something else here? Or is it indeed the misleading README
> > that causes confusion?
> 
> I assume, but am not exactly in favor of option 4:
> 4) dd/objcopy together the various parts of the system (ATF, SPL,
> U-Boot) into a binary file that can be written in-place instead.

Yes, and this is definitely something that can be done easily, using
all the common flashing methods already out there.

> I fear we're once again starting to verge into the territory where a FIT
> image would make a rather nice solution to a given problem (how do we
> put N distinct things together in a file for ease of use/etc) but people
> see FIT as a "U-Boot thing" and don't want to be tied to that rather
> than seeing FIT as just an image format anyone can use.  I'm not sure
> what would prevent any other project from dealing with FIT images...

I guess there's a difference between allowing its usage and making it
mandatory.

Anyway, if both of you agree on this, let's enable FIT. But the doc
definitely needs to be updated, and this should be enabled by default
in Kconfig, not duplicated across all the defconfigs.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170309/30395c65/attachment.sig>

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

* [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support
@ 2017-03-03 10:24 Icenowy Zheng
  0 siblings, 0 replies; 10+ messages in thread
From: Icenowy Zheng @ 2017-03-03 10:24 UTC (permalink / raw)
  To: u-boot


2017年3月3日 17:55于 Andre Przywara <andre.przywara@arm.com>写道:
>
> Hi, 
>
> On 03/03/17 09:22, Maxime Ripard wrote: 
> > On Thu, Mar 02, 2017 at 12:03:20AM +0800, Icenowy Zheng wrote: 
> >> 
> >> 2017年3月1日 23:51于 Maxime Ripard <maxime.ripard@free-electrons.com>写道: 
> >>> 
> >>> Hi Andre, 
> >>> 
> >>> On Wed, Mar 01, 2017 at 02:25:26AM +0000, Andre Przywara wrote: 
> >>>> The Pine64 (and all other 64-bit Allwinner boards) need to load an 
> >>>> ARM Trusted Firmware image beside the actual U-Boot proper. 
> >>>> This can now be easily achieved by using the just extended SPL FIT 
> >>>> loading support, so enable it in the Pine64 defconfig. 
> >>>> Also add the FIT image as a build target to 64-bit sunxi board to 
> >>>> trigger the respective Makefile rules. 
> >>>> 
> >>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com> 
> >>>> --- 
> >>>>   configs/pine64_plus_defconfig  | 6 ++++++ 
> >>>>   include/configs/sunxi-common.h | 4 ++++ 
> >>>>   2 files changed, 10 insertions(+) 
> >>>> 
> >>>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig 
> >>>> index 7c7d86f..2b47157 100644 
> >>>> --- a/configs/pine64_plus_defconfig 
> >>>> +++ b/configs/pine64_plus_defconfig 
> >>>> @@ -3,9 +3,14 @@ CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y 
> >>>>   CONFIG_ARCH_SUNXI=y 
> >>>>   CONFIG_MACH_SUN50I=y 
> >>>>   CONFIG_DEFAULT_DEVICE_TREE="sun50i-a64-pine64-plus" 
> >>>> +CONFIG_OF_LIST="sun50i-a64-pine64 sun50i-a64-pine64-plus" 
> >>>>   # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set 
> >>>>   CONFIG_CONSOLE_MUX=y 
> >>>>   CONFIG_SPL=y 
> >>>> +CONFIG_FIT=y 
> >>>> +CONFIG_SPL_FIT=y 
> >>>> +CONFIG_SPL_LOAD_FIT=y 
> >>>> +CONFIG_SPL_OF_LIBFDT=y 
> >>> 
> >>> I'm not sure we want to force down that support to all our users. 
> >> 
> >> A64 boards are now unusable without proper ATF. 
> > 
> > That's debatable, but that's not really what I meant. What I meant was 
> > that they're perfectly usable without FIT. 
>
> But this is a defconfig for a certain, and the Pine64 is not really 
> usable without ATF at the moment in an upstream tree. 
>
> Do you want a CONFIG_LOAD_ATF wrapper option, that would make it easier 
> to select / deselect? 

I will try to adapt ARMv8 PSCI on A64.

(But I don't know ARM assembly well... both 32 and 64)

>
> Cheers, 
> Andre. 
>
> -- 
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group. 
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com. 
> For more options, visit https://groups.google.com/d/optout. 

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

end of thread, other threads:[~2017-03-09 10:48 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 16:03 [U-Boot] [linux-sunxi] Re: [PATCH 14/17] sunxi: Pine64: defconfig: enable SPL FIT support Icenowy Zheng
2017-03-03  9:22 ` Maxime Ripard
2017-03-03  9:55   ` Andre Przywara
2017-03-05  4:06     ` Jonathan Gray
2017-03-05 10:40       ` André Przywara
2017-03-06 10:00     ` Maxime Ripard
2017-03-06 15:11       ` Andre Przywara
2017-03-06 15:48         ` Tom Rini
2017-03-09 10:48           ` Maxime Ripard
2017-03-03 10:24 Icenowy Zheng

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.