diff options
| author | Fabio Estevam <festevam@gmail.com> | 2025-07-21 14:11:32 -0300 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-28 14:51:51 +0100 |
| commit | 2f75d954870056ff2797073eb37a1fec431e5dbc (patch) | |
| tree | 1651be7b444730707cc05c7b3247503f81c031c6 | |
| parent | 7b648586314b50a23374700b2b446b8dc4aca8bf (diff) | |
| download | poky-2f75d954870056ff2797073eb37a1fec431e5dbc.tar.gz | |
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.
(From OE-Core rev: bb287fade558d0138f7254876c9029da63e3087f)
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch | 100 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch | 310 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch | 41 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg | 1 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch | 136 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch | 57 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/u-boot-common.inc | 13 | ||||
| -rw-r--r-- | 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 | ||||
| -rw-r--r-- | meta/recipes-bsp/u-boot/u-boot_2025.07.bb (renamed from meta/recipes-bsp/u-boot/u-boot_2025.04.bb) | 4 |
9 files changed, 656 insertions, 6 deletions
diff --git a/meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch b/meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch new file mode 100644 index 0000000000..fa34c8033e --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0001-nxp-Prepare-macros-for-KVM-changes.patch | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | From 9be804cbfde1df715d79247b27de4b388c714cde Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 3 | Date: Wed, 18 Jun 2025 09:58:12 +0300 | ||
| 4 | Subject: [PATCH 1/3] nxp: Prepare macros for KVM changes | ||
| 5 | |||
| 6 | A following patch is replacing our IO accessors with | ||
| 7 | do { ... } while(0) ones in order to make them usable with KVM. | ||
| 8 | |||
| 9 | That leads to an error eventually looking like this: | ||
| 10 | arch/arm/include/asm/io.h:62:9: error: expected expression before 'do' | ||
| 11 | 62 | do { \ | ||
| 12 | | ^~ | ||
| 13 | arch/arm/include/asm/io.h:211:41: note: in expansion of macro '__raw_writel' | ||
| 14 | 211 | #define out_arch(type,endian,a,v) __raw_write##type(cpu_to_##endian(v),a) | ||
| 15 | | ^~~~~~~~~~~ | ||
| 16 | arch/arm/include/asm/io.h:223:25: note: in expansion of macro 'out_arch' | ||
| 17 | 223 | #define out_be32(a,v) out_arch(l,be32,a,v) | ||
| 18 | | ^~~~~~~~ | ||
| 19 | drivers/spi/fsl_dspi.c:127:17: note: in expansion of macro 'out_be32' | ||
| 20 | 127 | out_be32(addr, val) : out_le32(addr, val); | ||
| 21 | | ^~~~~~~~ | ||
| 22 | |||
| 23 | So adjust the current macros and code to be compatible with the upcoming | ||
| 24 | change. | ||
| 25 | |||
| 26 | Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/b56c0632ad62] | ||
| 27 | Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 28 | Reviewed-by: Tom Rini <trini@konsulko.com> | ||
| 29 | Signed-off-by: Fabio Estevam <festevam@gmail.com> | ||
| 30 | --- | ||
| 31 | drivers/spi/fsl_dspi.c | 6 ++++-- | ||
| 32 | include/fsl_ifc.h | 24 ++++++++++++------------ | ||
| 33 | 2 files changed, 16 insertions(+), 14 deletions(-) | ||
| 34 | |||
| 35 | diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c | ||
| 36 | index f2393c041f44..545561ad1169 100644 | ||
| 37 | --- a/drivers/spi/fsl_dspi.c | ||
| 38 | +++ b/drivers/spi/fsl_dspi.c | ||
| 39 | @@ -123,8 +123,10 @@ static uint dspi_read32(uint flags, uint *addr) | ||
| 40 | |||
| 41 | static void dspi_write32(uint flags, uint *addr, uint val) | ||
| 42 | { | ||
| 43 | - flags & DSPI_FLAG_REGMAP_ENDIAN_BIG ? | ||
| 44 | - out_be32(addr, val) : out_le32(addr, val); | ||
| 45 | + if (flags & DSPI_FLAG_REGMAP_ENDIAN_BIG) | ||
| 46 | + out_be32(addr, val); | ||
| 47 | + else | ||
| 48 | + out_le32(addr, val); | ||
| 49 | } | ||
| 50 | |||
| 51 | static void dspi_halt(struct fsl_dspi_priv *priv, u8 halt) | ||
| 52 | diff --git a/include/fsl_ifc.h b/include/fsl_ifc.h | ||
| 53 | index 3ac226879303..1c363115beb2 100644 | ||
| 54 | --- a/include/fsl_ifc.h | ||
| 55 | +++ b/include/fsl_ifc.h | ||
| 56 | @@ -803,29 +803,29 @@ void init_final_memctl_regs(void); | ||
| 57 | ((struct fsl_ifc_fcm *)CFG_SYS_IFC_ADDR) | ||
| 58 | |||
| 59 | #define get_ifc_cspr_ext(i) \ | ||
| 60 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext)) | ||
| 61 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext) | ||
| 62 | #define get_ifc_cspr(i) \ | ||
| 63 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr)) | ||
| 64 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr) | ||
| 65 | #define get_ifc_csor_ext(i) \ | ||
| 66 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext)) | ||
| 67 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext) | ||
| 68 | #define get_ifc_csor(i) \ | ||
| 69 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor)) | ||
| 70 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor) | ||
| 71 | #define get_ifc_amask(i) \ | ||
| 72 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask)) | ||
| 73 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask) | ||
| 74 | #define get_ifc_ftim(i, j) \ | ||
| 75 | - (ifc_in32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j])) | ||
| 76 | + ifc_in32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j]) | ||
| 77 | #define set_ifc_cspr_ext(i, v) \ | ||
| 78 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext, v)) | ||
| 79 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr_ext, v) | ||
| 80 | #define set_ifc_cspr(i, v) \ | ||
| 81 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr, v)) | ||
| 82 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->cspr_cs[i].cspr, v) | ||
| 83 | #define set_ifc_csor_ext(i, v) \ | ||
| 84 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext, v)) | ||
| 85 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor_ext, v) | ||
| 86 | #define set_ifc_csor(i, v) \ | ||
| 87 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor, v)) | ||
| 88 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->csor_cs[i].csor, v) | ||
| 89 | #define set_ifc_amask(i, v) \ | ||
| 90 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask, v)) | ||
| 91 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->amask_cs[i].amask, v) | ||
| 92 | #define set_ifc_ftim(i, j, v) \ | ||
| 93 | - (ifc_out32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j], v)) | ||
| 94 | + ifc_out32(&(IFC_FCM_BASE_ADDR)->ftim_cs[i].ftim[j], v) | ||
| 95 | |||
| 96 | enum ifc_chip_sel { | ||
| 97 | IFC_CS0, | ||
| 98 | -- | ||
| 99 | 2.34.1 | ||
| 100 | |||
diff --git a/meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch b/meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch new file mode 100644 index 0000000000..558d753d4a --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0002-arm-io.h-Fix-io-accessors-for-KVM.patch | |||
| @@ -0,0 +1,310 @@ | |||
| 1 | From 2fc16d8de5bbe2a40ab25445936150c3250a9077 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 3 | Date: Wed, 18 Jun 2025 09:58:13 +0300 | ||
| 4 | Subject: [PATCH 2/3] arm: io.h: Fix io accessors for KVM | ||
| 5 | |||
| 6 | commit 2e2c2a5e72a8 ("arm: qemu: override flash accessors to use virtualizable instructions") | ||
| 7 | explains why we can't have instructions with multiple output registers | ||
| 8 | when running under QEMU + KVM and the instruction leads to an exception | ||
| 9 | to the hypervisor. | ||
| 10 | |||
| 11 | USB XHCI is such a case (MMIO) where a ldr w1, [x0], #4 is emitted for | ||
| 12 | xhci_start() which works fine with QEMU but crashes for QEMU + KVM. | ||
| 13 | |||
| 14 | These instructions cannot be emulated by KVM as they do not produce | ||
| 15 | syndrome information data that KVM can use to infer the destination | ||
| 16 | register, the faulting address, whether it was a load or store, or | ||
| 17 | if it's a 32 or 64 bit general-purpose register. | ||
| 18 | As a result an external abort is injected from QEMU, via ext_dabt_pending | ||
| 19 | to KVM and we end up throwing an exception that looks like | ||
| 20 | |||
| 21 | U-Boot 2025.07-rc4 (Jun 10 2025 - 12:00:15 +0000) | ||
| 22 | [...] | ||
| 23 | Register 8001040 NbrPorts 8 | ||
| 24 | Starting the controller | ||
| 25 | "Synchronous Abort" handler, esr 0x96000010, far 0x10100040 | ||
| 26 | elr: 000000000005b1c8 lr : 000000000005b1ac (reloc) | ||
| 27 | elr: 00000000476fc1c8 lr : 00000000476fc1ac | ||
| 28 | x0 : 0000000010100040 x1 : 0000000000000001 | ||
| 29 | x2 : 0000000000000000 x3 : 0000000000003e80 | ||
| 30 | x4 : 0000000000000000 x5 : 00000000477a5694 | ||
| 31 | x6 : 0000000000000038 x7 : 000000004666f360 | ||
| 32 | x8 : 0000000000000000 x9 : 00000000ffffffd8 | ||
| 33 | x10: 000000000000000d x11: 0000000000000006 | ||
| 34 | x12: 0000000046560a78 x13: 0000000046560dd0 | ||
| 35 | x14: 00000000ffffffff x15: 000000004666eed2 | ||
| 36 | x16: 00000000476ee2f0 x17: 0000000000000000 | ||
| 37 | x18: 0000000046660dd0 x19: 000000004666f480 | ||
| 38 | x20: 0000000000000000 x21: 0000000010100040 | ||
| 39 | x22: 0000000010100000 x23: 0000000000000000 | ||
| 40 | x24: 0000000000000000 x25: 0000000000000000 | ||
| 41 | x26: 0000000000000000 x27: 0000000000000000 | ||
| 42 | x28: 0000000000000000 x29: 000000004666f360 | ||
| 43 | |||
| 44 | Code: d5033fbf aa1503e0 5287d003 52800002 (b8004401) | ||
| 45 | Resetting CPU ... | ||
| 46 | |||
| 47 | There are two problems making this the default. | ||
| 48 | - It will emit ldr + add or str + add instead of ldr/str(post increment) | ||
| 49 | in somne cases | ||
| 50 | - Some platforms that depend on TPL/SPL grow in size enough so that the | ||
| 51 | binary doesn't fit anymore. | ||
| 52 | |||
| 53 | So let's add proper I/O accessors add a Kconfig option | ||
| 54 | to turn it off by default apart from our QEMU builds. | ||
| 55 | |||
| 56 | Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/dc512700ad46] | ||
| 57 | Reported-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 58 | Tested-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 59 | Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 60 | Signed-off-by: Fabio Estevam <festevam@gmail.com> | ||
| 61 | --- | ||
| 62 | arch/arm/Kconfig | 12 +++ | ||
| 63 | arch/arm/include/asm/io.h | 152 ++++++++++++++++++++++++++++---------- | ||
| 64 | 2 files changed, 124 insertions(+), 40 deletions(-) | ||
| 65 | |||
| 66 | diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig | ||
| 67 | index 6ff3f2750ea8..f6430a5aaf07 100644 | ||
| 68 | --- a/arch/arm/Kconfig | ||
| 69 | +++ b/arch/arm/Kconfig | ||
| 70 | @@ -108,6 +108,18 @@ config LNX_KRNL_IMG_TEXT_OFFSET_BASE | ||
| 71 | The value subtracted from CONFIG_TEXT_BASE to calculate the | ||
| 72 | TEXT_OFFSET value written to the Linux kernel image header. | ||
| 73 | |||
| 74 | +config KVM_VIRT_INS | ||
| 75 | + bool "Emit virtualizable instructions" | ||
| 76 | + help | ||
| 77 | + Instructions in the ARM ISA that have multiple output registers, | ||
| 78 | + can't be used if the instruction leads to an exception to the hypervisor. | ||
| 79 | + These instructions cannot be emulated by KVM because they do not produce | ||
| 80 | + syndrome information data that KVM can use to infer the destination | ||
| 81 | + register, the faulting address, whether it was a load or store, | ||
| 82 | + if it's a 32 or 64 bit general-purpose register amongst other things. | ||
| 83 | + Use this to produce virtualizable instructions if you plan to run U-Boot | ||
| 84 | + with KVM. | ||
| 85 | + | ||
| 86 | config NVIC | ||
| 87 | bool | ||
| 88 | |||
| 89 | diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h | ||
| 90 | index 89b1015bc4d3..85ec0e6937e8 100644 | ||
| 91 | --- a/arch/arm/include/asm/io.h | ||
| 92 | +++ b/arch/arm/include/asm/io.h | ||
| 93 | @@ -20,23 +20,108 @@ static inline void sync(void) | ||
| 94 | { | ||
| 95 | } | ||
| 96 | |||
| 97 | -/* Generic virtual read/write. */ | ||
| 98 | -#define __arch_getb(a) (*(volatile unsigned char *)(a)) | ||
| 99 | -#define __arch_getw(a) (*(volatile unsigned short *)(a)) | ||
| 100 | -#define __arch_getl(a) (*(volatile unsigned int *)(a)) | ||
| 101 | -#define __arch_getq(a) (*(volatile unsigned long long *)(a)) | ||
| 102 | +#ifdef CONFIG_ARM64 | ||
| 103 | +#define __W "w" | ||
| 104 | +#else | ||
| 105 | +#define __W | ||
| 106 | +#endif | ||
| 107 | + | ||
| 108 | +#if CONFIG_IS_ENABLED(SYS_THUMB_BUILD) | ||
| 109 | +#define __R "l" | ||
| 110 | +#define __RM "=l" | ||
| 111 | +#else | ||
| 112 | +#define __R "r" | ||
| 113 | +#define __RM "=r" | ||
| 114 | +#endif | ||
| 115 | |||
| 116 | -#define __arch_putb(v,a) (*(volatile unsigned char *)(a) = (v)) | ||
| 117 | -#define __arch_putw(v,a) (*(volatile unsigned short *)(a) = (v)) | ||
| 118 | -#define __arch_putl(v,a) (*(volatile unsigned int *)(a) = (v)) | ||
| 119 | -#define __arch_putq(v,a) (*(volatile unsigned long long *)(a) = (v)) | ||
| 120 | +#ifdef CONFIG_KVM_VIRT_INS | ||
| 121 | +/* | ||
| 122 | + * The __raw_writeX/__raw_readX below should be converted to static inline | ||
| 123 | + * functions. However doing so produces a lot of compilation warnings when | ||
| 124 | + * called with a raw address. Convert these once the callers have been fixed. | ||
| 125 | + */ | ||
| 126 | +#define __raw_writeb(val, addr) \ | ||
| 127 | + do { \ | ||
| 128 | + asm volatile("strb %" __W "0, [%1]" \ | ||
| 129 | + : \ | ||
| 130 | + : __R ((u8)(val)), __R (addr)); \ | ||
| 131 | + } while (0) | ||
| 132 | + | ||
| 133 | +#define __raw_readb(addr) \ | ||
| 134 | + ({ \ | ||
| 135 | + u32 __val; \ | ||
| 136 | + asm volatile("ldrb %" __W "0, [%1]" \ | ||
| 137 | + : __RM (__val) \ | ||
| 138 | + : __R (addr)); \ | ||
| 139 | + __val; \ | ||
| 140 | + }) | ||
| 141 | + | ||
| 142 | +#define __raw_writew(val, addr) \ | ||
| 143 | + do { \ | ||
| 144 | + asm volatile("strh %" __W "0, [%1]" \ | ||
| 145 | + : \ | ||
| 146 | + : __R ((u16)(val)), __R (addr)); \ | ||
| 147 | + } while (0) | ||
| 148 | + | ||
| 149 | +#define __raw_readw(addr) \ | ||
| 150 | + ({ \ | ||
| 151 | + u32 __val; \ | ||
| 152 | + asm volatile("ldrh %" __W "0, [%1]" \ | ||
| 153 | + : __RM (__val) \ | ||
| 154 | + : __R (addr)); \ | ||
| 155 | + __val; \ | ||
| 156 | + }) | ||
| 157 | + | ||
| 158 | +#define __raw_writel(val, addr) \ | ||
| 159 | + do { \ | ||
| 160 | + asm volatile("str %" __W "0, [%1]" \ | ||
| 161 | + : \ | ||
| 162 | + : __R ((u32)(val)), __R (addr)); \ | ||
| 163 | + } while (0) | ||
| 164 | + | ||
| 165 | +#define __raw_readl(addr) \ | ||
| 166 | + ({ \ | ||
| 167 | + u32 __val; \ | ||
| 168 | + asm volatile("ldr %" __W "0, [%1]" \ | ||
| 169 | + : __RM (__val) \ | ||
| 170 | + : __R (addr)); \ | ||
| 171 | + __val; \ | ||
| 172 | + }) | ||
| 173 | + | ||
| 174 | +#define __raw_writeq(val, addr) \ | ||
| 175 | + do { \ | ||
| 176 | + asm volatile("str %0, [%1]" \ | ||
| 177 | + : \ | ||
| 178 | + : __R ((u64)(val)), __R (addr)); \ | ||
| 179 | + } while (0) | ||
| 180 | + | ||
| 181 | +#define __raw_readq(addr) \ | ||
| 182 | + ({ \ | ||
| 183 | + u64 __val; \ | ||
| 184 | + asm volatile("ldr %0, [%1]" \ | ||
| 185 | + : __RM (__val) \ | ||
| 186 | + : __R (addr)); \ | ||
| 187 | + __val; \ | ||
| 188 | + }) | ||
| 189 | +#else | ||
| 190 | +/* Generic virtual read/write. */ | ||
| 191 | +#define __raw_readb(a) (*(volatile unsigned char *)(a)) | ||
| 192 | +#define __raw_readw(a) (*(volatile unsigned short *)(a)) | ||
| 193 | +#define __raw_readl(a) (*(volatile unsigned int *)(a)) | ||
| 194 | +#define __raw_readq(a) (*(volatile unsigned long long *)(a)) | ||
| 195 | + | ||
| 196 | +#define __raw_writeb(v, a) (*(volatile unsigned char *)(a) = (v)) | ||
| 197 | +#define __raw_writew(v, a) (*(volatile unsigned short *)(a) = (v)) | ||
| 198 | +#define __raw_writel(v, a) (*(volatile unsigned int *)(a) = (v)) | ||
| 199 | +#define __raw_writeq(v, a) (*(volatile unsigned long long *)(a) = (v)) | ||
| 200 | +#endif | ||
| 201 | |||
| 202 | static inline void __raw_writesb(unsigned long addr, const void *data, | ||
| 203 | int bytelen) | ||
| 204 | { | ||
| 205 | uint8_t *buf = (uint8_t *)data; | ||
| 206 | while(bytelen--) | ||
| 207 | - __arch_putb(*buf++, addr); | ||
| 208 | + __raw_writeb(*buf++, addr); | ||
| 209 | } | ||
| 210 | |||
| 211 | static inline void __raw_writesw(unsigned long addr, const void *data, | ||
| 212 | @@ -44,7 +129,7 @@ static inline void __raw_writesw(unsigned long addr, const void *data, | ||
| 213 | { | ||
| 214 | uint16_t *buf = (uint16_t *)data; | ||
| 215 | while(wordlen--) | ||
| 216 | - __arch_putw(*buf++, addr); | ||
| 217 | + __raw_writew(*buf++, addr); | ||
| 218 | } | ||
| 219 | |||
| 220 | static inline void __raw_writesl(unsigned long addr, const void *data, | ||
| 221 | @@ -52,40 +137,30 @@ static inline void __raw_writesl(unsigned long addr, const void *data, | ||
| 222 | { | ||
| 223 | uint32_t *buf = (uint32_t *)data; | ||
| 224 | while(longlen--) | ||
| 225 | - __arch_putl(*buf++, addr); | ||
| 226 | + __raw_writel(*buf++, addr); | ||
| 227 | } | ||
| 228 | |||
| 229 | static inline void __raw_readsb(unsigned long addr, void *data, int bytelen) | ||
| 230 | { | ||
| 231 | uint8_t *buf = (uint8_t *)data; | ||
| 232 | while(bytelen--) | ||
| 233 | - *buf++ = __arch_getb(addr); | ||
| 234 | + *buf++ = __raw_readb(addr); | ||
| 235 | } | ||
| 236 | |||
| 237 | static inline void __raw_readsw(unsigned long addr, void *data, int wordlen) | ||
| 238 | { | ||
| 239 | uint16_t *buf = (uint16_t *)data; | ||
| 240 | while(wordlen--) | ||
| 241 | - *buf++ = __arch_getw(addr); | ||
| 242 | + *buf++ = __raw_readw(addr); | ||
| 243 | } | ||
| 244 | |||
| 245 | static inline void __raw_readsl(unsigned long addr, void *data, int longlen) | ||
| 246 | { | ||
| 247 | uint32_t *buf = (uint32_t *)data; | ||
| 248 | while(longlen--) | ||
| 249 | - *buf++ = __arch_getl(addr); | ||
| 250 | + *buf++ = __raw_readl(addr); | ||
| 251 | } | ||
| 252 | |||
| 253 | -#define __raw_writeb(v,a) __arch_putb(v,a) | ||
| 254 | -#define __raw_writew(v,a) __arch_putw(v,a) | ||
| 255 | -#define __raw_writel(v,a) __arch_putl(v,a) | ||
| 256 | -#define __raw_writeq(v,a) __arch_putq(v,a) | ||
| 257 | - | ||
| 258 | -#define __raw_readb(a) __arch_getb(a) | ||
| 259 | -#define __raw_readw(a) __arch_getw(a) | ||
| 260 | -#define __raw_readl(a) __arch_getl(a) | ||
| 261 | -#define __raw_readq(a) __arch_getq(a) | ||
| 262 | - | ||
| 263 | /* | ||
| 264 | * TODO: The kernel offers some more advanced versions of barriers, it might | ||
| 265 | * have some advantages to use them instead of the simple one here. | ||
| 266 | @@ -98,15 +173,15 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen) | ||
| 267 | |||
| 268 | #define smp_processor_id() 0 | ||
| 269 | |||
| 270 | -#define writeb(v,c) ({ u8 __v = v; __iowmb(); __arch_putb(__v,c); __v; }) | ||
| 271 | -#define writew(v,c) ({ u16 __v = v; __iowmb(); __arch_putw(__v,c); __v; }) | ||
| 272 | -#define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; }) | ||
| 273 | -#define writeq(v,c) ({ u64 __v = v; __iowmb(); __arch_putq(__v,c); __v; }) | ||
| 274 | +#define writeb(v, c) ({ u8 __v = v; __iowmb(); writeb_relaxed(__v, c); __v; }) | ||
| 275 | +#define writew(v, c) ({ u16 __v = v; __iowmb(); writew_relaxed(__v, c); __v; }) | ||
| 276 | +#define writel(v, c) ({ u32 __v = v; __iowmb(); writel_relaxed(__v, c); __v; }) | ||
| 277 | +#define writeq(v, c) ({ u64 __v = v; __iowmb(); writeq_relaxed(__v, c); __v; }) | ||
| 278 | |||
| 279 | -#define readb(c) ({ u8 __v = __arch_getb(c); __iormb(); __v; }) | ||
| 280 | -#define readw(c) ({ u16 __v = __arch_getw(c); __iormb(); __v; }) | ||
| 281 | -#define readl(c) ({ u32 __v = __arch_getl(c); __iormb(); __v; }) | ||
| 282 | -#define readq(c) ({ u64 __v = __arch_getq(c); __iormb(); __v; }) | ||
| 283 | +#define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) | ||
| 284 | +#define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) | ||
| 285 | +#define readl(c) ({ u32 __v = readl_relaxed(c); __iormb(); __v; }) | ||
| 286 | +#define readq(c) ({ u64 __v = readq_relaxed(c); __iormb(); __v; }) | ||
| 287 | |||
| 288 | /* | ||
| 289 | * Relaxed I/O memory access primitives. These follow the Device memory | ||
| 290 | @@ -121,13 +196,10 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen) | ||
| 291 | #define readq_relaxed(c) ({ u64 __r = le64_to_cpu((__force __le64) \ | ||
| 292 | __raw_readq(c)); __r; }) | ||
| 293 | |||
| 294 | -#define writeb_relaxed(v, c) ((void)__raw_writeb((v), (c))) | ||
| 295 | -#define writew_relaxed(v, c) ((void)__raw_writew((__force u16) \ | ||
| 296 | - cpu_to_le16(v), (c))) | ||
| 297 | -#define writel_relaxed(v, c) ((void)__raw_writel((__force u32) \ | ||
| 298 | - cpu_to_le32(v), (c))) | ||
| 299 | -#define writeq_relaxed(v, c) ((void)__raw_writeq((__force u64) \ | ||
| 300 | - cpu_to_le64(v), (c))) | ||
| 301 | +#define writeb_relaxed(v, c) __raw_writeb((v), (c)) | ||
| 302 | +#define writew_relaxed(v, c) __raw_writew((__force u16)cpu_to_le16(v), (c)) | ||
| 303 | +#define writel_relaxed(v, c) __raw_writel((__force u32)cpu_to_le32(v), (c)) | ||
| 304 | +#define writeq_relaxed(v, c) __raw_writeq((__force u64)cpu_to_le64(v), (c)) | ||
| 305 | |||
| 306 | /* | ||
| 307 | * The compiler seems to be incapable of optimising constants | ||
| 308 | -- | ||
| 309 | 2.34.1 | ||
| 310 | |||
diff --git a/meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch b/meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch new file mode 100644 index 0000000000..520c9226b4 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/0003-qemu-arm-Enable-virtualizable-IO-accessors.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From cb6120b4bfd8b24dde7e0d1eda882e203a849d3f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 3 | Date: Wed, 18 Jun 2025 09:58:14 +0300 | ||
| 4 | Subject: [PATCH 3/3] qemu: arm: Enable virtualizable IO accessors | ||
| 5 | |||
| 6 | We recently added IO accessors that will work with KVM for any MMIO | ||
| 7 | access that casues an exception to the hypervisor. Enable them by | ||
| 8 | default for QEMU. | ||
| 9 | |||
| 10 | Upstream-Status: Backport [https://github.com/u-boot/u-boot/commit/fcc60481ae75] | ||
| 11 | Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> | ||
| 12 | Tested-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 13 | Signed-off-by: Fabio Estevam <festevam@gmail.com> | ||
| 14 | --- | ||
| 15 | configs/qemu_arm64_defconfig | 1 + | ||
| 16 | configs/qemu_arm_defconfig | 1 + | ||
| 17 | 2 files changed, 2 insertions(+) | ||
| 18 | |||
| 19 | diff --git a/configs/qemu_arm64_defconfig b/configs/qemu_arm64_defconfig | ||
| 20 | index 72bd255eafa3..39afb837e411 100644 | ||
| 21 | --- a/configs/qemu_arm64_defconfig | ||
| 22 | +++ b/configs/qemu_arm64_defconfig | ||
| 23 | @@ -1,4 +1,5 @@ | ||
| 24 | CONFIG_ARM=y | ||
| 25 | +CONFIG_KVM_VIRT_INS=y | ||
| 26 | CONFIG_ARCH_QEMU=y | ||
| 27 | CONFIG_SYS_MALLOC_LEN=0x1000000 | ||
| 28 | CONFIG_BLOBLIST_SIZE_RELOC=0x2000 | ||
| 29 | diff --git a/configs/qemu_arm_defconfig b/configs/qemu_arm_defconfig | ||
| 30 | index f13001390d4d..92ba48f6af97 100644 | ||
| 31 | --- a/configs/qemu_arm_defconfig | ||
| 32 | +++ b/configs/qemu_arm_defconfig | ||
| 33 | @@ -1,4 +1,5 @@ | ||
| 34 | CONFIG_ARM=y | ||
| 35 | +CONFIG_KVM_VIRT_INS=y | ||
| 36 | CONFIG_ARM_SMCCC=y | ||
| 37 | CONFIG_ARCH_QEMU=y | ||
| 38 | CONFIG_SYS_MALLOC_LEN=0x1000000 | ||
| 39 | -- | ||
| 40 | 2.34.1 | ||
| 41 | |||
diff --git a/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg b/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg deleted file mode 100644 index 1d2509982b..0000000000 --- a/meta/recipes-bsp/u-boot/files/disable_CONFIG_USB.cfg +++ /dev/null | |||
| @@ -1 +0,0 @@ | |||
| 1 | # CONFIG_USB is not set | ||
diff --git a/meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch b/meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch new file mode 100644 index 0000000000..e8253a67b2 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | From 2e7c1321bb44cc6af4ee4b1026a52e1a0aa7e336 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 3 | Date: Thu, 10 Jul 2025 14:24:07 +0000 | ||
| 4 | Subject: [PATCH v3 1/2] Makefile scripts/Makefile.lib: fix *_efi.so dependency | ||
| 5 | to PLATFORM_LIBGCC | ||
| 6 | |||
| 7 | When PLATFORM_LIBGCC was added to linker command it was not | ||
| 8 | added to the dependency of the .so and other rules. Thus a build can | ||
| 9 | try to link *_efi.so files before lib.a from PLATFORM_LIBGCC is available. | ||
| 10 | This was seen in yocto autobuilder builds with u-boot 2025.07 | ||
| 11 | update, see https://lists.openembedded.org/g/openembedded-core/message/220004 | ||
| 12 | |||
| 13 | https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline | ||
| 14 | |||
| 15 | | rm -f lib/efi_loader/built-in.o; arm-poky-linux-gnueabi-ar cDPrsT lib/efi_loader/built-in.o lib/efi_loader/efi_bootmgr.o lib/efi_loader/efi_bootbin.o lib/efi_loader/efi_boottime.o lib/efi_loader/efi_helper.o lib/efi_loader/efi_console.o lib/efi_loader/efi_device_path.o lib/efi_loader/efi_device_path_to_text.o lib/efi_loader/efi_device_path_utilities.o lib/efi_loader/efi_dt_fixup.o lib/efi_loader/efi_fdt.o lib/efi_loader/efi_file.o lib/efi_loader/efi_hii.o lib/efi_loader/efi_hii_config.o lib/efi_loader/efi_image_loader.o lib/efi_loader/efi_load_options.o lib/efi_loader/efi_memory.o lib/efi_loader/efi_root_node.o lib/efi_loader/efi_runtime.o lib/efi_loader/efi_setup.o lib/efi_loader/efi_string.o lib/efi_loader/efi_unicode_collation.o lib/efi_loader/efi_var_common.o lib/efi_loader/efi_var_mem.o lib/efi_loader/efi_variable.o lib/efi_loader/efi_var_file.o lib/efi_loader/efi_watchdog.o lib/efi_loader/efi_disk.o lib/efi_loader/efi_net.o lib/efi_loader/efi_smbios.o lib/efi_loader/efi_load_initrd.o lib/efi_loader/efi_conformance.o | ||
| 16 | | arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/sources/u-boot-2025.07 -T arch/arm/lib/elf_arm_efi.lds -shared -Bsymbolic -s lib/efi_loader/helloworld.o lib/efi_loader/efi_crt0.o lib/efi_loader/efi_reloc.o lib/efi_loader/efi_freestanding.o arch/arm/lib/lib.a -o lib/efi_loader/helloworld_efi.so | ||
| 17 | | arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory | ||
| 18 | | make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1 | ||
| 19 | |||
| 20 | The issue is hard to reproduce but this change can artificially trigger it: | ||
| 21 | |||
| 22 | a/scripts/Makefile.build | ||
| 23 | b/scripts/Makefile.build | ||
| 24 | @@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE | ||
| 25 | # | ||
| 26 | ifdef lib-target | ||
| 27 | quiet_cmd_link_l_target = AR $@ | ||
| 28 | -cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y) | ||
| 29 | +cmd_link_l_target = rm -f $@ && echo "HACK, delaying build!" && sleep 60 && $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y) | ||
| 30 | |||
| 31 | $(lib-target): $(lib-y) FORCE | ||
| 32 | $(call if_changed,link_l_target) | ||
| 33 | |||
| 34 | Then run a rebuild with: | ||
| 35 | |||
| 36 | $ rm -f $( find build/ -name lib.a -or -name helloworld_efi.so ) && \ | ||
| 37 | make | ||
| 38 | ... | ||
| 39 | arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_bea | ||
| 40 | glebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/sources/u-boot-2025.07 -T arch/arm/lib/elf_arm_efi.lds -shared -Bsymbolic -s lib/efi_loader/helloworld.o lib/efi_loader/efi_crt0.o lib/efi_loader/efi_reloc.o lib/efi_loader/efi_freestanding.o arch/arm/lib/lib.a -o lib/efi_loader/helloworld_efi.so | ||
| 41 | arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory | ||
| 42 | make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1 | ||
| 43 | |||
| 44 | Fix by introducing PLATFORM_LIBGCC_LIBA variable with only lib.a | ||
| 45 | filename which is then used to add the dependency in rules which use | ||
| 46 | PLATFORM_LIBGCC. This should not impact builds which don't set | ||
| 47 | PLATFORM_LIBGCC_LIBA and PLATFORM_LIBGCC usage stays as is. | ||
| 48 | |||
| 49 | Fixes: 43d43241d1c9 ("scripts/Makefile.lib: add PLATFORM_LIBGCC to efi linking") | ||
| 50 | |||
| 51 | Cc: Adriano Cordova <adrianox@gmail.com> | ||
| 52 | Cc: Fabio Estevam <festevam@gmail.com> | ||
| 53 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 54 | --- | ||
| 55 | Makefile | 4 +++- | ||
| 56 | examples/standalone/Makefile | 2 +- | ||
| 57 | scripts/Makefile.lib | 2 +- | ||
| 58 | scripts/Makefile.xpl | 3 ++- | ||
| 59 | 4 files changed, 7 insertions(+), 4 deletions(-) | ||
| 60 | |||
| 61 | Upstream-Status: Submitted [https://lists.denx.de/pipermail/u-boot/2025-July/594581.html] | ||
| 62 | |||
| 63 | v3: added "export PLATFORM_LIBGCC_LIBA" like PLATFORM_LIBGCC, not sure | ||
| 64 | how testing worked without this before | ||
| 65 | |||
| 66 | v2: introduced PLATFORM_LIBGCC_LIBA variable with just lib.a filename, | ||
| 67 | PLATFORM_LIBGCC can have other flags too | ||
| 68 | https://lists.denx.de/pipermail/u-boot/2025-July/594034.html | ||
| 69 | |||
| 70 | v1: https://lists.denx.de/pipermail/u-boot/2025-July/593982.html | ||
| 71 | |||
| 72 | diff --git a/Makefile b/Makefile | ||
| 73 | index 1a5c77d7caf0..a0797f36f7f6 100644 | ||
| 74 | --- a/Makefile | ||
| 75 | +++ b/Makefile | ||
| 76 | @@ -911,7 +911,8 @@ u-boot-main := $(libs-y) | ||
| 77 | |||
| 78 | # Add GCC lib | ||
| 79 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) | ||
| 80 | -PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a | ||
| 81 | +PLATFORM_LIBGCC_LIBA = arch/$(ARCH)/lib/lib.a | ||
| 82 | +PLATFORM_LIBGCC = $(PLATFORM_LIBGCC_LIBA) | ||
| 83 | else | ||
| 84 | ifndef CONFIG_CC_IS_CLANG | ||
| 85 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc | ||
| 86 | @@ -926,6 +927,7 @@ endif | ||
| 87 | |||
| 88 | export PLATFORM_LIBS | ||
| 89 | export PLATFORM_LIBGCC | ||
| 90 | +export PLATFORM_LIBGCC_LIBA | ||
| 91 | |||
| 92 | # Special flags for CPP when processing the linker script. | ||
| 93 | # Pass the version down so we can handle backwards compatibility | ||
| 94 | diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile | ||
| 95 | index 9b57f1c0c66c..aa9e3121cf9a 100644 | ||
| 96 | --- a/examples/standalone/Makefile | ||
| 97 | +++ b/examples/standalone/Makefile | ||
| 98 | @@ -64,7 +64,7 @@ quiet_cmd_link_elf = LD $@ | ||
| 99 | cmd_link_elf = $(LD) $(KBUILD_LDFLAGS) $(LDFLAGS_STANDALONE) -g \ | ||
| 100 | -o $@ -e $(SYM_PREFIX)$(@F) $< $(LIB) $(PLATFORM_LIBGCC) | ||
| 101 | |||
| 102 | -$(ELF): $(obj)/%: $(obj)/%.o $(LIB) FORCE | ||
| 103 | +$(ELF): $(obj)/%: $(obj)/%.o $(LIB) $(PLATFORM_LIBGCC_LIBA) FORCE | ||
| 104 | $(call if_changed,link_elf) | ||
| 105 | |||
| 106 | $(obj)/%.srec: OBJCOPYFLAGS += -O srec | ||
| 107 | diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib | ||
| 108 | index e89a4a51b74d..cef3863dfdc4 100644 | ||
| 109 | --- a/scripts/Makefile.lib | ||
| 110 | +++ b/scripts/Makefile.lib | ||
| 111 | @@ -508,7 +508,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun | ||
| 112 | $(call cmd,force_checksrc) | ||
| 113 | $(call if_changed_rule,cc_o_c) | ||
| 114 | |||
| 115 | -$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o | ||
| 116 | +$(obj)/%_efi.so: $(PLATFORM_LIBGCC_LIBA) $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o | ||
| 117 | $(call cmd,efi_ld) | ||
| 118 | |||
| 119 | targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o | ||
| 120 | diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl | ||
| 121 | index 43f27874f9fe..68c88293f0d9 100644 | ||
| 122 | --- a/scripts/Makefile.xpl | ||
| 123 | +++ b/scripts/Makefile.xpl | ||
| 124 | @@ -139,7 +139,8 @@ libs-y := $(patsubst %/, %/built-in.o, $(libs-y)) | ||
| 125 | |||
| 126 | # Add GCC lib | ||
| 127 | ifeq ($(CONFIG_USE_PRIVATE_LIBGCC),y) | ||
| 128 | -PLATFORM_LIBGCC = arch/$(ARCH)/lib/lib.a | ||
| 129 | +PLATFORM_LIBGCC_LIBA = arch/$(ARCH)/lib/lib.a | ||
| 130 | +PLATFORM_LIBGCC = $(PLATFORM_LIBGCC_LIBA) | ||
| 131 | PLATFORM_LIBS := $(filter-out %/lib.a, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) | ||
| 132 | endif | ||
| 133 | |||
| 134 | -- | ||
| 135 | 2.43.0 | ||
| 136 | |||
diff --git a/meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch b/meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch new file mode 100644 index 0000000000..6b68f74724 --- /dev/null +++ b/meta/recipes-bsp/u-boot/files/v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | From d207ec22429adc94f9e173971e30c675d2ab3de4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 3 | Date: Fri, 18 Jul 2025 08:15:25 +0000 | ||
| 4 | Subject: [PATCH v3 2/2] efi_loader Makefile: change apps from "always" to | ||
| 5 | "targets" | ||
| 6 | |||
| 7 | Adding delay to link commands in scripts/Makefile.build | ||
| 8 | |||
| 9 | @@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE | ||
| 10 | # | ||
| 11 | ifdef lib-target | ||
| 12 | quiet_cmd_link_l_target = AR $@ | ||
| 13 | -cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y) | ||
| 14 | +cmd_link_l_target = rm -f $@; echo "HACK delaying lib-target"; sleep 10; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y) | ||
| 15 | |||
| 16 | $(lib-target): $(lib-y) FORCE | ||
| 17 | $(call if_changed,link_l_target) | ||
| 18 | (1/2) Stage this hunk [y,n,q,a,d,j,J,g,/,e,?]? n | ||
| 19 | @@ -362,7 +362,7 @@ targets += $(lib-target) | ||
| 20 | endif | ||
| 21 | |||
| 22 | quiet_cmd_link_multi-y = AR $@ | ||
| 23 | -cmd_link_multi-y = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) | ||
| 24 | +cmd_link_multi-y = rm -f $@; echo "HACK delaying cmd_link_multi-y"; sleep 10; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(filter %.o,$^) | ||
| 25 | |||
| 26 | quiet_cmd_link_multi-m = AR [M] $@ | ||
| 27 | cmd_link_multi-m = $(cmd_link_multi-y) | ||
| 28 | |||
| 29 | exposes a build failure: | ||
| 30 | |||
| 31 | make[3]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by '__build'. Stop. | ||
| 32 | make[3]: *** Waiting for unfinished jobs.... | ||
| 33 | |||
| 34 | This if fixed by using normal targets for .efi apps. The rules | ||
| 35 | in scripts/Makefile.lib handle the dependencies correctly. | ||
| 36 | |||
| 37 | Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org> | ||
| 38 | --- | ||
| 39 | lib/efi_loader/Makefile | 2 +- | ||
| 40 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 41 | |||
| 42 | Upstream-Status: Submitted [https://lists.denx.de/pipermail/u-boot/2025-July/594583.html] | ||
| 43 | |||
| 44 | diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile | ||
| 45 | index cf050e5385dd..e929c23b1cb1 100644 | ||
| 46 | --- a/lib/efi_loader/Makefile | ||
| 47 | +++ b/lib/efi_loader/Makefile | ||
| 48 | @@ -96,5 +96,5 @@ $(foreach f,$(apps-y),\ | ||
| 49 | $(eval CFLAGS_$(f).o := $(CFLAGS_EFI) -Os -ffreestanding)\ | ||
| 50 | $(eval CFLAGS_REMOVE_$(f).o := $(CFLAGS_NON_EFI))) | ||
| 51 | |||
| 52 | -always += $(foreach f,$(apps-y),$(f).efi) | ||
| 53 | +targets += $(foreach f,$(apps-y),$(f).efi) | ||
| 54 | targets += $(foreach f,$(apps-y),$(f).o) | ||
| 55 | -- | ||
| 56 | 2.43.0 | ||
| 57 | |||
diff --git a/meta/recipes-bsp/u-boot/u-boot-common.inc b/meta/recipes-bsp/u-boot/u-boot-common.inc index 8600d4bab6..053e686354 100644 --- a/meta/recipes-bsp/u-boot/u-boot-common.inc +++ b/meta/recipes-bsp/u-boot/u-boot-common.inc | |||
| @@ -12,9 +12,16 @@ PE = "1" | |||
| 12 | 12 | ||
| 13 | # We use the revision in order to avoid having to fetch it from the | 13 | # We use the revision in order to avoid having to fetch it from the |
| 14 | # repo during parse | 14 | # repo during parse |
| 15 | SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a" | 15 | SRCREV = "e37de002fac3895e8d0b60ae2015e17bb33e2b5b" |
| 16 | 16 | ||
| 17 | SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}" | 17 | SRC_URI = "\ |
| 18 | git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV} \ | ||
| 19 | file://v3-0001-Makefile-scripts-Makefile.lib-fix-_efi.so-depende.patch \ | ||
| 20 | file://v3-0002-efi_loader-Makefile-change-apps-from-always-to-ta.patch \ | ||
| 21 | file://0001-nxp-Prepare-macros-for-KVM-changes.patch \ | ||
| 22 | file://0002-arm-io.h-Fix-io-accessors-for-KVM.patch \ | ||
| 23 | file://0003-qemu-arm-Enable-virtualizable-IO-accessors.patch \ | ||
| 24 | " | ||
| 18 | 25 | ||
| 19 | SRC_URI_RISCV = "\ | 26 | SRC_URI_RISCV = "\ |
| 20 | file://u-boot-riscv-isa_clear.cfg \ | 27 | file://u-boot-riscv-isa_clear.cfg \ |
diff --git a/meta/recipes-bsp/u-boot/u-boot-tools_2025.04.bb b/meta/recipes-bsp/u-boot/u-boot-tools_2025.07.bb index 7eaf721ca8..7eaf721ca8 100644 --- a/meta/recipes-bsp/u-boot/u-boot-tools_2025.04.bb +++ b/meta/recipes-bsp/u-boot/u-boot-tools_2025.07.bb | |||
diff --git a/meta/recipes-bsp/u-boot/u-boot_2025.04.bb b/meta/recipes-bsp/u-boot/u-boot_2025.07.bb index 89e964f627..25f264c961 100644 --- a/meta/recipes-bsp/u-boot/u-boot_2025.04.bb +++ b/meta/recipes-bsp/u-boot/u-boot_2025.07.bb | |||
| @@ -4,5 +4,5 @@ require u-boot.inc | |||
| 4 | DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" | 4 | DEPENDS += "bc-native dtc-native gnutls-native python3-pyelftools-native" |
| 5 | 5 | ||
| 6 | # workarounds for aarch64 kvm qemu boot regressions | 6 | # workarounds for aarch64 kvm qemu boot regressions |
| 7 | SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" | 7 | SRC_URI:append:qemuarm64 = " file://disable-CONFIG_BLOBLIST.cfg" |
| 8 | SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg file://disable_CONFIG_USB.cfg" | 8 | SRC_URI:append:genericarm64 = " file://disable-CONFIG_BLOBLIST.cfg" |
