2644 Commits

Author SHA1 Message Date
Mikko Rapeli
d0075e2d73 Makefile: add dependency from lib to arch/$(ARCH)/lib
Top level Makefile starts separate "make" processes for each each
subdirectory. lib/efi_loader apps now depend on lib.a from
arch/$(ARCH)/lib if CONFIG_USE_PRIVATE_LIBGCC is enabled which creates
a race conditions since dependency from lib/efi_loader EFI apps to
arch/$(ARCH)/lib/lib.a is not explicit:

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/testapp_efi.so] Error 1

This error was seen on yocto/OE-core CI builds after u-boot 2025.07 update:

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_confo
rmance.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 different "make" processes share common scripts/Makefile.build
and scripts/Makefile.libs but since they are separate processes
the Makefile rules can't add a dependency from lib/uefi_loader targets
to arch/$(ARCH)/lib/lib.a. Or the file level dependency can be added but
then "make" produces a too sparse error message which does not mention
that one of the dependencies like arch/$(ARCH)/lib/lib.a was not found:

make[3]: *** No rule to make target 'lib/efi_loader/helloworld.efi', needed by '__build'.  Stop.

Fix this dependency problem by building arch/$(ARCH)/lib before lib
if CONFIG_USE_PRIVATE_LIBGCC was enabled.

To reproduce the race condition more reliably, add a "sleep 10" delay
before linker command cmd_link_l_target with 2025.07
or to $(lib-target): target in scripts/Makefile.build with master branch
after Kbuild update.

Fixes: 43d43241d1c9 ("scripts/Makefile.lib: add PLATFORM_LIBGCC to efi linking")

Cc: Adriano Cordova <adrianox@gmail.com>
Cc: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
2025-08-01 10:56:22 -06:00
Tom Rini
182cb30084 Prepare v2025.10-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-28 18:23:01 -06:00
Simon Glass
2ea9579523 efi: Rename the lib/efi directory
This directory was created when U-Boot gained the ability to run as an
EFI app in 2015. Since then the EFI-loader feature has been added.

The code in lib/efi is not actually used by the loader, so the name is
confusing.

Rename the directory to efi_client to indicate that it includes files
just for U-Boot being a client of EFI, i.e. the EFI app and stub.

Signed-off-by: Simon Glass <sjg@chromium.org>
2025-07-26 07:29:31 +02:00
Mark Kettenis
bd0ade7d09 kbuild: Don't mandate gcc as the host compiler
Systems that use clang may not have gcc installed.  Set
HOSTCC to cc and HOSTCXX to c++ like we did before to make those
systems work again.

Fixes: 5f520875bdf0 ("kbuild: Bump the build system to 5.1")
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
2025-07-18 12:22:24 -06:00
Yao Zi
e80998a77b kbuild: Avoid including architecture-specific Makefile twice
Stranges errors are observed when building U-Boot master for almost any
RISC-V board, the messages are in two types, one is about duplicated
symbols,

	u-boot/arch/riscv/cpu//mtrap.S:32: multiple definition of `trap_entry';
	arch/riscv/cpu/mtrap.o: u-boot/arch/riscv/cpu//mtrap.S:32: first defined here

and the other is fixdep's complaint about missing dependency files,

	fixdep: error opening file: arch/riscv/cpu/.mtrap.o.d: No such file or directory
	fixdep: error opening file: arch/riscv/cpu//.start.o.d: No such file or directory

where the latter could only be reproduced when building parallelly.

Both the two types of errors are about files in arch/riscv/cpu, and
there's a suspicious slash character in the reported path. Looking
through RISC-V-specific Makefiles, there's only one place that may
expand to such a path,

	libs-y += arch/riscv/cpu/$(CPU)/

The right hand expands to "arch/riscv/cpu//" if $(CPU) isn't defined at
the time of including. With some debug statement added to
arch/riscv/Makefile, the output proves that arch/riscv/Makefile is
included twice, once with $(CPU) undefined and once defined correctly
according to CONFIG_SYS_CPU.

Futher bisecting shows an extra include statement against
arch/$(SRCARCH)/Makefile is added in earlier bump of Kbuild system. But
the statement is evaluated before config.mk is included and definition
of $(CPU), causing objects in arch/riscv/cpu/ are built and linked twice
(once as "arch/riscv/cpu/*", and once as "arch/riscv/cpu//*"), resulting
in the error.

Let's simply remove the extra include to fix these nasty errors. For
config targets, bumping Kbuild also introduced a new include to
arch/$(SRCARCH)/Makefile, which is removed as well for consistency.

Fixes: 5f520875bdf ("kbuild: Bump the build system to 5.1")
Signed-off-by: Yao Zi <ziyao@disroot.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Bryan Brattlof <bb@ti.com>
2025-07-12 09:49:26 -06:00
Magnus Damm
39b836d898 makefile: Adjust distclean to remove .binman_stamp file
Remove the .binman_stamp file during distclean

Signed-off-by: Magnus Damm <damm@opensource.se>
2025-07-10 08:41:20 -06:00
Tom Rini
1930a7df10 fit-dtb.blob.gz: Pass "-n" to gzip
Sometimes when building a platform such as imx28_btt3 we can get an
error such as:

gzip: fit-dtb.blob: warning: file timestamp out of range for gzip format
make[1]: *** [Makefile:1219: fit-dtb.blob.gz] Error 2
make[1]: *** Deleting file 'fit-dtb.blob.gz'
make: *** [Makefile:186: sub-make] Error 2

This is typically resolved by telling gzip to ignore the timestamp.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-08 18:15:20 -06:00
Manorit Chawdhry
29be3d7d05 Makefile: Fix of_list_dirs with EXT_DTB
EXT_DTB overrides the of_list_dirs that is passed to binman during
builds. This causes binman to not find the normal DTB paths and instead
it just is able to use the path for EXT_DTB only.

Add the default of_list_dirs that is used for normal binman builds to
EXT_DTB usecase as well.

Signed-off-by: Manorit Chawdhry <m-chawdhry@ti.com>
Reviewed-by: Aniket Limaye <a-limaye@ti.com>
2025-07-08 16:19:31 -06:00
Tom Rini
9be6c5f967 Merge patch series "kbuild: Update Makefile.extrawarn to 5.1"
This series from Ilias Apalodimas <ilias.apalodimas@linaro.org> largely
finishes the re-sync with the Linux Kernel v5.1 kbuild system.

Link: https://lore.kernel.org/r/20250627185723.342553-1-ilias.apalodimas@linaro.org
2025-07-08 13:10:12 -06:00
Ilias Apalodimas
5f520875bd kbuild: Bump the build system to 5.1
Our last sync with the kernel was 5.1. Even that was a partial one
as some patches from 4.x kernels were already missing making the
transition to a modern kbuild infeasible.

We are so out of sync now, that tracking the patches and backporting
them one by one makes little sense and it's going to take ages.

This is an attempt to sync up Makefile[.lib/.kbuild].
Unfortunately due to sheer amount of patches this is not easy to review,
but that's what we decided during a community call.

One of the biggest changes is get rid of partial linking entirely and
build .a archives isntead of .o.
We diaviate from the kernel on that. Instead of calling a custom script
to create the archive symbol table, we call ar with rcTP (isntead of
rcSTP) since we want a resulting archive that's sauble with the linker.

The only affected platforms are PPC ones. Unfortunately I don't have any
of them around to test, but the objdump of the resulting files --
arch/powerpc/lib/built-in.[oa] looks identical.

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-07-08 13:10:03 -06:00
Tom Rini
6d0b8874fd Merge branch 'next' 2025-07-07 14:10:59 -06:00
Tom Rini
e37de002fa Prepare v2025.07
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-07-07 09:48:28 -06:00
Tom Rini
184e7d0bb2 Prepare v2025.07-rc5
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmhZtLAACgkQFHw5/5Y0
 tyyl/gv+LLsF/PdBp93gXaUVFQwh3lrAWltjK6n+gKDpIazlX8Ajiu2tFBzYgBdP
 JNp3PsHJ8ER/GpU4nG/13KfWg8c4CGvAqY0zLxKufMckBdZAE5EwztvSNzZKZA6f
 5FQCecidpwlWBNZRWVbxAAtl83nGBwUmgPAoxDBv4I7DQBJD7mJfzxVnWZuwSioP
 ix3aingjRSIUpldHR5IAQfEmnPPfv7IS6EYb2lOoV22WtTfnF6bpteR/2OUxnW6z
 YxXHaZrDkIfE+gXYOQu5Tau8R0ca4l+ws8GaocTD9VVCDem8JU7b0GCfoXg+ry2Q
 dLYuROREeiXEi14I6arZznpPQM8iIAeDOy0w5b3qXbav0+GWB4rmJKLMniD5JT2r
 r8Kle/QeagILMVPOaUVgjmkEnft4thD14ipvr8kUCurUh1VtFYWTGzKVS47yHaxY
 I1zQaz1NNdtyQNWO/Nwbs+88C7v8q7DeLIIjUt2/J01Bu8ouf2WyfG04iBeZOitt
 CxBZ++2z
 =e4ez
 -----END PGP SIGNATURE-----

Merge tag 'v2025.07-rc5' into next

Prepare v2025.07-rc5

With this merge, tighten up the LTO_FLAGS removal we added to not
trigger on ARMv7 (which is Thumb-2 and should be fine).
2025-06-23 16:15:23 -06:00
Tom Rini
fb4a488eb9 Prepare v2025.07-rc5
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-23 14:10:06 -06:00
Tom Rini
dbf7fd557a Merge patch series "Consistent Kconfig environment options CONFIG_ENV_ prefix"
Marek Vasut <marek.vasut+renesas@mailbox.org> says:

Rename the environment related variables and add ENV_ prefix, so that
all configuration options which are related to environment would have
an CONFIG_ENV_ prefix. No functional change.

Link: https://lore.kernel.org/r/20250609192701.20260-1-marek.vasut+renesas@mailbox.org
2025-06-20 12:57:47 -06:00
Marek Vasut
fb5235239a env: Rename DEFAULT_ENV_FILE to ENV_DEFAULT_ENV_TEXT_FILE
Rename the variable and add ENV_ prefix, so that all configuration
options which are related to environment would have an CONFIG_ENV_
prefix. No functional change.

Also rename USE_DEFAULT_ENV_FILE to USE_ENV_DEFAULT_ENV_TEXT_FILE .

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2025-06-20 12:15:08 -06:00
Bryan Brattlof
52c0290526 binman: add atf-bl1 to etypes
Some SoCs require a Trusted Firmware-A (TF-A) AP Trusted ROM (BL1) to
initialize the SoC before U-Boot can run properly. Add an atf-bl1 etype
so we can properly package BL1 into a final binary

Signed-off-by: Bryan Brattlof <bb@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
2025-06-12 13:22:23 -06:00
Ilias Apalodimas
070b81458a kbuild: fix single target build for external module
Backported from kernel
commit e07db28eea38 ("kbuild: fix single target build for external module")

It's worth noting that crmodverdir is empty for U-Boot.
Just backport it to make diffing easier

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
45acf56e59 kbuild: make 'archprepare' depend on 'scripts'
Backported from kernel
commit 059bc9fc375e ("kbuild: make 'archprepare' depend on 'scripts'")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
4a247d1376 kbuild: mark prepare0 as PHONY to fix external module build
Backported from kernel
commit e00d88804814 ("kbuild: mark prepare0 as PHONY to fix external module build")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
27529f1cb0 kbuild: skip parsing pre sub-make code for recursion
Backported from kernel
commit 221cc2d27ddc ("kbuild: skip parsing pre sub-make code for recursion")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
d1b6489ef1 kbuild: do not overwrite .gitignore in output directory
Backported from kernel
commit 156e7cbb3ef5 ("kbuild: do not overwrite .gitignore in output directory")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
057a53b570 gcc-9: silence 'address-of-packed-member' warning
Backported from kernel
commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member' warning")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
931f04a85a kbuild: remove meaningless prepare2 target
Backported from kernel
commit 4f1c1008e786 ("kbuild: remove meaningless prepare2 target")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
156fdc57f7 kbuild: gitignore output directory
Backported from kernel
commit 3a51ff344204 ("kbuild: gitignore output directory"

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
c4a52fbb67 kbuild: use -Werror=implicit-... instead of -Werror-implicit-...
Backported from kernel
commit b89f25ea7892 ("kbuild: use -Werror=implicit-... instead of -Werror-implicit-..."

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
3991f85e4c kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD
Backported from kernel
commit ad15006cc784 ("kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
0ebda5f1f0 kbuild: add -Werror=implicit-int flag unconditionally
Backported from kernel
commit 61a0902a06d6a ("kbuild: add -Werror=implicit-int flag unconditionally")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Ilias Apalodimas
7e81e690d7 kbuild: add -fno-PIE flag unconditionally
Backport from kernel
commit 42a92bccd213 ("kbuild: add -fno-PIE flag unconditionally")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-06-11 16:21:36 -06:00
Tom Rini
59d00e20fc Prepare v2025.07-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmhHWBoACgkQFHw5/5Y0
 tyxXAQv/T9LMNIwewuJ3EsJavypFdXb1p33PmbRELYK8S96CpTBBJXCoDAc6+Xfu
 ilUES9Weml8Ott+L3CbJTUtohLRfrWZGW6cx8/nYOhhUFWDqkCdpWGnEFPM0Basp
 lyBBxzqxPH5TbUQPUnhJ/2n1LclaF7tehn7GwDQUdQRsAc3fsJr+4Yx+TjeY30YQ
 CcYC+AvJ/M0ev2EmHNsZZGY9xJi67KdHLHNx6cEJ714BZihIu4EShVk7yvI9zM7O
 /hd4S10VGqHltB1KCRfnbfSD68rzS2h2TI4QZg3Ye8ldU+ZCFeTeNhBgO89VMoh9
 2HhQxxvfGDyuUsmoThUHZGvdq2EmRcyIKjRteQzFhrJr2Gk905vdpIGQdej8EG1x
 w6okxdFOWEOXTMShHv72Gcx8PzTVFtTUcYYge7N85rVirZpZmBKvaFzBCfrZ6gEh
 x0n7o5LaZwc1jm8yuPiWZcCKi0Ve4AIXBjweQRXJ/A6Y0Z/vEYYybPKMRRTuNpSy
 OyXQK8/y
 =uKu6
 -----END PGP SIGNATURE-----

Merge tag 'v2025.07-rc4' into next

Prepare v2025.07-rc4
2025-06-09 16:28:28 -06:00
Tom Rini
d7c449c3d8 Prepare v2025.07-rc4
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-06-09 15:54:18 -06:00
Tom Rini
6b749d09c0 Merge patch series "Update kbuild"
Ilias Apalodimas <ilias.apalodimas@linaro.org> says:

Last time the kbuild scripts were synced with the Linux kernel was on the
4.20 release. Updating directly to 6.x makes the diff difficult to read, so
let's do the changes incrementally and bump to 5.1 first.

Since the number of commits is big, I am splitting this in multiple series.
This one includes most of the commits for Makefile.build,
Makefile.lib and some from Makefile.

commit eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally")
commit 3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")
commit b421b8a6cb87 ("kbuild: remove unused archmrproper")
commit 1a49b2fd8f58 ("kbuild: strip whitespace in cmd_record_mcount findstring")
commit 88110713ca9dfb ("kbuild: hardcode genksyms path and remove GENKSYMS variable")
commit 1d8001ef358 ("kbuild: generate modules.order only when CONFIG_MODULES=y")
commit 45c4372d00 ("kbuild: refactor quiet_modtag")
commit b39a691617e4 commit ("kbuild: remove redundant quiet_modtag for $(obj-m)")
commit 5439f09f488f ("kbuild: remove redundant 'set -e' from cmd_* defines")
commit e5d289100d3a ("kbuild: remove trailing semicolon from cmd_* passed to if_changed_rule")
commit 3a2429e1faf4 ("kbuild: change if_changed_rule for multi-line recipe")
commit ee3e46b7efd2 ("kbuild: refactor modversions build rules")
commit 4317ee3b6a5e ("kbuild: remove redundant 'set -e' from sub_cmd_record_mcount")
commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files")
commit 898f5a009f22 ("kbuild: move archive command to scripts/Makefile.lib")
commit b79c6aa6a1f1 ("kbuild: remove unnecessary in-subshell execution")
commit afa974b77128 ("kbuild: add real-prereqs shorthand for $(filter-out FORCE,$^)")
commit ecbd10d90e94 ("kbuild: simplify rules of data compression with size appending")
commit 58156ba4468f ("kbuild: skip 'addtree' and 'flags' magic for external module build")
commit 172caf1993b7 ("kbuild: remove redundant target cleaning on failure")
commit f3fd4a3f3a38 ("kbuild: remove redundant 'set -e' from filechk_offsets")
commit a2237fec1e06 ("kbuild: Enable dtc graph_port warning by default")
commit 70523a3ce5ff ("kbuild: disable dtc simple_bus_reg warnings by default")
commit e4aca4595005 ("kbuild: de-duplicate fixdep usage")

Link: https://lore.kernel.org/r/20250520052153.307194-1-ilias.apalodimas@linaro.org
2025-05-29 18:43:15 -06:00
Ilias Apalodimas
0128b2cf4d kbuild: add -Werror=strict-prototypes flag unconditionally
Backported from kernel
commit eeb5687a7139649e ("kbuild: add -Werror=strict-prototypes flag unconditionally")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-05-29 18:42:38 -06:00
Ilias Apalodimas
af1a993570 kbuild: make -r/-R effective in top Makefile for old Make versions
Backported from kernel
commit 3812b8c5c5d5 ("kbuild: make -r/-R effective in top Makefile for old Make versions")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-05-29 18:42:38 -06:00
Ilias Apalodimas
0719c79e09 kbuild: remove unused archmrproper
Backported from kernel
commit b421b8a6cb87 ("kbuild: remove unused archmrproper")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-05-29 18:42:38 -06:00
Ilias Apalodimas
cc571e29a8 kbuild: let fixdep directly write to .*.cmd files
Backport from kernel
commit 392885ee82d3 ("kbuild: let fixdep directly write to .*.cmd files")

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-05-29 18:42:37 -06:00
Tom Rini
2ca1398a5e Prepare v2025.07-rc3
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-26 16:02:19 -06:00
Tom Rini
cf37480bc8 Prepare v2025.07-rc2
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-05-12 14:33:38 -06:00
Tom Rini
a865d1d254 doc: pytest: Framework for documenting tests and document test_000_version
In order to easily document pytests, we need to include the autodoc
extension. We also need to make sure that for building the docs, CI
includes pytest and that we have PYTHONPATH configured such that it will
find all of the tests and related files. Finally, we need to have our
comments in the test file by in proper pydoc format in order to be
included in the output.

Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2025-05-11 12:52:56 +02:00
Ben Wolsieffer
03f5101ff5 Add HOST_ARCH detection for armv5tel and armv6l
Since 7506c15, HOST_ARCH is now used by the EFI loader even when
CONFIG_SANDBOX is disabled. When cross-compiling, the Makefile defines
HOST_ARCH based on the cross-compiler prefix, but this definition fails
to cover some common compiler prefixes. When cross-compiling U-Boot in
nixpkgs, we use CROSS_COMPILE=armv6l-unknown-linux-gnueabihf-, which
results in HOST_ARCH being undefined and causes a build failure.

Fix this by adding armv6l to the match for ARM. Also add armv5tel,
as this is another possible ARM compiler prefix.

Signed-off-by: ZHANG Yuntian <yt@radxa.com>
Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
2025-05-05 14:16:54 -06:00
Alice Guo
8ebbf29926 Makefile: add some files to CLEAN_FILES
When building the flash.bin of i.MX95 with binman,
mkimage.imx-boot.spl, mkimage.imx-boot.u-boot,
mkimage-out.imx-boot.spl and mkimage-out.imx-boot.u-boot are created.
Add these files to CLEAN_FILES so that they can be removed when running
"make clean".

Signed-off-by: Alice Guo <alice.guo@nxp.com>
2025-05-03 16:55:32 -03:00
Tom Rini
b249e08ec9 Prepare v2025.07-rc1
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-28 15:39:42 -06:00
Ilias Apalodimas
739ad58dbe efi_loader: Moved the generated ESL file to objtree
Tom reports that generating the ESL file we need for authenticated
capsule updates fails to work on azure which expects a RO git tree.

Move it to $(objtree)

Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-13 08:09:17 -06:00
Tom Rini
407d68638f Merge patch series "Switch to using $(PHASE_) in Makefiles"
Tom Rini <trini@konsulko.com> says:

This series switches to always using $(PHASE_) in Makefiles when
building rather than $(PHASE_) or $(XPL_). It also starts on documenting
this part of the build, but as a follow-up we need to rename
doc/develop/spl.rst and expand on explaining things a bit.

Link: https://lore.kernel.org/r/20250401225851.1125678-1-trini@konsulko.com
2025-04-11 12:16:49 -06:00
Tom Rini
302b41d539 Kbuild: Always use $(PHASE_)
It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
Makefiles as part of the macros to determine when to do something in our
Makefiles based on what phase of the build we are in. For consistency,
bring this down to a single macro and use "$(PHASE_)" only.

Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-11 12:16:44 -06:00
Ilias Apalodimas
fd58c275f6 efi_loader: Move public cert for capsules to .rodata
commit ddf67daac39d ("efi_capsule: Move signature from DTB to .rodata")
was reverted in
commit 47a25e81d35c ("Revert "efi_capsule: Move signature from DTB to .rodata"")
because that's what U-Boot was usually doing -- using the DT to store
configuration and data. Some of the discussions can be found here [0].

(Ab)using the device tree to store random data isn't ideal though.
On top of that with new features introduced over the years, keeping
the certificates in the DT has proven to be problematic.
One of the reasons is that platforms might send U-Boot a DTB
from the previous stage loader using a transfer list which won't contain
the signatures since other loaders are not  aware of internal
U-Boot ABIs. On top of that QEMU creates the DTB on the fly, so adding
the capsule certificate there does not work and requires users to dump
it and re-create it injecting the public keys.

Now that we have proper memory permissions for arm64, move the certificate
to .rodata and read it from there.

[0] https://lore.kernel.org/u-boot/CAPnjgZ2uM=n8Qo-a=DUkx5VW5Bzp5Xy8=Wgmrw8ESqUBK00YJQ@mail.gmail.com/

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Tested-by: Jonathan Humphreys <j-humphreys@ti.com>  # on TI sk-am62p-lp
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on AML-A311D-CC
Tested-by: Raymond Mao <raymond.mao@linaro.org>
2025-04-11 13:25:31 +02:00
Tom Rini
ff61d6bfd1 Merge branch 'next'
Note that this undoes the changes of commit cf6d4535cc4c ("x86:
emulation: Disable bloblist for now") as that was intended only for the
release due to time.
2025-04-08 11:43:23 -06:00
Tom Rini
34820924ed Prepare v2025.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2025-04-07 15:57:55 -06:00
Tom Rini
8b0fe584ae Merge patch series "Various toolchain compatibility fixes/improvements"
Sam Edwards <cfsworks@gmail.com> says:

This is v2 of my "misc. fixes" series, sent to prepare the codebase for more
direct LLVM support in the near future. This series contains several fixes that
I found in the process of preparing that support and which address issues
independent of any future feature or enhancement. I am sending these now, both
so that their inclusion is not delayed by discussion on my upcoming series and
to make the latter more manageable.

Link: https://lore.kernel.org/r/20250315221813.1265193-1-CFSworks@gmail.com
2025-04-02 14:34:08 -06:00
Sam Edwards
586bb720e7 makefile: Add READELF command variable
This allows setting READELF=llvm-readelf in order to use the LLVM
version of the readelf utility. It also aligns with the practice of not
using $(CROSS_COMPILE) in any build recipes directly, reducing the
number of places where $(CROSS_COMPILE) is used.

Signed-off-by: Sam Edwards <CFSworks@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2025-04-02 14:33:50 -06:00