summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorNeil Armstrong <[email protected]>2024-10-17 16:44:42 +0200
committerMattijs Korpershoek <[email protected]>2024-10-24 09:48:14 +0200
commit8f8e646d790199f023f82b8100b6e160d510206d (patch)
treeff019fa858158aa3fa2a7a1ec83d57ff6abc0fc8 /boot
parent55c876c6f9b787488c7a9f9c678398c48d13db6f (diff)
image: android: use ulong for kernel address
When booting with platforms having > 4GiB of memory, the kernel physical address can be more than 32bits. Use ulong like all the other addresses, and fix the print to show the > 32bits address numbers. Signed-off-by: Neil Armstrong <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Tested-by: Guillaume La Roque <[email protected]> Link: https://lore.kernel.org/r/20241017-topic-fastboot-fixes-mkbootimg-v2-1-c3927102d931@linaro.org Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/image-android.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/boot/image-android.c b/boot/image-android.c
index e74dd498a30..bb5f4f84487 100644
--- a/boot/image-android.c
+++ b/boot/image-android.c
@@ -256,7 +256,7 @@ int android_image_get_kernel(const void *hdr,
ulong *os_data, ulong *os_len)
{
struct andr_image_data img_data = {0};
- u32 kernel_addr;
+ ulong kernel_addr;
const struct legacy_img_hdr *ihdr;
if (!android_image_get_data(hdr, vendor_boot_img, &img_data))
@@ -275,7 +275,7 @@ int android_image_get_kernel(const void *hdr,
if (strlen(andr_tmp_str))
printf("Android's image name: %s\n", andr_tmp_str);
- printf("Kernel load addr 0x%08x size %u KiB\n",
+ printf("Kernel load addr 0x%08lx size %u KiB\n",
kernel_addr, DIV_ROUND_UP(img_data.kernel_size, 1024));
int len = 0;