boot/image-android: Workaround kernel/ramdisk invalid addr
authorGeorge Chan <gchan9527@gmail.com>
Sun, 18 May 2025 11:16:18 +0000 (19:16 +0800)
committerTom Rini <trini@konsulko.com>
Tue, 24 Jun 2025 13:54:51 +0000 (07:54 -0600)
commite122850933ccf5e755338b4ca300204c65ed0f04
tree3df6b539df0c23feba512ac0999b11b44ae5c133
parent482fc6a82a5433ebfadfbefeb79db11732330f31
boot/image-android: Workaround kernel/ramdisk invalid addr

Some androidboot image have invalid kernel/ramdisk load addr,
force to ignore those value and use loadaddr instead.

There is a concern on exposing the whole memory to image loading is
dangerous. Also, since it's not always possible to change the load
addr by repacking the boot.img (mainly due to AVB signature mismatch),
we need a way to use kernel_addr_r and ramdisk_addr_r.

Suggested-by: Casey Connolly <casey.connolly@linaro.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Signed-off-by: George Chan <gchan9527@gmail.com>
Link: https://lore.kernel.org/r/20250518-android-boot-v3-1-02c8768e131f@gmail.com
Signed-off-by: Casey Connolly <casey.connolly@linaro.org>
boot/Kconfig
boot/image-android.c