summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2019-04-03 15:24:50 +0200
committerEugen Hristev <eugen.hristev@microchip.com>2019-04-09 09:28:50 +0300
commit9ea6f718ebf53ddb8264d3dd13b54a7988cc5259 (patch)
treeedad015dbd27a8c653ea3d346939415fb0d0ae05
parent581e711ad1216fa791bf20a3598c601af77a77b1 (diff)
Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary
This patch adds the CONFIG_SPL_IMAGE option to select the SPL image that shall be used to generate the combined SPL + U-Boot image. The default value is the current value "spl/u-boot-spl.bin". This patch also sets CONFIG_SPL_IMAGE to "spl/boot.bin" for AT91 targets which use SPL NAND support (boot from NAND). For these build targets the combined image "u-boot-with-spl.bin" is now automatically generated and can be programmed into NAND as one single image (vs. SPL image and U-Boot as 2 separate images). Signed-off-by: Stefan Roese <sr@denx.de> Cc: Heiko Schocher <hs@denx.de> Cc: Andreas Bießmann <andreas@biessmann.org> Cc: Eugen Hristev <eugen.hristev@microchip.com>
-rw-r--r--Kconfig11
-rw-r--r--Makefile4
2 files changed, 14 insertions, 1 deletions
diff --git a/Kconfig b/Kconfig
index 305b265ed71..7a5491bd677 100644
--- a/Kconfig
+++ b/Kconfig
@@ -224,6 +224,16 @@ config BUILD_ROM
which are not shipped in the U-Boot source tree.
Please, see doc/README.x86 for details.
+config SPL_IMAGE
+ string "SPL image used in the combined SPL+U-Boot image"
+ default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
+ default "spl/u-boot-spl.bin"
+ help
+ Select the SPL build target that shall be generated by the SPL
+ build process (default spl/u-boot-spl.bin). This image will be
+ used to generate a combined image with SPL and main U-Boot
+ proper as one single image.
+
config BUILD_TARGET
string "Build target special images"
default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10
@@ -232,6 +242,7 @@ config BUILD_TARGET
default "u-boot-elf.srec" if RCAR_GEN3
default "u-boot.itb" if SPL_LOAD_FIT && ARCH_SUNXI
default "u-boot.kwb" if KIRKWOOD
+ default "u-boot-with-spl.bin" if ARCH_AT91 && SPL_NAND_SUPPORT
help
Some SoCs need special image types (e.g. U-Boot binary
with a special header) as build targets. By defining
diff --git a/Makefile b/Makefile
index aedc2ea4d93..8f59c127649 100644
--- a/Makefile
+++ b/Makefile
@@ -1232,9 +1232,11 @@ else
SPL_PAYLOAD := u-boot.bin
endif
+SPL_IMAGE := $(CONFIG_SPL_IMAGE:"%"=%)
+
OBJCOPYFLAGS_u-boot-with-spl.bin = -I binary -O binary \
--pad-to=$(CONFIG_SPL_PAD_TO)
-u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) FORCE
+u-boot-with-spl.bin: $(SPL_IMAGE) $(SPL_PAYLOAD) FORCE
$(call if_changed,pad_cat)
ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy)