u-boot: upgrade 2025.04 -> 2025.07
PATCH v4 1/1 u-boot: upgrade 2025.04 -> 2025.07
Upgrade to U-Boot 2025.07.
Add patches for build race conditions.
Remove the QEMU KVM USB workaround since the issue is fixed upstream.
Signed-off-by Fabio Estevam <[email protected]>
Signed-off-by Mikko Rapeli <[email protected]>
---
Changes since v3:
- Cherry-pick QEMU KVM USB fixes from upstream.
...1-nxp-Prepare-macros-for-KVM-changes.patch | 100 ++++++
...02-arm-io.h-Fix-io-accessors-for-KVM.patch | 310 ++++++++++++++++++
...rm-Enable-virtualizable-IO-accessors.patch | 41 +++
.../u-boot/files/disable_CONFIG_USB.cfg | 1 -
...pts-Makefile.lib-fix-_efi.so-depende.patch | 136 ++++++++
...kefile-change-apps-from-always-to-ta.patch | 57 ++++
meta/recipes-bsp/u-boot/u-boot-common.inc | 13 +-
...ols_2025.04.bb => u-boot-tools_2025.07.bb} | 0
.../{u-boot_2025.04.bb => u-boot_2025.07.bb} | 4 +-
9 files changed, 656 insertions(+), 6 deletions(-)
create mode 100644 meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch
create mode 100644 meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch
create mode 100644 meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch
delete mode 100644 meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg
create mode 100644 meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch
create mode 100644 meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch
rename meta/recipes-bsp/u-boot/{u-boot-tools_2025.04.bb => u-boot-tools_2025.07.bb} (100%)
rename meta/recipes-bsp/u-boot/{u-boot_2025.04.bb => u-boot_2025.07.bb} (64%)meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch new file +100 -0
@@ -0,0 +1,100 @@ +From 9be804cbfde1df715d79247b27de4b388c714cde Mon Sep 17 00:00:00 2001 +From: Ilias Apalodimas <[email protected]> +Date: Wed, 18 Jun 2025 09:58:12 +0300 +Subject: [PATCH 1/3] nxp: Prepare macros for KVM changes + +A following patch is replacing our IO accessors with +do { ... } while(0) ones in order to make them usable with KVM. + +That leads to an error eventually looking like this: +arch/arm/include/asm/io.h:62:9: error: expected expression before 'do' + 62 | do { \ + | ^~ +arch/arm/include/asm/io.h:211:41: note: in expansion of macro '__raw_writel' + 211 | #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a) + | ^~~~~~~~~~~ +arch/arm/include/asm/io.h:223:25: note: in expansion of macro 'out_arch' + 223 | #define out_be32(a,v) out_arch(l,be32,a,v) + | ^~~~~~~~ +drivers/spi/fsl_dspi.c:127:17: note: in expansion of macro 'out_be32' + 127 | out_be32(addr, val) : out_le32(addr, val); + | ^~~~~~~~ + +So adjust the current macros and code to be compatible with the upcoming +change. + +Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/b56c0632ad62] +Signed-off-by: Ilias Apalodimas <[email protected]> +Reviewed-by: Tom Rini <[email protected]> +Signed-off-by: Fabio Estevam <[email protected]> +--- + drivers/spi/fsl_dspi.c | 6 ++++-- + include/fsl_ifc.h | 24 ++++++++++++------------ + 2 files changed, 16 insertions(+), 14 deletions(-) + +diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c +index f2393c041f44..545561ad1169 100644 +--- a/drivers/spi/fsl_dspi.c ++++ b/drivers/spi/fsl_dspi.c +@@ -123,8 +123,10 @@ static uint dspi_read32(uint flags, uint *addr) + + static void dspi_write32(uint flags, uint *addr, uint val) + { +- flags & DSPI_FLAG_REGMAP_ENDIAN_BIG ? +- out_be32(addr, val) : out_le32(addr, val); ++ if (flags & DSPI_FLAG_REGMAP_ENDIAN_BIG) ++ out_be32(addr, val); ++ else ++ out_le32(addr, val); + } + + static void dspi_halt(struct fsl_dspi_priv *priv, u8 halt) +diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h +index 3ac226879303..1c363115beb2 100644 +--- a/include/fsl_ifc.h ++++ b/include/fsl_ifc.h +@@ -803,29 +803,29 @@ void init_final_memctl_regs(void); + ((struct fsl_ifc_fcm *)CFG_SYS_IFC_ADDR) + + #define get_ifc_cspr_ext(i) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext)) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext) + #define get_ifc_cspr(i) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr)) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr) + #define get_ifc_csor_ext(i) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext)) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext) + #define get_ifc_csor(i) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor)) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor) + #define get_ifc_amask(i) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask)) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask) + #define get_ifc_ftim(i, j) \ +- (ifc_in32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j])) ++ ifc_in32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j]) + #define set_ifc_cspr_ext(i, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext, v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext, v) + #define set_ifc_cspr(i, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr, v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr, v) + #define set_ifc_csor_ext(i, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext, v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext, v) + #define set_ifc_csor(i, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor, v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor, v) + #define set_ifc_amask(i, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask, v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask, v) + #define set_ifc_ftim(i, j, v) \ +- (ifc_out32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j], v)) ++ ifc_out32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j], v) + + enum ifc_chip_sel { + IFC_CS0, +-- +2.34.1 +
meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch new file +310 -0
310 lines not on this page · raw message
meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch new file +41 -0
41 lines not on this page · raw message
meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg deleted +0 -1
@@ -1 +0,0 @@ -# CONFIG_USB is not set
meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch new file +136 -0
136 lines not on this page · raw message
meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-bsp/u-boot/u-boot-common.inc +10 -3
@@ -12,9 +12,16 @@ PE = "1" # We use the revision in order to avoid having to fetch it from the # repo during parse -SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a" - -SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" +SRCREV = "e37de002fac3895e8d0b60ae2015e17bb33e2b5b" + +SRC_URI = "\ + git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \ + file://v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch \ + file://v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch \ + file://0001-nxp-Prepare-macros-for-KVM-changes.patch \ + file://0002-arm-io.h-Fix-io-accessors-for-KVM.patch \ + file://0003-qemu-arm-Enable-virtualizable-IO-accessors.patch \ +" SRC_URI_RISCV = "\ file://u-boot-riscv-isa_clear.cfg \
meta/recipes-bsp/u-boot/u-boot-tools_2025.07.bb renamed from meta/recipes-bsp/u-boot/u-boot-tools_2025.04.bb +0 -0
meta/recipes-bsp/u-boot/u-boot_2025.07.bb renamed from meta/recipes-bsp/u-boot/u-boot_2025.04.bb +2 -2
@@ -4,5 +4,5 @@ require u-boot.inc DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" # workarounds for aarch64 kvm qemu boot regressions -SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" -SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" +SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg" +SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg"
Signature · 1 line
2.34.1