mbox series

[v2,0/3] image: android: misc fixes when using on Qualcomm platforms

Message ID 20241017-topic-fastboot-fixes-mkbootimg-v2-0-c3927102d931@linaro.org
Headers show
Series image: android: misc fixes when using on Qualcomm platforms | expand

Message

Neil Armstrong Oct. 17, 2024, 2:44 p.m. UTC
When trying to use the Android boot image with header version 2
on recent Qualcomm platforms, we get into some troubles.

First the kernel in-place address can be > 32bit, then since
we use the Android mkbootimg, it uses the default load address
which isn't big enough to uncompress the kernel.

Finally, the ramdisk also uses a default load address, and
it should be taken in account like for the kernel address.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
---
Changes in v2:
- Fix patch 2 prefix
- Fix patch 3 commit msg
- Fix patch 3 behavior when using boot image header version > 2, use the original ramdisk_ptr
- Link to v1: https://lore.kernel.org/r/20241016-topic-fastboot-fixes-mkbootimg-v1-0-94fd9340722b@linaro.org

---
Neil Armstrong (3):
      image: android: use ulong for kernel address
      image: android: do not boot XIP when kernel is compressed
      image: android: handle ramdisk default address

 boot/image-android.c    | 62 +++++++++++++++++++++++++++++++++++++------------
 include/android_image.h |  2 +-
 2 files changed, 48 insertions(+), 16 deletions(-)
---
base-commit: d5cab0d6adc26ec1bbd45c2fed101184d04454ae
change-id: 20241016-topic-fastboot-fixes-mkbootimg-8d73ab93db3d

Best regards,

Comments

Guillaume La Roque Oct. 18, 2024, 5:49 a.m. UTC | #1
Hi,

thanks for this fixes.
I just test this series on Khadas VIM3 with android image version 2 non 
A/B  and AB,
on TI AM62P with android image version 4 with AB, both boards boot fine.

Tested-by: Guillaume La Roque <glaroque@baylibre.com>

Guillaume

Le 17/10/2024 à 16:44, Neil Armstrong a écrit :
> When trying to use the Android boot image with header version 2
> on recent Qualcomm platforms, we get into some troubles.
>
> First the kernel in-place address can be > 32bit, then since
> we use the Android mkbootimg, it uses the default load address
> which isn't big enough to uncompress the kernel.
>
> Finally, the ramdisk also uses a default load address, and
> it should be taken in account like for the kernel address.
>
> Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
> ---
> Changes in v2:
> - Fix patch 2 prefix
> - Fix patch 3 commit msg
> - Fix patch 3 behavior when using boot image header version > 2, use the original ramdisk_ptr
> - Link to v1: https://lore.kernel.org/r/20241016-topic-fastboot-fixes-mkbootimg-v1-0-94fd9340722b@linaro.org
>
> ---
> Neil Armstrong (3):
>        image: android: use ulong for kernel address
>        image: android: do not boot XIP when kernel is compressed
>        image: android: handle ramdisk default address
>
>   boot/image-android.c    | 62 +++++++++++++++++++++++++++++++++++++------------
>   include/android_image.h |  2 +-
>   2 files changed, 48 insertions(+), 16 deletions(-)
> ---
> base-commit: d5cab0d6adc26ec1bbd45c2fed101184d04454ae
> change-id: 20241016-topic-fastboot-fixes-mkbootimg-8d73ab93db3d
>
> Best regards,
Mattijs Korpershoek Oct. 24, 2024, 7:48 a.m. UTC | #2
Hi,

On Thu, 17 Oct 2024 16:44:41 +0200, Neil Armstrong wrote:
> When trying to use the Android boot image with header version 2
> on recent Qualcomm platforms, we get into some troubles.
> 
> First the kernel in-place address can be > 32bit, then since
> we use the Android mkbootimg, it uses the default load address
> which isn't big enough to uncompress the kernel.
> 
> [...]

Thanks, Applied to https://source.denx.de/u-boot/custodians/u-boot-dfu (u-boot-dfu)

[1/3] image: android: use ulong for kernel address
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/8f8e646d790199f023f82b8100b6e160d510206d
[2/3] image: android: do not boot XIP when kernel is compressed
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/d5a85e8e95db57e350a092af62077917c7edd571
[3/3] image: android: handle ramdisk default address
      https://source.denx.de/u-boot/custodians/u-boot-dfu/-/commit/21e7fa0e3ac599737cd235bb5233765e8a1b8b0f

--
Mattijs