diff options
author | Tom Rini <trini@konsulko.com> | 2019-04-24 09:04:23 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-04-24 09:04:23 -0400 |
commit | 3fbd2dce351ab5d40d3244f26bd713caa4f826e2 (patch) | |
tree | 4a8e5c2fd2dee4abed674da4ce0312af06f97bc1 /common/image-android.c | |
parent | 8a94262435ca559a5e2dad79f2dc3c130e9047a8 (diff) | |
parent | 74a7e0018a97a0e7318c4c7a3b473fd9ebbb5ad1 (diff) |
Merge branch '2019-04-22-master-imports'
- Add and enable brcmnand driver on a number of relevant platforms.
Also add and enable LED drivers on more bcm platforms.
- Various ARMv8 fixes/improvements, including extending PSCI
functionality.
- fs_loader improvments
- Various FIT/SPL improvements
- PCI bugfixes
- Poplar platform ethernet support
- MediaTek MMC improvements
- Android boot improvements
Diffstat (limited to 'common/image-android.c')
-rw-r--r-- | common/image-android.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/common/image-android.c b/common/image-android.c index 2f38c191e9..8b0f6b3b8b 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -8,6 +8,7 @@ #include <android_image.h> #include <malloc.h> #include <errno.h> +#include <asm/unaligned.h> #define ANDROID_IMAGE_DEFAULT_KERNEL_ADDR 0x10008000 @@ -126,6 +127,16 @@ ulong android_image_get_kload(const struct andr_img_hdr *hdr) return android_image_get_kernel_addr(hdr); } +ulong android_image_get_kcomp(const struct andr_img_hdr *hdr) +{ + const void *p = (void *)((uintptr_t)hdr + hdr->page_size); + + if (get_unaligned_le32(p) == LZ4F_MAGIC) + return IH_COMP_LZ4; + else + return IH_COMP_NONE; +} + int android_image_get_ramdisk(const struct andr_img_hdr *hdr, ulong *rd_data, ulong *rd_len) { @@ -186,7 +197,7 @@ void android_print_contents(const struct andr_img_hdr *hdr) printf("%skernel size: %x\n", p, hdr->kernel_size); printf("%skernel address: %x\n", p, hdr->kernel_addr); printf("%sramdisk size: %x\n", p, hdr->ramdisk_size); - printf("%sramdisk addrress: %x\n", p, hdr->ramdisk_addr); + printf("%sramdisk address: %x\n", p, hdr->ramdisk_addr); printf("%ssecond size: %x\n", p, hdr->second_size); printf("%ssecond address: %x\n", p, hdr->second_addr); printf("%stags address: %x\n", p, hdr->tags_addr); |