Skip to contentSkip to conversation

u-boot: upgrade 2025.04 -> 2025.07

PATCH In review Fabio Estevam 5 participants 13 messages Jul 8, 2025 – Jul 10, 2025 1 message not in the archive Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 u-boot: upgrade 2025.04 -> 2025.07

Upgrade to U-Boot 2025.07.

---
 meta/recipes-bsp/u-boot/u-boot-common.inc                       | 2 +-
 .../u-boot/{u-boot-tools_2025.04.bb => u-boot-tools_2025.07.bb} | 0
 .../recipes-bsp/u-boot/{u-boot_2025.04.bb => u-boot_2025.07.bb} | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 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} (100%)
meta/recipes-bsp/u-boot/u-boot-common.inc +1 -1
index 617f5a60bb88..d087525edfea 100644
@@ -12,7 +12,7 @@ PE = "1"
 
 # We use the revision in order to avoid having to fetch it from the
 # repo during parse
-SRCREV = "34820924edbc4ec7803eb89d9852f4b870fa760a"
+SRCREV = "e37de002fac3895e8d0b60ae2015e17bb33e2b5b"
 
 SRC_URI = "git://source.denx.de/u-boot/u-boot.git;protocol=https;branch=master;tag=v${PV}"
 
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
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot-tools_2025.04.bb
rename to meta/recipes-bsp/u-boot/u-boot-tools_2025.07.bb
meta/recipes-bsp/u-boot/u-boot_2025.07.bb renamed from meta/recipes-bsp/u-boot/u-boot_2025.04.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/u-boot/u-boot_2025.04.bb
rename to meta/recipes-bsp/u-boot/u-boot_2025.07.bb
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Can you have a look at these failures please?

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#2 lore raw

Hi Mathieu,

Quoted 21 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Quoted 6 lines

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

#3 lore raw
Quoted 27 lines · Fabio Estevam

Hi Mathieu,

Quoted 23 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

Quoted 8 lines
Quoted 4 lines

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Signature · 1 line
Tom
#4 lore raw
Quoted 31 lines · Tom Rini
Quoted 30 lines · Fabio Estevam

Hi Mathieu,

Quoted 26 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Hi,

It's not so easy to reproduce, as it looks like it is somehow linked with the host environment: this have been failing on debian workers but not on the fedora ones.
So basic instructions are below, but this was not enough to reproduce it in the ubuntu 24.4 docker I've been using so far.

git clone git://git.yoctoproject.org/poky-ci-archive -b autobuilder.yoctoproject.org/valkyrie/a-full-1972 cd poky-ci-archive
. oe-init-build-env

Add following lines in conf/local.conf (I bet only the last one is really needed, but let's try to be as close as possible as the autobuilder configuration):
MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm"
RPM_GPG_SIGN_CHUNK = '1'
IMAGE_INSTALL:append = ' ssh-pregen-hostkeys' SANITY_TESTED_DISTROS = ''

Add poky-ci-archive/meta-selftest in conf/bblayers.conf.

And finally, run the tests:
oe-selftest -r fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image oe-selftest -r fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image

Signature · 3 lines
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw
Quoted 63 lines · Mathieu Dubois-Briand
Quoted 31 lines · Tom Rini
Quoted 30 lines · Fabio Estevam

Hi Mathieu,

Quoted 26 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Hi,

It's not so easy to reproduce, as it looks like it is somehow linked with the host environment: this have been failing on debian workers but not on the fedora ones.
So basic instructions are below, but this was not enough to reproduce it in the ubuntu 24.4 docker I've been using so far.

git clone git://git.yoctoproject.org/poky-ci-archive -b autobuilder.yoctoproject.org/valkyrie/a-full-1972 cd poky-ci-archive
. oe-init-build-env

Add following lines in conf/local.conf (I bet only the last one is really needed, but let's try to be as close as possible as the autobuilder configuration):
MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm"
RPM_GPG_SIGN_CHUNK = '1'
IMAGE_INSTALL:append = ' ssh-pregen-hostkeys' SANITY_TESTED_DISTROS = ''

Quoted 5 lines

Add poky-ci-archive/meta-selftest in conf/bblayers.conf.

And finally, run the tests:
oe-selftest -r fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image oe-selftest -r fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image

Yeah, looking at the logs it's not even Debian, it's Ubuntu 22.04, which is what we use for our CI too. I guess I would suggest bisect'ing with the autobuilder until finding out what commit breaks and then someone from the U-Boot side of things can chime in.

Signature · 1 line
Tom
#6 lore raw

Hi,

Adding Ilias,

Quoted 66 lines · Tom Rini via lists.openembedded.org
Quoted 65 lines · Mathieu Dubois-Briand
Quoted 31 lines · Tom Rini
Quoted 30 lines · Fabio Estevam

Hi Mathieu,

Quoted 26 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Hi,

It's not so easy to reproduce, as it looks like it is somehow linked with the host environment: this have been failing on debian workers but not on the fedora ones.
So basic instructions are below, but this was not enough to reproduce it in the ubuntu 24.4 docker I've been using so far.

git clone git://git.yoctoproject.org/poky-ci-archive -b autobuilder.yoctoproject.org/valkyrie/a-full-1972 cd poky-ci-archive
. oe-init-build-env

Add following lines in conf/local.conf (I bet only the last one is really needed, but let's try to be as close as possible as the autobuilder configuration):
MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm"
RPM_GPG_SIGN_CHUNK = '1'
IMAGE_INSTALL:append = ' ssh-pregen-hostkeys' SANITY_TESTED_DISTROS = ''

Add poky-ci-archive/meta-selftest in conf/bblayers.conf.

Quoted 8 lines
Quoted 3 lines

And finally, run the tests:
oe-selftest -r fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image oe-selftest -r fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image

Yeah, looking at the logs it's not even Debian, it's Ubuntu 22.04, which is what we use for our CI too. I guess I would suggest bisect'ing with the autobuilder until finding out what commit breaks and then someone from the U-Boot side of things can chime in.

I've tried to reproduce this on x86_64 Ubuntu 22.04 build machine targeting qemuarm and arm64 Ubuntu 24.04 build machine targeting beaglebone. No luck so far. In my builds, lib.a has always been created in before any other linking steps happens. I presume this is a race condition where linking step of lib/efi_loader/testapp_efi.so does not actually have a dependency to the lib.a creating linking step.

I'm not familiar enough with u-boot/Kconfig build setups to see where this dependency should be added.

From do_compile log in passing case:

set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/sources/u-boot-2025.07=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...
rm -f arch/arm/lib/lib.a; arm-poky-linux-gnueabi-ar cDPrsT arch/arm/lib/lib.a arch/arm/lib/ashldi3.o arch/arm/lib/ashrdi3.o arch/arm/lib/div0.o arch/arm/lib/div64.o arch/arm/lib/lib1funcs.o arch/arm/lib/lshrdi3.o arch/arm/lib/muldi3.o arch/arm/lib/uldivmod.o
...
arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_beaglebone/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/testapp.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/testapp_efi.so

Looks like testapp_efi.so linking step is the first one using arm-poky-linux-gnueabi-ld.bfd.

Failing case:

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline

| set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/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=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...

|    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
|   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
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
| make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1

In this failing log, nothing created lib.a before lib/efi_loader/helloworld_efi.so link step started.

Cheers,

-Mikko

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Hi,

Quoted 105 lines · Mikko Rapeli via lists.openembedded.org

Adding Ilias,

Quoted 66 lines · Tom Rini via lists.openembedded.org
Quoted 65 lines · Mathieu Dubois-Briand
Quoted 31 lines · Tom Rini
Quoted 30 lines · Fabio Estevam

Hi Mathieu,

Quoted 26 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Hi,

It's not so easy to reproduce, as it looks like it is somehow linked with the host environment: this have been failing on debian workers but not on the fedora ones.
So basic instructions are below, but this was not enough to reproduce it in the ubuntu 24.4 docker I've been using so far.

git clone git://git.yoctoproject.org/poky-ci-archive -b autobuilder.yoctoproject.org/valkyrie/a-full-1972 cd poky-ci-archive
. oe-init-build-env

Add following lines in conf/local.conf (I bet only the last one is really needed, but let's try to be as close as possible as the autobuilder configuration):
MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm"
RPM_GPG_SIGN_CHUNK = '1'
IMAGE_INSTALL:append = ' ssh-pregen-hostkeys' SANITY_TESTED_DISTROS = ''

Add poky-ci-archive/meta-selftest in conf/bblayers.conf.

Quoted 8 lines
Quoted 3 lines

And finally, run the tests:
oe-selftest -r fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image oe-selftest -r fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image

Yeah, looking at the logs it's not even Debian, it's Ubuntu 22.04, which is what we use for our CI too. I guess I would suggest bisect'ing with the autobuilder until finding out what commit breaks and then someone from the U-Boot side of things can chime in.

I've tried to reproduce this on x86_64 Ubuntu 22.04 build machine targeting qemuarm and arm64 Ubuntu 24.04 build machine targeting beaglebone. No luck so far. In my builds, lib.a has always been created in before any other linking steps happens. I presume this is a race condition where linking step of lib/efi_loader/testapp_efi.so does not actually have a dependency to the lib.a creating linking step.

I'm not familiar enough with u-boot/Kconfig build setups to see where this dependency should be added.

From do_compile log in passing case:

set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/sources/u-boot-2025.07=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...
rm -f arch/arm/lib/lib.a; arm-poky-linux-gnueabi-ar cDPrsT arch/arm/lib/lib.a arch/arm/lib/ashldi3.o arch/arm/lib/ashrdi3.o arch/arm/lib/div0.o arch/arm/lib/div64.o arch/arm/lib/lib1funcs.o arch/arm/lib/lshrdi3.o arch/arm/lib/muldi3.o arch/arm/lib/uldivmod.o
...
arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_beaglebone/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/testapp.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/testapp_efi.so

Looks like testapp_efi.so linking step is the first one using arm-poky-linux-gnueabi-ld.bfd.

Failing case:

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline

| set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/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=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...

Quoted 7 lines
|    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
|   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
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
| make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1

In this failing log, nothing created lib.a before lib/efi_loader/helloworld_efi.so link step started.

I managed to reproduce the problem with an artificial delay:

scripts/Makefile.build +1 -1
@@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE
 #
 ifdef lib-target
 quiet_cmd_link_l_target = AR      $@
-cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@ && echo "HACK, delaying build!" && sleep 60 && $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
 
 $(lib-target): $(lib-y) FORCE
        $(call if_changed,link_l_target)

and fix for this seems to be:

scripts/Makefile.lib +1 -1
@@ -508,7 +508,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
        $(call cmd,force_checksrc)
        $(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+$(obj)/%_efi.so: $(PLATFORM_LIBGCC) $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
        $(call cmd,efi_ld)
 
 targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o

I sent this to u-boot list but it seems my message is in moderator queue. Fabio was on Cc: so maybe you can pick this up for a new revision of u-boot update to oe-core. It should fix the race condition.

Cheers,

-Mikko

#9 lore raw
Quoted 145 lines · Mikko Rapeli

Hi,

Quoted 105 lines · Mikko Rapeli via lists.openembedded.org

Adding Ilias,

Quoted 66 lines · Tom Rini via lists.openembedded.org
Quoted 65 lines · Mathieu Dubois-Briand
Quoted 31 lines · Tom Rini
Quoted 30 lines · Fabio Estevam

Hi Mathieu,

Quoted 26 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO - fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image (subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Hi,

It's not so easy to reproduce, as it looks like it is somehow linked with the host environment: this have been failing on debian workers but not on the fedora ones.
So basic instructions are below, but this was not enough to reproduce it in the ubuntu 24.4 docker I've been using so far.

git clone git://git.yoctoproject.org/poky-ci-archive -b autobuilder.yoctoproject.org/valkyrie/a-full-1972 cd poky-ci-archive
. oe-init-build-env

Add following lines in conf/local.conf (I bet only the last one is really needed, but let's try to be as close as possible as the autobuilder configuration):
MACHINE = "qemux86-64"
DISTRO = "poky"
SDKMACHINE = "x86_64"
PACKAGE_CLASSES = "package_rpm"
RPM_GPG_SIGN_CHUNK = '1'
IMAGE_INSTALL:append = ' ssh-pregen-hostkeys' SANITY_TESTED_DISTROS = ''

Add poky-ci-archive/meta-selftest in conf/bblayers.conf.

Quoted 8 lines
Quoted 3 lines

And finally, run the tests:
oe-selftest -r fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image oe-selftest -r fitimage.UBootFitImageTests.test_sign_standalone_uboot_atf_tee_fit_image

Yeah, looking at the logs it's not even Debian, it's Ubuntu 22.04, which is what we use for our CI too. I guess I would suggest bisect'ing with the autobuilder until finding out what commit breaks and then someone from the U-Boot side of things can chime in.

I've tried to reproduce this on x86_64 Ubuntu 22.04 build machine targeting qemuarm and arm64 Ubuntu 24.04 build machine targeting beaglebone. No luck so far. In my builds, lib.a has always been created in before any other linking steps happens. I presume this is a race condition where linking step of lib/efi_loader/testapp_efi.so does not actually have a dependency to the lib.a creating linking step.

I'm not familiar enough with u-boot/Kconfig build setups to see where this dependency should be added.

From do_compile log in passing case:

set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/sources/u-boot-2025.07=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/home/mcfrisk/src/base/repo/poky/build_beaglebone/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...
rm -f arch/arm/lib/lib.a; arm-poky-linux-gnueabi-ar cDPrsT arch/arm/lib/lib.a arch/arm/lib/ashldi3.o arch/arm/lib/ashrdi3.o arch/arm/lib/div0.o arch/arm/lib/div64.o arch/arm/lib/lib1funcs.o arch/arm/lib/lshrdi3.o arch/arm/lib/muldi3.o arch/arm/lib/uldivmod.o
...
arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_beaglebone/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/testapp.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/testapp_efi.so

Looks like testapp_efi.so linking step is the first one using arm-poky-linux-gnueabi-ld.bfd.

Failing case:

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline

| set -e; mkdir -p include/generated/; (echo \#define PLAIN_VERSION \"2025.07\"; echo \#define U_BOOT_VERSION \"U-Boot \" PLAIN_VERSION; echo \#define U_BOOT_VERSION_NUM 2025; echo \#define U_BOOT_VERSION_NUM_PATCH $(echo 07 | sed -e "s/^0*//"); echo \#define HOST_ARCH 0x00a7; echo \#define CC_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-gcc --sysroot=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot -ffile-prefix-map=/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=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/build=/usr/src/debug/u-boot/2025.07 -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot= -ffile-prefix-map=/srv/pokybuild/yocto-worker/oe-selftest-armhost/build/build-st-3119200/tmp/work/beaglebone_yocto-poky-linux-gnueabi/u-boot/2025.07/recipe-sysroot-native= --version | head -n 1)\"; echo \#define LD_VERSION_STRING \"$(LC_ALL=C arm-poky-linux-gnueabi-ld.bfd --version | head -n 1)\"; ) < include/config/uboot.release > include/generated/version_autogenerated.h.tmp; if [ -r include/generated/version_autogenerated.h ] && cmp -s include/generated/version_autogenerated.h include/generated/version_autogenerated.h.tmp; then rm -f include/generated/version_autogenerated.h.tmp; else : ' UPD include/generated/version_autogenerated.h'; mv -f include/generated/version_autogenerated.h.tmp include/generated/version_autogenerated.h; fi
...

Quoted 7 lines
|    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
|   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
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
| make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1

In this failing log, nothing created lib.a before lib/efi_loader/helloworld_efi.so link step started.

I managed to reproduce the problem with an artificial delay:

scripts/Makefile.build +1 -1
@@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE
 #
 ifdef lib-target
 quiet_cmd_link_l_target = AR      $@
-cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@ && echo "HACK, delaying build!" && sleep 60 && $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
 
 $(lib-target): $(lib-y) FORCE
        $(call if_changed,link_l_target)

and fix for this seems to be:

scripts/Makefile.lib +1 -1
@@ -508,7 +508,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
        $(call cmd,force_checksrc)
        $(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+$(obj)/%_efi.so: $(PLATFORM_LIBGCC) $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
        $(call cmd,efi_ld)
 
 targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
Quoted 3 lines

I sent this to u-boot list but it seems my message is in moderator queue. Fabio was on Cc: so maybe you can pick this up for a new revision of u-boot update to oe-core. It should fix the race condition.

I cleared you patch (and moderation flag) but I don't think the above works in all cases since PLATFORM_LIBGCC can have a number of values only one of which is that file.

Signature · 1 line
Tom
#10 lore raw

Re: [PATCH] scripts/Makefile.lib: fix *_efi.so dependency to PLATFORM_LIBGCC

Hi, moving patch review from oe-core list to u-boot:

On Thu, Jul 10, 2025 at 08:59:03AM -0600, Tom Rini wrote:
<snip>

Quoted 3 lines

I cleared you patch (and moderation flag) but I don't think the above works in all cases since PLATFORM_LIBGCC can have a number of values only one of which is that file.

Right. Should I make the dependency conditional to CONFIG_USE_PRIVATE_LIBGCC like it's set in Makefile?

I don't see another variable for lib.a to use in
scripts/Makefile.lib

Cheers,

-Mikko

Quoted 62 lines · Mikko Rapeli

When PLATFORM_LIBGCC was added to linker command it was not
added to the dependency of the .so rule. Thus a build can try
to link *_efi.so files before PLATFORM_LIBGCC lib.a is available. This was seen in yocto autobuilder builds with u-boot 2025.07 update, see https://lists.openembedded.org/g/openembedded-core/message/220004

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline

|    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
|   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
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
| make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1

The issue is hard to reproduce but this change can artificially trigger it:

--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build

scripts/Makefile.build +1 -1
@@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE
 #
 ifdef lib-target
 quiet_cmd_link_l_target = AR      $@
-cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@ && echo "HACK, delaying build!" && sleep 60 && $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
 
 $(lib-target): $(lib-y) FORCE
        $(call if_changed,link_l_target)

Then run a rebuild with:

$  rm -f $( find build/ -name lib.a -or -name helloworld_efi.so ) && \
   make
...
  arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_bea
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
arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1
Fixes 43d43241d1c9 ("scripts/Makefile.lib: add PLATFORM_LIBGCC to efi linking")
Cc Adriano Cordova <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
index e89a4a51b74d..54e17b2f8089 100644
@@ -508,7 +508,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
 	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+$(obj)/%_efi.so: $(PLATFORM_LIBGCC) $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
 	$(call cmd,efi_ld)
 
 targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
Signature · 1 line
2.43.0
#11 lore raw

Re: [PATCH] scripts/Makefile.lib: fix *_efi.so dependency to PLATFORM_LIBGCC

Quoted 8 lines · Mikko Rapeli

Hi, moving patch review from oe-core list to u-boot:

On Thu, Jul 10, 2025 at 08:59:03AM -0600, Tom Rini wrote:
<snip>

Quoted 3 lines

I cleared you patch (and moderation flag) but I don't think the above works in all cases since PLATFORM_LIBGCC can have a number of values only one of which is that file.

Quoted 5 lines

Right. Should I make the dependency conditional to CONFIG_USE_PRIVATE_LIBGCC like it's set in Makefile?

I don't see another variable for lib.a to use in
scripts/Makefile.lib

Yes, that's my first thought as well. But that might also fail when CC_COVERAGE is enabled. So you might need to adjust that logic too.

Signature · 1 line
Tom
#12 lore raw
In reply to Tom Rini
Quoted 35 lines · Tom Rini
Quoted 34 lines · Fabio Estevam

Hi Mathieu,

Quoted 30 lines · Mathieu Dubois-Briand
Quoted 4 lines · Fabio Estevam via lists.openembedded.org

Upgrade to U-Boot 2025.07.

---

Hi Fabio,

Thanks for your patch.

It looks like this is breaking selftests on the autobuilder:

2025-07-08 07:43:52,116 - oe-selftest - INFO -
fitimage.UBootFitImageTests.test_sign_cascaded_uboot_fit_image
(subunit.RemotedTestCase)
2025-07-08 07:43:52,118 - oe-selftest - INFO -  ... FAIL

...
ERROR: u-boot-1_2025.07-r0 do_compile: oe_runmake failed
...

Quoted 2 lines

arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a:
No such file or directory

Both on debian and armhost:

https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/1923
https://autobuilder.yoctoproject.org/valkyrie/#/builders/23/builds/2077

Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Can you have a look at these failures please?

Thanks for the report.

I am adding some folks on CC in case they have some ideas.

Interesting. How can we trigger that outside of the autobuilder?

Probably this is not related to the fit image tests as such. It's probably just u-boot it self which does no longer compile.

The test generates a local.conf file like this:
https://git.yoctoproject.org/poky/tree/meta/lib/oeqa/selftest/cases/fitimage.py#n1414

and then it runs:

bitbake u-boot

Running the test as it runs on the AB should be possible like this:

# Start with a clean, default local.conf
git clone https://git.yoctoproject.org/poky
cd poky
. oe-init-build-env

cat << EOF >> $BUILDDIR/conf/local.conf

# oe-selftest requies that
SANITY_TESTED_DISTROS = ""

# Use Yocto's public sstate-cache BB_HASHSERVE_UPSTREAM = 'wss://hashserv.yoctoproject.org/ws' SSTATE_MIRRORS ?= "file://.*
http://sstate.yoctoproject.org/all/PATH;downloadfilename=PATH"
EOF

oe-selftest -v -K -r fitimage.UBootFitImageTests.test_uboot_fit_image

The detailed log file is here:
$BUILDDIR/tmp/log/oe-selftest-results.log

Adrian

#13 lore raw

PATCH 1/1 scripts/Makefile.lib: fix *_efi.so dependency to PLATFORM_LIBGCC

When PLATFORM_LIBGCC was added to linker command it was not
added to the dependency of the .so rule. Thus a build can try
to link *_efi.so files before PLATFORM_LIBGCC lib.a is available. This was seen in yocto autobuilder builds with u-boot 2025.07 update, see https://lists.openembedded.org/g/openembedded-core/message/220004

https://autobuilder.yoctoproject.org/valkyrie/api/v2/logs/2914600/raw_inline

|    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
|   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
| arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
| make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1

The issue is hard to reproduce but this change can artificially trigger it:

--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -353,7 +353,7 @@ $(modorder-target): $(subdir-ym) FORCE
#
ifdef lib-target
quiet_cmd_link_l_target = AR $@
-cmd_link_l_target = rm -f $@; $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)
+cmd_link_l_target = rm -f $@ && echo "HACK, delaying build!" && sleep 60 && $(AR) cDPrsT$(KBUILD_ARFLAGS) $@ $(lib-y)

$(lib-target): $(lib-y) FORCE

        $(call if_changed,link_l_target)

Then run a rebuild with:

$  rm -f $( find build/ -name lib.a -or -name helloworld_efi.so ) && \
   make
...
  arm-poky-linux-gnueabi-ld.bfd -nostdlib -zexecstack -znocombreloc -znorelro --no-warn-rwx-segments -L /home/mcfrisk/src/base/repo/poky/build_bea
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
arm-poky-linux-gnueabi-ld.bfd: cannot find arch/arm/lib/lib.a: No such file or directory
make[3]: *** [scripts/Makefile.lib:512: lib/efi_loader/helloworld_efi.so] Error 1
Fixes 43d43241d1c9 ("scripts/Makefile.lib: add PLATFORM_LIBGCC to efi linking")
Cc Adriano Cordova <[email protected]>
Cc Fabio Estevam <[email protected]>
---
 scripts/Makefile.lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
scripts/Makefile.lib +1 -1
index e89a4a51b74d..54e17b2f8089 100644
@@ -508,7 +508,7 @@ $(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcoun
 	$(call cmd,force_checksrc)
 	$(call if_changed_rule,cc_o_c)
 
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+$(obj)/%_efi.so: $(PLATFORM_LIBGCC) $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
 	$(call cmd,efi_ld)
 
 targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
Signature · 1 line
2.43.0