From: Eugen.Hristev at microchip.com Date: Wed, 3 Apr 2019 11:08:12 +0000 Subject: [U-Boot] [PATCH 10/13 v3] Makefile: Add Kconfig option CONFIG_SPL_IMAGE to select the SPL binary In-Reply-To: <20190402085727.14552-10-sr@denx.de> References: <20190402085727.14552-1-sr@denx.de> <20190402085727.14552-10-sr@denx.de> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de On 02.04.2019 11:57, Stefan Roese wrote: >=20 > 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". >=20 > 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). >=20 > Signed-off-by: Stefan Roese > Cc: Heiko Schocher > Cc: Andreas Bie=C3=9Fmann > Cc: Eugen Hristev > Reviewed-by: Heiko Schocher > Tested on the taurus board: > Tested-by: Heiko Schocher > --- > v3: > - No change >=20 > v2: > - No change >=20 > Kconfig | 10 ++++++++++ > Makefile | 4 +++- > 2 files changed, 13 insertions(+), 1 deletion(-) >=20 > diff --git a/Kconfig b/Kconfig > index 305b265ed7..7c2b86f1f3 100644 > --- a/Kconfig > +++ b/Kconfig > @@ -224,6 +224,15 @@ config BUILD_ROM > which are not shipped in the U-Boot source tree. > Please, see doc/README.x86 for details. > =20 > +config SPL_IMAGE > + string "SPL image filename that is generated" > + default "spl/boot.bin" if ARCH_AT91 && SPL_NAND_SUPPORT > + default "spl/u-boot-spl.bin" > + help > + The SPL image filename that is generated by the build process. > + This image might be used to generated a combined image with > + SPL and main U-Boot proper as well. > + Hi Stefan, If I try to just use menuconfig and change this value to something else,=20 build fails. The purpose of this Kconfig is to name the SPL filename as=20 per the config's desire ? Or in fact is "which binary file to use to make the Combined SPL+U-BOOT=20 mega image" ? Eugen > config BUILD_TARGET > string "Build target special images" > default "u-boot-with-spl.sfp" if TARGET_SOCFPGA_ARRIA10 > @@ -232,6 +241,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 c1af9307b3..077bb6634e 100644 > --- a/Makefile > +++ b/Makefile > @@ -1225,9 +1225,11 @@ else > SPL_PAYLOAD :=3D u-boot.bin > endif > =20 > +SPL_IMAGE :=3D $(CONFIG_SPL_IMAGE:"%"=3D%) > + > OBJCOPYFLAGS_u-boot-with-spl.bin =3D -I binary -O binary \ > --pad-to=3D$(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) > =20 > ifeq ($(CONFIG_ARCH_LPC32XX)$(CONFIG_SPL),yy) >=20