Re: [PATCH v2 00/17] Support android boot image v3/v4

Roman Stratiienko
2023-01-26T18:17:48Z

чт, 26 янв. 2023 г. в 18:05, Safae Ouajih <souajih@baylibre.com>:
>
> Hello everyone,
>
> * 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/
>
> Changes in v2:
> - Rework parts of the code to fix the abootimg test: test_abootimg
> - Update test_abootimg to support boot image header v4
> - Remove LIBXBC library, import and adapt the functions to support bootconfig feature
> - Rename the used structures :
> andr_boot_img_hdr_v0_v1_v2 -> andr_boot_img_hdr_v0
> andr_boot_img_hdr_v3_v4 -> andr_boot_img_hdr_v3
> andr_vendor_boot_img_hdr_v3_v4 -> andr_vendor_img_hdr

Hello,

Thanks for these patches.

Please note that Android has both vendor.img and boot_vendor.img
I would suggest adding some prefix, e.g. andr_bootvnd_img_hdr or
something similar.

>
> Safae Ouajih (17):
> android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0
> android: boot: support vendor boot image in abootimg
> android: boot: replace android_image_check_header
> android: boot: add boot image header v3 and v4 structures
> android: boot: kcomp: support andr_image_data
> android: boot: move to andr_image_data structure
> android: boot: content print is not supported for v3,v4 header version
> android: boot: boot image header v3,v4 do not support recovery DTBO
> android: boot: add vendor boot image to prepare for v3,v4 support
> android: boot: update android_image_get_data to support v3,v4
> android: boot: ramdisk: support vendor ramdisk
> android: boot: support extra command line
> android: boot: update android_image_get_dtb_img_addr to support v3,v4
> drivers: fastboot: zImage flashing is not supported for v3,v4
> android: boot: support boot image header version 3 and 4
> android: boot: support bootconfig
> test/py: android: extend abootimg test
>
> boot/bootm.c | 29 +-
> boot/image-android.c | 467 ++++++++++++++++----
> boot/image-board.c | 15 +-
> boot/image-fdt.c | 5 +-
> cmd/abootimg.c | 75 +++-
> drivers/fastboot/fb_mmc.c | 19 +-
> include/android_image.h | 228 +++++++++-
> include/image.h | 37 +-
> test/py/tests/test_android/test_abootimg.py | 135 +++++-
> 9 files changed, 850 insertions(+), 160 deletions(-)
>
> --
> 2.34.1
>