[PATCH 3/4] boot: bootmeth_android: Conditionally dependent on abootimg
Tom Rini
trini at konsulko.com
Tue May 20 16:45:51 CEST 2025
On Tue, May 20, 2025 at 10:25:58PM +0800, George Chan via B4 Relay wrote:
> From: George Chan <gchan9527 at 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 at gmail.com>
> ---
> boot/bootmeth_android.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
[snip]
> @@ -533,6 +533,7 @@ static int boot_android_normal(struct bootflow *bflow)
> if (ret < 0)
> return log_msg_ret("read boot", ret);
>
> +#ifdef CONFIG_CMD_ABOOTIMG
> if (priv->header_version >= 3) {
Can't we do:
if (IS_ENABLED(CONFIG_CMD_ABOOTIMG) && priv->header_version >= 3) {
..
And then also skip the __maybe_unused?
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250520/0062f515/attachment.sig>
More information about the U-Boot
mailing list