diff mbox

[U-Boot,v2,10/23] sunxi: introduce extra config option for boot0 header

Message ID 1480902750-839-11-git-send-email-andre.przywara@arm.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Andre Przywara Dec. 5, 2016, 1:52 a.m. UTC
The ENABLE_ARM_SOC_BOOT0_HOOK option is a generic option shared with
other boards. To allow alternative code to be inserted, we create
another, now function specific config symbol on top of it to simplify
later additions. No functional change at this time.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 board/sunxi/Kconfig           | 9 +++++++++
 configs/pine64_plus_defconfig | 2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Simon Glass Dec. 5, 2016, 6:25 a.m. UTC | #1
On 4 December 2016 at 18:52, Andre Przywara <andre.przywara@arm.com> wrote:
> The ENABLE_ARM_SOC_BOOT0_HOOK option is a generic option shared with
> other boards. To allow alternative code to be inserted, we create
> another, now function specific config symbol on top of it to simplify
> later additions. No functional change at this time.
>
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  board/sunxi/Kconfig           | 9 +++++++++
>  configs/pine64_plus_defconfig | 2 +-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>

Reviewed-by: Simon Glass <sjg@chromium.org>

> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
> index e1d4ab1..0cd57a2 100644
> --- a/board/sunxi/Kconfig
> +++ b/board/sunxi/Kconfig
> @@ -133,6 +133,15 @@ config MACH_SUN8I
>         bool
>         default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_H3 || MACH_SUN8I_A83T
>
> +config RESERVE_ALLWINNER_BOOT0_HEADER

Would RESERVE_SUNXI_BOOT0_HEADER be better?

> +       bool "reserve space for Allwinner boot0 header"
> +       select ENABLE_ARM_SOC_BOOT0_HOOK
> +       ---help---
> +       Prepend a 1536 byte (empty) header to the U-Boot image file, to be
> +       filled with magic values post build. The Allwinner provided boot0
> +       blob relies on this information to load and execute U-Boot.
> +       Only needed on 64-bit Allwinner boards so far when using boot0.
> +
>  config DRAM_TYPE
>         int "sunxi dram type"
>         depends on MACH_SUN8I_A83T
> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
> index 6d0198f..ea53b96 100644
> --- a/configs/pine64_plus_defconfig
> +++ b/configs/pine64_plus_defconfig
> @@ -1,5 +1,5 @@
>  CONFIG_ARM=y
> -CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
> +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
>  CONFIG_ARCH_SUNXI=y
>  CONFIG_MACH_SUN50I=y
>  CONFIG_DRAM_CLK=672
> --
> 2.8.2
>
Andre Przywara Dec. 5, 2016, 3:49 p.m. UTC | #2
Hi,

On 05/12/16 06:25, Simon Glass wrote:
> On 4 December 2016 at 18:52, Andre Przywara <andre.przywara@arm.com> wrote:
>> The ENABLE_ARM_SOC_BOOT0_HOOK option is a generic option shared with
>> other boards. To allow alternative code to be inserted, we create
>> another, now function specific config symbol on top of it to simplify
>> later additions. No functional change at this time.
>>
>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>> ---
>>  board/sunxi/Kconfig           | 9 +++++++++
>>  configs/pine64_plus_defconfig | 2 +-
>>  2 files changed, 10 insertions(+), 1 deletion(-)
>>
> 
> Reviewed-by: Simon Glass <sjg@chromium.org>
> 
>> diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
>> index e1d4ab1..0cd57a2 100644
>> --- a/board/sunxi/Kconfig
>> +++ b/board/sunxi/Kconfig
>> @@ -133,6 +133,15 @@ config MACH_SUN8I
>>         bool
>>         default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_H3 || MACH_SUN8I_A83T
>>
>> +config RESERVE_ALLWINNER_BOOT0_HEADER
> 
> Would RESERVE_SUNXI_BOOT0_HEADER be better?

Well, although originally an Allwinner invention, the "sunxi" term is
mostly used to denote community driven work for Allwinner SoCs.
This particular symbol here is for using "boot0", which is an Allwinner
provided binary blob and which we actually want to get rid of (hence
this series).
So to stress that this is really an "Allwinner Tech Ltd." dependent
option I chose the verbatim Allwinner string here.

Eventually I plan to kill this option once we convinced ourselves that
using our SPL is stable and provides the same feature set as boot0, so
we don't need to worry too much about this naming, I guess.

Cheers,
Andre.

>> +       bool "reserve space for Allwinner boot0 header"
>> +       select ENABLE_ARM_SOC_BOOT0_HOOK
>> +       ---help---
>> +       Prepend a 1536 byte (empty) header to the U-Boot image file, to be
>> +       filled with magic values post build. The Allwinner provided boot0
>> +       blob relies on this information to load and execute U-Boot.
>> +       Only needed on 64-bit Allwinner boards so far when using boot0.
>> +
>>  config DRAM_TYPE
>>         int "sunxi dram type"
>>         depends on MACH_SUN8I_A83T
>> diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
>> index 6d0198f..ea53b96 100644
>> --- a/configs/pine64_plus_defconfig
>> +++ b/configs/pine64_plus_defconfig
>> @@ -1,5 +1,5 @@
>>  CONFIG_ARM=y
>> -CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
>> +CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
>>  CONFIG_ARCH_SUNXI=y
>>  CONFIG_MACH_SUN50I=y
>>  CONFIG_DRAM_CLK=672
>> --
>> 2.8.2
>>
Maxime Ripard Dec. 6, 2016, 10:52 a.m. UTC | #3
On Mon, Dec 05, 2016 at 01:52:17AM +0000, Andre Przywara wrote:
> The ENABLE_ARM_SOC_BOOT0_HOOK option is a generic option shared with
> other boards. To allow alternative code to be inserted, we create
> another, now function specific config symbol on top of it to simplify
> later additions. No functional change at this time.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks,
Maxime
diff mbox

Patch

diff --git a/board/sunxi/Kconfig b/board/sunxi/Kconfig
index e1d4ab1..0cd57a2 100644
--- a/board/sunxi/Kconfig
+++ b/board/sunxi/Kconfig
@@ -133,6 +133,15 @@  config MACH_SUN8I
 	bool
 	default y if MACH_SUN8I_A23 || MACH_SUN8I_A33 || MACH_SUN8I_H3 || MACH_SUN8I_A83T
 
+config RESERVE_ALLWINNER_BOOT0_HEADER
+	bool "reserve space for Allwinner boot0 header"
+	select ENABLE_ARM_SOC_BOOT0_HOOK
+	---help---
+	Prepend a 1536 byte (empty) header to the U-Boot image file, to be
+	filled with magic values post build. The Allwinner provided boot0
+	blob relies on this information to load and execute U-Boot.
+	Only needed on 64-bit Allwinner boards so far when using boot0.
+
 config DRAM_TYPE
 	int "sunxi dram type"
 	depends on MACH_SUN8I_A83T
diff --git a/configs/pine64_plus_defconfig b/configs/pine64_plus_defconfig
index 6d0198f..ea53b96 100644
--- a/configs/pine64_plus_defconfig
+++ b/configs/pine64_plus_defconfig
@@ -1,5 +1,5 @@ 
 CONFIG_ARM=y
-CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK=y
+CONFIG_RESERVE_ALLWINNER_BOOT0_HEADER=y
 CONFIG_ARCH_SUNXI=y
 CONFIG_MACH_SUN50I=y
 CONFIG_DRAM_CLK=672