diff mbox

[U-Boot,2/3] arm, Makefile: Concatenation of u-boot-spl.bin and u-boot.img

Message ID 1493284272-9588-1-git-send-email-Ashish.Kumar@nxp.com
State Superseded
Delegated to: York Sun
Headers show

Commit Message

Ashish Kumar April 27, 2017, 9:11 a.m. UTC
Concatenation of u-boot-spl.bin and u-boot.img for NXP layerscape
platform SoC: LS1088A/LS2080A and their variants

New Kconfig option added SPL_USE_HEADER for the same

Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
---
 Makefile                                  | 14 +++++++++++++-
 arch/arm/cpu/armv8/fsl-layerscape/Kconfig |  7 +++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

Comments

York Sun April 27, 2017, 3:54 p.m. UTC | #1
On 04/27/2017 02:13 AM, Ashish Kumar wrote:
> Concatenation of u-boot-spl.bin and u-boot.img for NXP layerscape
> platform SoC: LS1088A/LS2080A and their variants
>
> New Kconfig option added SPL_USE_HEADER for the same
>
> Signed-off-by: Ashish Kumar <Ashish.Kumar@nxp.com>
> ---
>  Makefile                                  | 14 +++++++++++++-
>  arch/arm/cpu/armv8/fsl-layerscape/Kconfig |  7 +++++++
>  2 files changed, 20 insertions(+), 1 deletion(-)

Ashish,

Please do NOT post on both internal and upstream mailing lists in the 
same thread. Any reply from outside will cause issue.

York
York Sun April 27, 2017, 3:58 p.m. UTC | #2
On 04/27/2017 02:13 AM, Ashish Kumar wrote:
> Concatenation of u-boot-spl.bin and u-boot.img for NXP layerscape
> platform SoC: LS1088A/LS2080A and their variants
>
> New Kconfig option added SPL_USE_HEADER for the same

I think the logic should be reversed. By default, let's use the image 
with header. For exceptions, use raw image.

York
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 323d646..73b1854 100644
--- a/Makefile
+++ b/Makefile
@@ -989,8 +989,20 @@  u-boot.dis:	u-boot
 ifdef CONFIG_TPL
 SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
 else
+ifdef CONFIG_OF_CONTROL
+ifeq ($(CONFIG_SPL_USE_HEADER),y)
+SPL_PAYLOAD := u-boot-dtb.img
+else
+SPL_PAYLOAD := u-boot-dtb.bin
+endif   #ifeq ($(CONFIG_SPL_USE_HEADER),y)
+else
+ifeq ($(CONFIG_SPL_USE_HEADER),y)
+SPL_PAYLOAD := u-boot.img
+else
 SPL_PAYLOAD := u-boot.bin
-endif
+endif   #ifeq ($(CONFIG_SPL_USE_HEADER),y)
+endif	#ifdef CONFIG_OF_CONTROL
+endif	#ifdef CONFIG_TPL
 
 OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
 				   --pad-to=$(CONFIG_SPL_PAD_TO)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
index d539c95..2b3e612 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
+++ b/arch/arm/cpu/armv8/fsl-layerscape/Kconfig
@@ -54,6 +54,7 @@  config ARCH_LS1088A
 	bool
 	select ARMV8_SET_SMPEN
 	select FSL_LSCH3
+	select SPL_USE_HEADER
 	select SYS_FSL_DDR
 	select SYS_FSL_DDR_LE
 	select SYS_FSL_DDR_VER_50
@@ -405,6 +406,12 @@  config SYS_FSL_ERRATUM_A009660
 config SYS_FSL_ERRATUM_A009929
 	bool
 
+config SPL_USE_HEADER
+	bool
+	depends on ARCH_LS1088A || ARCH_LS2080A
+	default y if ARCH_LS1088A
+	default y if ARCH_LS2080A
+
 config SYS_MC_RSV_MEM_ALIGN
 	hex "Management Complex reserved memory alignment"
 	depends on RESV_RAM