aboutsummaryrefslogtreecommitdiff
path: root/boot/image-fdt.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-04-05 10:40:05 -0400
committerTom Rini <trini@konsulko.com>2023-04-05 10:40:05 -0400
commit25eeda170c5e533ca0e3837c8b2d7404cdd749d1 (patch)
tree3ed815ab6105a6655fe25c91dace40c47336f8c6 /boot/image-fdt.c
parent698c2bd364ce4122a0d0db82b5a8d842186b2fa4 (diff)
parentf4449397551a82f0c1d9714d648f1efb90d56962 (diff)
Merge branch '2023-04-04-android-image-v3-v4-support'
To quote the author: * This is based on Roman Stratiienko's work to support boot image header version 3 and 4. * This supports the new boot image headers v3, v4 and bootconfig feature. https://source.android.com/docs/core/architecture/bootloader/boot-image-header https://source.android.com/docs/core/architecture/bootloader/implementing-bootconfig - Tested on Amlogic Khadas vim3l, a reference board for Android Open Source Project https://www.khadas.com/vim3l And on AM625 Texas Instruments board with 5.10 linux kernel Main changes : - New partition : vendor boot, with a specific vendor ramdisk - DTB is stored in the vendor boot partition - The generic ramdisk is placed after the vendor ramdisk - Bootconfig feature support Here is a link to see the related android boot flow changes on KHADAS vim3l as an example: https://gitlab.baylibre.com/baylibre/amlogic/atv/u-boot/-/commits/souajih/BootImagev4/
Diffstat (limited to 'boot/image-fdt.c')
-rw-r--r--boot/image-fdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 714d05d1a5..f10200f647 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -529,14 +529,15 @@ int boot_get_fdt(int flag, int argc, char *const argv[], uint8_t arch,
}
#ifdef CONFIG_ANDROID_BOOT_IMAGE
} else if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID) {
- struct andr_img_hdr *hdr = buf;
+ void *hdr = buf;
ulong fdt_data, fdt_len;
u32 fdt_size, dtb_idx;
/*
* Firstly check if this android boot image has dtb field.
*/
dtb_idx = (u32)env_get_ulong("adtb_idx", 10, 0);
- if (android_image_get_dtb_by_index((ulong)hdr, dtb_idx, &fdt_addr, &fdt_size)) {
+ if (android_image_get_dtb_by_index((ulong)hdr, 0,
+ dtb_idx, &fdt_addr, &fdt_size)) {
fdt_blob = (char *)map_sysmem(fdt_addr, 0);
if (fdt_check_header(fdt_blob))
goto no_fdt;