diff mbox

[U-Boot,14/17] sunxi: Pine64: defconfig: enable SPL FIT support

Message ID 1488335129-12363-15-git-send-email-andre.przywara@arm.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Andre Przywara March 1, 2017, 2:25 a.m. UTC
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(+)

Comments

Maxime Ripard March 1, 2017, 3:51 p.m. UTC | #1
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.

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
diff mbox

Patch

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
 # 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"
diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 37c4a4d..06d03d4 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -39,6 +39,10 @@ 
 #define CONFIG_SYS_THUMB_BUILD	/* Thumbs mode to save space in SPL */
 #endif
 
+#ifdef CONFIG_ARM64
+#define CONFIG_BUILD_TARGET "u-boot.itb"
+#endif
+
 /* Serial & console */
 #define CONFIG_SYS_NS16550_SERIAL
 /* ns16550 reg in the low bits of cpu reg */