From 9f52cc8c0a7d285a4c6e34c5daa40719d3266e5b Mon Sep 17 00:00:00 2001 From: Neal Frager Date: Sat, 25 Jan 2025 22:49:26 +0000 Subject: [PATCH] boot/uboot: add qspi.bin file support u-boot has introduced a new file called qspi.bin for users who boot from a qspi flash device. It combines the spl/boot.bin and u-boot.itb files into a single binary that can be written to the qspi flash. Here is an example of how binman generates the qspi.bin: https://source.denx.de/u-boot/u-boot/-/commit/a4c98119109a60b9b236996f47065aa8fc0de9ca At the moment, the qspi.bin is only used for the zynqmp platform, but other platforms may adopt it, so the buildroot support has been made in a generic way. This patch adds the necessary support for buildroot to install this binary. [Tested on Kria KV260 starter kit] Tested-by: Luca Ceresoli Reviewed-by: Luca Ceresoli Signed-off-by: Neal Frager Signed-off-by: Peter Korsgaard --- boot/uboot/Config.in | 8 ++++++++ boot/uboot/uboot.mk | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index 13d45140eb..f17f932c9e 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -470,6 +470,14 @@ config BR2_TARGET_UBOOT_FORMAT_SD See doc/README.mxs (or doc/README.mx28_common before 2013.07) +config BR2_TARGET_UBOOT_FORMAT_QSPI_BIN + bool "qspi.bin" + depends on BR2_TARGET_UBOOT_ZYNQMP + help + When booting from qspi flash, u-boot can generate a single + file for flashing by combining the spl/boot.bin and + u-boot.itb files into a unified binary. + config BR2_TARGET_UBOOT_FORMAT_STM32 bool "u-boot.stm32" depends on BR2_arm diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index efecf2ca47..2796b0a310 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -108,6 +108,10 @@ UBOOT_MAKE_TARGET += u-boot.itb endif endif +ifeq ($(BR2_TARGET_UBOOT_FORMAT_QSPI_BIN),y) +UBOOT_BINS += qspi.bin +endif + ifeq ($(BR2_TARGET_UBOOT_FORMAT_IMX),y) UBOOT_BINS += u-boot.imx UBOOT_MAKE_TARGET += u-boot.imx