]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
boot: fix missing dependency for BOOTMETH_ANDROID
authorQuentin Schulz <quentin.schulz@cherry.de>
Thu, 18 Dec 2025 12:19:07 +0000 (13:19 +0100)
committerMattijs Korpershoek <mkorpershoek@kernel.org>
Fri, 9 Jan 2026 08:24:17 +0000 (09:24 +0100)
The code depends on set_avendor_bootimg_addr and set_abootimg_addr
functions which are only defined in cmd/abootimg.c, only built when
CMD_ABOOTIMG=y so let's add a dependency.

It should be "depends on" to be properly implemented, but we get a
circular dependency otherwise:
boot/Kconfig:566:error: recursive dependency detected!
boot/Kconfig:566: symbol BOOTMETH_ANDROID depends on CMD_ABOOTIMG
cmd/Kconfig:504: symbol CMD_ABOOTIMG depends on ANDROID_BOOT_IMAGE
boot/Kconfig:7: symbol ANDROID_BOOT_IMAGE is selected by BOOTMETH_ANDROID

so instead we do a select. It is safe because CMD_ABOOTIMG depends on
ANDROID_BOOT_IMAGE which we select here as well.

Fixes: 125d9f3306ea ("bootstd: Add a bootmeth for Android")
Signed-off-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kory Maincent <kory.maincent@bootlin.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Link: https://lore.kernel.org/r/20251218-bootmeth_android-deps-v1-1-0113c804f951@cherry.de
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
boot/Kconfig

index 676a42a6ed4b0550e4928ab9af6af05c62983a46..b090f3c4c111111aaf05725081a9a232bf7f7337 100644 (file)
@@ -550,6 +550,7 @@ config BOOTMETH_ANDROID
        depends on X86 || ARM || SANDBOX
        depends on CMDLINE
        select ANDROID_BOOT_IMAGE
+       select CMD_ABOOTIMG
        select CMD_BCB
        imply CMD_FASTBOOT
        imply FASTBOOT if !NET_LWIP