* [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
@ 2025-10-20 16:36 George Chan via B4 Relay
2025-10-28 8:38 ` Mattijs Korpershoek
2025-10-31 15:10 ` Mattijs Korpershoek
0 siblings, 2 replies; 6+ messages in thread
From: George Chan via B4 Relay @ 2025-10-20 16:36 UTC (permalink / raw)
To: u-boot; +Cc: George Chan
From: George Chan <gchan9527@gmail.com>
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)
Signed-off-by: George Chan <gchan9527@gmail.com>
---
Cc:
---
boot/bootmeth_android.c | 2 +-
include/image.h | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c
index 8c2bde10e17..d7740b86d67 100644
--- a/boot/bootmeth_android.c
+++ b/boot/bootmeth_android.c
@@ -534,7 +534,7 @@ static int boot_android_normal(struct bootflow *bflow)
if (ret < 0)
return log_msg_ret("read boot", ret);
- if (priv->header_version >= 3) {
+ if (IS_ENABLED(CONFIG_CMD_ABOOTIMG) && priv->header_version >= 3) {
ret = read_slotted_partition(desc, "vendor_boot", priv->slot,
priv->vendor_boot_img_size, vloadaddr);
if (ret < 0)
diff --git a/include/image.h b/include/image.h
index fc2f2487095..55a6af69b31 100644
--- a/include/image.h
+++ b/include/image.h
@@ -2039,7 +2039,7 @@ ulong get_abootimg_addr(void);
* Return: no returned results
*/
void set_abootimg_addr(ulong addr);
-
+void __weak set_abootimg_addr(ulong addr) {}
/**
* get_ainit_bootimg_addr() - Get Android init boot image address
*
@@ -2060,6 +2060,7 @@ ulong get_avendor_bootimg_addr(void);
* Return: no returned results
*/
void set_avendor_bootimg_addr(ulong addr);
+void __weak set_avendor_bootimg_addr(ulong addr) {}
/**
* board_fit_config_name_match() - Check for a matching board name
---
base-commit: 4e4a9de31de2a5f395ee25c59e4026422fbcb27e
change-id: 20251021-abootimg-minor-17755894a376
Best regards,
--
George Chan <gchan9527@gmail.com>
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
2025-10-20 16:36 [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg George Chan via B4 Relay
@ 2025-10-28 8:38 ` Mattijs Korpershoek
2025-10-31 15:10 ` Mattijs Korpershoek
1 sibling, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2025-10-28 8:38 UTC (permalink / raw)
To: George Chan via B4 Relay, u-boot; +Cc: George Chan
Hi George,
Thank you for the patch.
Sorry I missed this, I was not cc'ed so it took me some time to notice
the patch.
On Tue, Oct 21, 2025 at 00:36, George Chan via B4 Relay <devnull+gchan9527.gmail.com@kernel.org> wrote:
> From: George Chan <gchan9527@gmail.com>
>
> 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)
>
> Signed-off-by: George Chan <gchan9527@gmail.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
> ---
> Cc:
> ---
> boot/bootmeth_android.c | 2 +-
> include/image.h | 3 ++-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c
> index 8c2bde10e17..d7740b86d67 100644
> --- a/boot/bootmeth_android.c
> +++ b/boot/bootmeth_android.c
> @@ -534,7 +534,7 @@ static int boot_android_normal(struct bootflow *bflow)
> if (ret < 0)
> return log_msg_ret("read boot", ret);
>
> - if (priv->header_version >= 3) {
> + if (IS_ENABLED(CONFIG_CMD_ABOOTIMG) && priv->header_version >= 3) {
> ret = read_slotted_partition(desc, "vendor_boot", priv->slot,
> priv->vendor_boot_img_size, vloadaddr);
> if (ret < 0)
> diff --git a/include/image.h b/include/image.h
> index fc2f2487095..55a6af69b31 100644
> --- a/include/image.h
> +++ b/include/image.h
> @@ -2039,7 +2039,7 @@ ulong get_abootimg_addr(void);
> * Return: no returned results
> */
> void set_abootimg_addr(ulong addr);
> -
> +void __weak set_abootimg_addr(ulong addr) {}
> /**
> * get_ainit_bootimg_addr() - Get Android init boot image address
> *
> @@ -2060,6 +2060,7 @@ ulong get_avendor_bootimg_addr(void);
> * Return: no returned results
> */
> void set_avendor_bootimg_addr(ulong addr);
> +void __weak set_avendor_bootimg_addr(ulong addr) {}
>
> /**
> * board_fit_config_name_match() - Check for a matching board name
>
> ---
> base-commit: 4e4a9de31de2a5f395ee25c59e4026422fbcb27e
> change-id: 20251021-abootimg-minor-17755894a376
>
> Best regards,
> --
> George Chan <gchan9527@gmail.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
2025-10-20 16:36 [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg George Chan via B4 Relay
2025-10-28 8:38 ` Mattijs Korpershoek
@ 2025-10-31 15:10 ` Mattijs Korpershoek
2025-11-03 12:19 ` Mattijs Korpershoek
1 sibling, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2025-10-31 15:10 UTC (permalink / raw)
To: u-boot, George Chan
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
--
Mattijs
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
2025-10-31 15:10 ` Mattijs Korpershoek
@ 2025-11-03 12:19 ` Mattijs Korpershoek
2025-11-04 10:40 ` george chan
0 siblings, 1 reply; 6+ messages in thread
From: Mattijs Korpershoek @ 2025-11-03 12:19 UTC (permalink / raw)
To: Mattijs Korpershoek, u-boot, George Chan
Hi George,
On Fri, Oct 31, 2025 at 16:10, Mattijs Korpershoek <mkorpershoek@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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
2025-11-03 12:19 ` Mattijs Korpershoek
@ 2025-11-04 10:40 ` george chan
2025-11-06 8:54 ` Mattijs Korpershoek
0 siblings, 1 reply; 6+ messages in thread
From: george chan @ 2025-11-04 10:40 UTC (permalink / raw)
To: Mattijs Korpershoek; +Cc: u-boot
Hi
在 2025年11月3日週一 20:19,Mattijs Korpershoek <mkorpershoek@kernel.org> 寫道:
>
> Hi George,
> On Fri, Oct 31, 2025 at 16:10, Mattijs Korpershoek <
> mkorpershoek@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.
>
Thx for testing and report. I am sorry that not available for some time so
please drop this patch or find volunteer to follow this up.
Regards,
George
> Thanks
> Mattijs
>
> >
> > --
> > Mattijs
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg
2025-11-04 10:40 ` george chan
@ 2025-11-06 8:54 ` Mattijs Korpershoek
0 siblings, 0 replies; 6+ messages in thread
From: Mattijs Korpershoek @ 2025-11-06 8:54 UTC (permalink / raw)
To: george chan, Mattijs Korpershoek; +Cc: u-boot
On Tue, Nov 04, 2025 at 18:40, george chan <gchan9527@gmail.com> wrote:
> Hi
>
> 在 2025年11月3日週一 20:19,Mattijs Korpershoek <mkorpershoek@kernel.org> 寫道:
>
>>
>> Hi George,
>> On Fri, Oct 31, 2025 at 16:10, Mattijs Korpershoek <
>> mkorpershoek@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.
>>
> Thx for testing and report. I am sorry that not available for some time so
> please drop this patch or find volunteer to follow this up.
Ok thanks for letting me know.
I'll drop it for now
Mattijs
>
> Regards,
> George
>
>
>> Thanks
>> Mattijs
>>
>> >
>> > --
>> > Mattijs
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-11-06 8:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-20 16:36 [PATCH] boot: bootmeth_android: Conditionally dependent on abootimg George Chan via B4 Relay
2025-10-28 8:38 ` Mattijs Korpershoek
2025-10-31 15:10 ` Mattijs Korpershoek
2025-11-03 12:19 ` Mattijs Korpershoek
2025-11-04 10:40 ` george chan
2025-11-06 8:54 ` Mattijs Korpershoek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox