[PATCH] boot: bootmeth_android: Conditionally dependent on abootimg

Mattijs Korpershoek mkorpershoek at kernel.org
Mon Nov 3 13:19:04 CET 2025


Hi George,
On Fri, Oct 31, 2025 at 16:10, Mattijs Korpershoek <mkorpershoek at kernel.org> wrote:

> Hi,
>
> On Tue, 21 Oct 2025 00:36:33 +0800, George Chan wrote:
>> If target u-boot img do not support androidboot v3 or greater,
>> abootimg might not be necessary.
>> 
>> aarch64-linux-gnu-ld.bfd: boot/bootmeth_android.o: in function `boot_android_normal':
>> /home/user/sources/u-boot-next/boot/bootmeth_android.c:541:(.text.boot_android_normal+0xd0): undefined reference to `set_avendor_bootimg_addr'
>> aarch64-linux-gnu-ld.bfd: /home/user/sources/u-boot-next/boot/bootmeth_android.c:543:(.text.boot_android_normal+0xd8): undefined reference to `set_abootimg_addr'
>> Segmentation fault (core dumped)
>> 
>> [...]
>
> Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)
>
> [1/1] boot: bootmeth_android: Conditionally dependent on abootimg
>       https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/4b493b9664390e16f61a6409ec60676df7759c7b

This patch causes CI to fail:
https://source.denx.de/u-boot/custodians/u-boot-dfu/-/jobs/1283315

"""
building current source for 1 boards (1 thread, 8 jobs per thread)
   sandbox:  +   sandbox
+cmd/abootimg.c:26:6: error: redefinition of 'set_abootimg_addr'
+   26 | void set_abootimg_addr(ulong addr)
+      |      ^
+include/image.h:2042:13: note: previous definition is here
+ 2042 | void __weak set_abootimg_addr(ulong addr) {}
+      |             ^
"""

This can also be reproduced locally by building sandbox:

$ make sandbox_defconfig
$ make


Can you have a look please? I will have to drop this from my branch
until the build error is resolved.

If you find a fix, please send a v2 of this patch with the fix included.

Thanks
Mattijs

>
> --
> Mattijs


More information about the U-Boot mailing list