Re: [PATCH v3 18/19] test/py: android: extend abootimg test

2023-03-06 Thread Safae Ouajih
On 27/02/2023 15:18, Tom Rini wrote: On Mon, Feb 27, 2023 at 03:15:31PM +0100, Safae Ouajih wrote: On 07/02/2023 20:02, Tom Rini wrote: On Mon, Feb 06, 2023 at 12:50:20AM +0100, Safae Ouajih wrote: test_abootimg is extended to include the testing of boot images version 4

Re: [PATCH v3 18/19] test/py: android: extend abootimg test

2023-02-27 Thread Safae Ouajih
On 07/02/2023 20:02, Tom Rini wrote: On Mon, Feb 06, 2023 at 12:50:20AM +0100, Safae Ouajih wrote: test_abootimg is extended to include the testing of boot images version 4. For this, boot.img and vendor_boot.img have been generated using mkbootimg tool with setting the header version to 4

Re: [PATCH v3 09/19] android: boot: add vendor boot image to prepare for v3,v4 support

2023-02-09 Thread Safae Ouajih
On 07/02/2023 05:02, Simon Glass wrote: On Sun, 5 Feb 2023 at 16:50, Safae Ouajih wrote: Introduce vendor boot image for version 3 and 4 of boot image header. The vendor boot image will hold extra information about kernel, dtb and ramdisk. This is done to prepare for boot image version 3

Re: [PATCH v3 18/19] test/py: android: extend abootimg test

2023-02-09 Thread Safae Ouajih
On 07/02/2023 20:02, Tom Rini wrote: On Mon, Feb 06, 2023 at 12:50:20AM +0100, Safae Ouajih wrote: test_abootimg is extended to include the testing of boot images version 4. For this, boot.img and vendor_boot.img have been generated using mkbootimg tool with setting the header version to 4

Re: [PATCH v3 06/19] android: boot: move to andr_image_data structure

2023-02-09 Thread Safae Ouajih
On 09/02/2023 15:26, Mattijs Korpershoek wrote: On Mon, Feb 06, 2023 at 00:50, Safae Ouajih wrote: Move from andr_boot_img_hdr_v0 to andr_image_data structure to prepare for boot image header version 3 and 4. Signed-off-by: Safae Ouajih --- boot/image-android.c | 121

Re: [PATCH v3 06/19] android: boot: move to andr_image_data structure

2023-02-09 Thread Safae Ouajih
On 07/02/2023 05:02, Simon Glass wrote: Hi Safae, On Sun, 5 Feb 2023 at 16:50, Safae Ouajih wrote: Move from andr_boot_img_hdr_v0 to andr_image_data structure to prepare for boot image header version 3 and 4. Change log? Hi Simon, I will make sure to include changelogs in v4

[PATCH v3 15/19] android: boot: support boot image header version 3 and 4

2023-02-05 Thread Safae Ouajih
uld be set to host the ramdisk : generic ramdisk + vendor ramdisk Replace "struct andr_boot_img_hdr_v0*" by "void *" in some functions since v3 and v4 are now supported as well. Signed-off-by: Safae Ouajih --- boot/bootm.c | 37 --

[PATCH v3 17/19] doc: android: add documentation for v3, v4 boot image header

2023-02-05 Thread Safae Ouajih
Update the Android documentation to describe version 3 and 4 of boot image header. Signed-off-by: Safae Ouajih --- doc/android/boot-image.rst | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/android/boot-image.rst b/doc/android/boot-image.rst index

[PATCH v3 16/19] android: boot: support bootconfig

2023-02-05 Thread Safae Ouajih
Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- boot/image-android.c| 58 +++-- include/android_image.h | 11 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/boot/image-android.c b/boot/image

[PATCH v3 18/19] test/py: android: extend abootimg test

2023-02-05 Thread Safae Ouajih
- Extracting the dtb start address in RAM Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass --- test/py/tests/test_android/test_abootimg.py | 136 ++-- 1 file changed, 123 insertions(+), 13 deletions(-) diff

[PATCH v3 19/19] Dockerfile: add mkbootimg tool

2023-02-05 Thread Safae Ouajih
mkbootimg tool is part of the Android project and it is used to pack Android boot images such as boot image and vendor_boot image. Use the following command to run mkbootimg: $ python3 -m mkbootimg Add mkbootimg to the docker file Signed-off-by: Safae Ouajih --- tools/docker/Dockerfile | 4

[PATCH v3 12/19] android: boot: support extra command line

2023-02-05 Thread Safae Ouajih
In version 3 and 4 of boot image header, the vendor specific command line are located in vendor boot image. Thus, use extra command line to add those cmd to bootargs. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- boot/image-android.c | 11

[PATCH v3 13/19] android: boot: update android_image_get_dtb_img_addr to support v3, v4

2023-02-05 Thread Safae Ouajih
Add support for boot image version 3 and 4 in android_image_get_dtb_img_addr(). Since the dtb is now included in vendor_boot image instead of boot image, extract the dtb address from vendor_boot image when a v3 or v4 is used. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed

[PATCH v3 14/19] drivers: fastboot: zImage flashing is not supported for v3, v4

2023-02-05 Thread Safae Ouajih
message when the boot image header version is greater than 2. Signed-off-by: Safae Ouajih --- drivers/fastboot/fb_mmc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index 086e5f7843..1dea82835c 100644 --- a/drivers/fastboot/fb_mmc.c

[PATCH v3 11/19] android: boot: ramdisk: support vendor ramdisk

2023-02-05 Thread Safae Ouajih
Version 3 and 4 of boot image header introduced vendor boot ramdisk: Please check include/android_image.h for details. The ramdisk is now split into a generic ramdisk in boot image and a vendor ramdisk in vendor boot image. Support the new vendor ramdisk. Signed-off-by: Safae Ouajih Reviewed

[PATCH v3 09/19] android: boot: add vendor boot image to prepare for v3, v4 support

2023-02-05 Thread Safae Ouajih
Introduce vendor boot image for version 3 and 4 of boot image header. The vendor boot image will hold extra information about kernel, dtb and ramdisk. This is done to prepare for boot image version 3 and 4 support. Signed-off-by: Safae Ouajih --- boot/bootm.c | 8 +++ boot/image

[PATCH v3 10/19] android: boot: update android_image_get_data to support v3, v4

2023-02-05 Thread Safae Ouajih
Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass --- boot/image-android.c| 80 +++-- include/android_image.h | 3 ++ include/image.h | 11 ++ 3 files changed, 91 insertions(+), 3 deletions(-) diff --git a/boot/image-android.c b/boot/image

[PATCH v3 08/19] android: boot: boot image header v3, v4 do not support recovery DTBO

2023-02-05 Thread Safae Ouajih
android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd. This is not supported in boot image header v3 and v4. Thus, print an error message when v1,v2 header version are not used. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- boot

[PATCH v3 07/19] android: boot: content print is not supported for v3, v4 header version

2023-02-05 Thread Safae Ouajih
Content print is not supported for version 3 and 4 of boot image header. Thus, only print that content when v2 is used. Update android_print_contents() to print an error message when trying to print boot image header version 3 or 4 content. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass

[PATCH v3 06/19] android: boot: move to andr_image_data structure

2023-02-05 Thread Safae Ouajih
Move from andr_boot_img_hdr_v0 to andr_image_data structure to prepare for boot image header version 3 and 4. Signed-off-by: Safae Ouajih --- boot/image-android.c | 121 +++ cmd/abootimg.c | 31 +-- 2 files changed, 81 insertions(+), 71

[PATCH v3 05/19] android: boot: kcomp: support andr_image_data

2023-02-05 Thread Safae Ouajih
of header structure in both version 3 and 4. Rework android_image_get_kcomp() to support this new struct. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- boot/image-android.c| 75 - include/android_image.h | 27

[PATCH v3 04/19] android: boot: add boot image header v3 and v4 structures

2023-02-05 Thread Safae Ouajih
/mkbootimg Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- include/android_image.h | 183 +++- 1 file changed, 182 insertions(+), 1 deletion(-) diff --git a/include/android_image.h b/include/android_image.h index

[PATCH v3 02/19] android: boot: support vendor boot image in abootimg

2023-02-05 Thread Safae Ouajih
://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- cmd/abootimg.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cmd/abootimg.c

[PATCH v3 03/19] android: boot: replace android_image_check_header

2023-02-05 Thread Safae Ouajih
With the new vendor boot image introduced in versions 3 and 4 of boot image header, the header check must be done for both boot image and vendor boot image. Thus, replace android_image_check_header() by is_android_boot_image_header() to only refer to boot image header check. Signed-off-by: Safae

[PATCH v3 01/19] android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0

2023-02-05 Thread Safae Ouajih
introducing version 3 and 4. Signed-off-by: Safae Ouajih Reviewed-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- boot/image-android.c | 37 - boot/image-fdt.c | 2 +- cmd/abootimg.c| 4 +- drivers/fastboot/fb_mmc.c | 8 +-- include

[PATCH v3 00/19] Support android boot image v3/v4

2023-02-05 Thread Safae Ouajih
res : 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 Safae Ouajih (19): android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0 android: boot: support vendor boot image in abootimg

Re: [PATCH v2 15/17] android: boot: support boot image header version 3 and 4

2023-02-02 Thread Safae Ouajih
On 01/02/2023 09:44, Mattijs Korpershoek wrote: On Thu, Jan 26, 2023 at 17:55, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: This enables the support for boot image header version 3 and 4 using abootimg command. In order to use version 3 or 4: 1- Vendor

Re: [PATCH v2 17/17] test/py: android: extend abootimg test

2023-01-31 Thread Safae Ouajih
On 27/01/2023 21:37, Tom Rini wrote: On Fri, Jan 27, 2023 at 04:51:41PM +0100, Safae Ouajih wrote: On 27/01/2023 01:55, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: test_abootimg is extended to include the testing of boot images version 4

Re: [PATCH v2 17/17] test/py: android: extend abootimg test

2023-01-27 Thread Safae Ouajih
On 27/01/2023 01:55, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: test_abootimg is extended to include the testing of boot images version 4. For this, boot.img and vendor_boot.img have been generated using mkbootimg tool with setting the header version to 4

Re: [PATCH v2 12/17] android: boot: support extra command line

2023-01-27 Thread Safae Ouajih
On 27/01/2023 01:54, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: In version 3 and 4 of boot image header, the vendor specific vendor-spefcific command line are located in vendor boot image. Thus, using use the extra command line to add those cmd

Re: [PATCH v2 07/17] android: boot: content print is not supported for v3,v4 header version

2023-01-27 Thread Safae Ouajih
On 27/01/2023 01:54, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: Content print is not supported for version 3 and 4 of boot image header. Thus, only print that content when v2 is used. Update android_print_contents() to print an error message when trying

Re: [PATCH v2 06/17] android: boot: move to andr_image_data structure

2023-01-27 Thread Safae Ouajih
On 27/01/2023 01:54, Simon Glass wrote: Hi Safae, On Thu, 26 Jan 2023 at 09:05, Safae Ouajih wrote: Move from andr_boot_img_hdr_v0 to andr_image_data structure to prepare for boot image header version 3 and 4. Signed-off-by: Safae Ouajih --- boot/image-android.c | 127

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

2023-01-27 Thread Safae Ouajih
On 26/01/2023 19:17, Roman Stratiienko wrote: чт, 26 янв. 2023 г. в 18:05, Safae Ouajih : 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

[PATCH v2 15/17] android: boot: support boot image header version 3 and 4

2023-01-26 Thread Safae Ouajih
uld be set to host the ramdisk : generic ramdisk + vendor ramdisk "struct andr_boot_img_hdr_v0*" is replaced by "void *" in some functions since v3 and v4 are now supported as well. Signed-off-by: Safae Ouajih --- boot/bootm.c | 29 --

[PATCH v2 09/17] android: boot: add vendor boot image to prepare for v3, v4 support

2023-01-26 Thread Safae Ouajih
This is done to prepare for boot image version 3 and 4 support. Signed-off-by: Safae Ouajih --- boot/bootm.c | 8 +++ boot/image-android.c | 54 boot/image-board.c | 3 +-- boot/image-fdt.c | 3 ++- cmd/abootimg.c | 4

[PATCH v2 17/17] test/py: android: extend abootimg test

2023-01-26 Thread Safae Ouajih
- Extracting the dtb start address in RAM Running test: $ ./test/py/test.py --bd sandbox --build -k test_abootimg Signed-off-by: Safae Ouajih --- test/py/tests/test_android/test_abootimg.py | 135 ++-- 1 file changed, 122 insertions(+), 13 deletions(-) diff --git a/test/py/tests

[PATCH v2 14/17] drivers: fastboot: zImage flashing is not supported for v3, v4

2023-01-26 Thread Safae Ouajih
Print an error message when the boot image header version is greater than 2 as this is not supported for v3 and v4. Signed-off-by: Safae Ouajih --- drivers/fastboot/fb_mmc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index

[PATCH v2 12/17] android: boot: support extra command line

2023-01-26 Thread Safae Ouajih
In version 3 and 4 of boot image header, the vendor specific command line are located in vendor boot image. Thus, using extra command line to add those cmd to bootargs. Signed-off-by: Safae Ouajih --- boot/image-android.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/boot

[PATCH v2 07/17] android: boot: content print is not supported for v3, v4 header version

2023-01-26 Thread Safae Ouajih
Content print is not supported for version 3 and 4 of boot image header. Thus, only print that content when v2 is used. Update android_print_contents() to print an error message when trying to print boot image header version 3 or 4 content. Signed-off-by: Safae Ouajih --- boot/image-android.c

[PATCH v2 06/17] android: boot: move to andr_image_data structure

2023-01-26 Thread Safae Ouajih
Move from andr_boot_img_hdr_v0 to andr_image_data structure to prepare for boot image header version 3 and 4. Signed-off-by: Safae Ouajih --- boot/image-android.c | 127 --- cmd/abootimg.c | 31 ++- include/image.h | 2 + 3 files

[PATCH v2 11/17] android: boot: ramdisk: support vendor ramdisk

2023-01-26 Thread Safae Ouajih
Version 3 and 4 of boot image header introduced vendor boot ramdisk: Please check include/android_image.h for details. The ramdisk is now split into a generic ramdisk in boot image and a vendor ramdisk in vendor boot image. Signed-off-by: Safae Ouajih --- boot/image-android.c | 13

[PATCH v2 16/17] android: boot: support bootconfig

2023-01-26 Thread Safae Ouajih
nal/u-boot/ Signed-off-by: Safae Ouajih --- boot/image-android.c| 58 +++-- include/android_image.h | 11 2 files changed, 67 insertions(+), 2 deletions(-) diff --git a/boot/image-android.c b/boot/image-android.c index dd06c09279..5c2217676e 100644

[PATCH v2 13/17] android: boot: update android_image_get_dtb_img_addr to support v3, v4

2023-01-26 Thread Safae Ouajih
This adds support for boot image version 3 and 4 in android_image_get_dtb_img_addr(). Since the dtb is now included in vendor_boot image instead of boot image, the dtb address should be extracted from vendor_boot image when a v3 or v4 is used. Signed-off-by: Safae Ouajih --- boot/image

[PATCH v2 10/17] android: boot: update android_image_get_data to support v3, v4

2023-01-26 Thread Safae Ouajih
to support v3 and v4 Signed-off-by: Safae Ouajih --- boot/image-android.c| 80 +++-- include/android_image.h | 3 ++ include/image.h | 1 + 3 files changed, 81 insertions(+), 3 deletions(-) diff --git a/boot/image-android.c b/boot/image-android.c index

[PATCH v2 08/17] android: boot: boot image header v3, v4 do not support recovery DTBO

2023-01-26 Thread Safae Ouajih
android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd. This is not supported in boot image header v3 and v4. Thus, we print an error message when v1,v2 header version are not used. Signed-off-by: Safae Ouajih --- boot/image-android.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v2 04/17] android: boot: add boot image header v3 and v4 structures

2023-01-26 Thread Safae Ouajih
/tools/mkbootimg Signed-off-by: Safae Ouajih --- include/android_image.h | 183 +++- 1 file changed, 182 insertions(+), 1 deletion(-) diff --git a/include/android_image.h b/include/android_image.h index 2bdcab9122..4fce363ff7 100644 --- a/include/android_image.h

[PATCH v2 02/17] android: boot: support vendor boot image in abootimg

2023-01-26 Thread Safae Ouajih
://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions Signed-off-by: Safae Ouajih --- cmd/abootimg.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cmd/abootimg.c b/cmd/abootimg.c index 0262adb1e5..026c03f91c 100644

[PATCH v2 03/17] android: boot: replace android_image_check_header

2023-01-26 Thread Safae Ouajih
-by: Safae Ouajih --- boot/image-android.c | 8 boot/image-board.c| 2 +- cmd/abootimg.c| 4 ++-- drivers/fastboot/fb_mmc.c | 3 +-- include/image.h | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/boot/image-android.c b/boot/image

[PATCH v2 05/17] android: boot: kcomp: support andr_image_data

2023-01-26 Thread Safae Ouajih
from the change of header structure in both version 3 and 4. android_image_get_kcomp() is reworked to support this new struct. Signed-off-by: Safae Ouajih --- boot/image-android.c| 75 - include/android_image.h | 27 +++ include/image.h

[PATCH v2 01/17] android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0

2023-01-26 Thread Safae Ouajih
, this struct name must change to refer to the header structure before v3. Signed-off-by: Safae Ouajih --- boot/image-android.c | 26 +- boot/image-fdt.c | 2 +- cmd/abootimg.c| 4 ++-- drivers/fastboot/fb_mmc.c | 8 include/android_image.h

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

2023-01-26 Thread Safae Ouajih
: 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 Safae Ouajih (17): android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0 android: boot: support vendor boot image in abooti

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

2023-01-06 Thread safae ouajih
On 04/01/2023 21:01, Simon Glass wrote: Hi Safae, On Wed, 4 Jan 2023 at 02:02, safae ouajih wrote: On 30/12/2022 02:48, Tom Rini wrote: On Sat, 26 Nov 2022 17:59:14 +0100, Safae Ouajih wrote: * This is based on Roman Stratiienko's work to support boot image header version 3 and 4

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

2023-01-04 Thread safae ouajih
On 30/12/2022 02:48, Tom Rini wrote: On Sat, 26 Nov 2022 17:59:14 +0100, Safae Ouajih wrote: * 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

Re: [PATCH 01/17] android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0_v1_v2

2022-11-29 Thread Safae Ouajih
On Mon, 28 Nov 2022 11:08:20 -0500 Sean Anderson wrote: > On 11/26/22 11:59, Safae Ouajih wrote: > > [You don't often get email from soua...@baylibre.com. Learn why this is > > important at https://aka.ms/LearnAboutSenderIdentification ] > > > > Android introduced

[PATCH 16/17] lib: support libxbc

2022-11-26 Thread Safae Ouajih
] `7af0a0506d4de6f5ea147d10fb0664a8af07d326` Signed-off-by: Safae Ouajih --- include/xbc.h | 1 + lib/Kconfig | 12 + lib/Makefile| 1 + lib/libxbc/Makefile | 1 + lib/libxbc/libxbc.c | 112 lib/libxbc/libxbc.h | 54

[PATCH 17/17] android: boot: support bootconfig

2022-11-26 Thread Safae Ouajih
This adds support for Bootconfig feature. - The bootconfig feature replaces the androidboot.* kernel cmdline options. - CONFIG_LIBXBC must be enabled Signed-off-by: Safae Ouajih --- boot/image-android.c| 22 +- include/android_image.h | 3 +++ 2 files changed, 24

[PATCH 15/17] android: boot: support boot image header version 3 and 4

2022-11-26 Thread Safae Ouajih
uld be set to host the ramdisk : generic ramdisk + vendor ramdisk "struct andr_boot_img_hdr_v0_v1_v2*" is replaced by "void *" in some functions since v3 and v4 are now supported as well. Signed-off-by: Safae Ouajih --- boot/bootm.c | 29 --

[PATCH 14/17] drivers: fastboot: zImage flashing is not supported for v3, v4

2022-11-26 Thread Safae Ouajih
Print an error message when the boot image header version is greater than 2 as this is not supported for v3 and v4. Signed-off-by: Safae Ouajih --- drivers/fastboot/fb_mmc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c index

[PATCH 13/17] android: boot: support extra command line

2022-11-26 Thread Safae Ouajih
In version 3 and 4 of boot image header, the vendor specific command line are located in vendor boot image. Thus, using extra command line to add those cmd to bootargs. Signed-off-by: Safae Ouajih --- boot/image-android.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/boot

[PATCH 12/17] android: boot: ramdisk: support vendor ramdisk

2022-11-26 Thread Safae Ouajih
Version 3 and 4 of boot image header introduced vendor boot ramdisk: Please check include/android_image.h for details. The ramdisk is now split into a generic ramdisk in boot image and a vendor ramdisk in vendor boot image. Signed-off-by: Safae Ouajih --- boot/image-android.c | 13

[PATCH 11/17] android: boot: update android_image_get_data to support v3, v4

2022-11-26 Thread Safae Ouajih
to support v3 and v4 Signed-off-by: Safae Ouajih --- boot/image-android.c| 79 +++-- include/android_image.h | 3 ++ include/image.h | 1 + 3 files changed, 80 insertions(+), 3 deletions(-) diff --git a/boot/image-android.c b/boot/image-android.c index

[PATCH 10/17] android: boot: add vendor boot image to prepare for v3, v4 support

2022-11-26 Thread Safae Ouajih
This is done to prepare for boot image version 3 and 4 support. Signed-off-by: Safae Ouajih --- boot/bootm.c | 8 boot/image-android.c | 40 boot/image-board.c | 3 +-- boot/image-fdt.c | 3 ++- cmd/abootimg.c | 4

[PATCH 09/17] android: boot: boot image header v3, v4 do not support recovery DTBO

2022-11-26 Thread Safae Ouajih
android_image_get_dtbo() is used to get recovery DTBO via abootimg cmd. This is not supported in boot image header v3 and v4. Thus, we print an error message when v1,v2 header version are not used. Signed-off-by: Safae Ouajih --- boot/image-android.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 08/17] android: boot: content print is not supported for v3, v4 header version

2022-11-26 Thread Safae Ouajih
Content print is not supported for version 3 and 4 of boot image header. Thus, only print that content when v2 is used. Update android_print_contents() to print an error message when trying to print boot image header version 3 or 4 content. Signed-off-by: Safae Ouajih --- boot/image-android.c

[PATCH 07/17] android: boot: move to andr_image_data structure

2022-11-26 Thread Safae Ouajih
Move from andr_boot_img_hdr_v0_v1_v2 to andr_image_data structure to prepare for boot image header version 3 and 4. Signed-off-by: Safae Ouajih --- boot/image-android.c | 124 +++ cmd/abootimg.c | 30 +-- include/image.h | 2 + 3

[PATCH 06/17] android: boot: kcomp: support andr_image_data

2022-11-26 Thread Safae Ouajih
from the change of header structure in both version 3 and 4. android_image_get_kcomp() is reworked to support this new struct. Signed-off-by: Safae Ouajih --- boot/image-android.c| 74 - include/android_image.h | 27 +++ include/image.h

[PATCH 05/17] android: boot: add documentation for boot image header v3/v4 structure

2022-11-26 Thread Safae Ouajih
This was imported from [1], commit [2], file: include/bootimg/bootimg.h [1] https://android.googlesource.com/platform/system/tools/mkbootimg [2] cce5b1923e3cd2fcb765b512610bdc5c42bc501d Signed-off-by: Safae Ouajih --- include/android_image.h | 136 +++- 1

[PATCH 04/17] android: boot: add boot image header v3 and v4 structures

2022-11-26 Thread Safae Ouajih
://android.googlesource.com/platform/external/u-boot Signed-off-by: Safae Ouajih --- include/android_image.h | 47 + 1 file changed, 47 insertions(+) diff --git a/include/android_image.h b/include/android_image.h index bf9b8c6f0955..ec36e6512ad6 100644 --- a/include

[PATCH 03/17] android: boot: replace android_image_check_header

2022-11-26 Thread Safae Ouajih
-by: Safae Ouajih --- boot/image-android.c | 8 boot/image-board.c| 2 +- cmd/abootimg.c| 4 ++-- drivers/fastboot/fb_mmc.c | 3 +-- include/image.h | 2 +- 5 files changed, 9 insertions(+), 10 deletions(-) diff --git a/boot/image-android.c b/boot/image

[PATCH 02/17] android: boot: support vendor boot image in abootimg

2022-11-26 Thread Safae Ouajih
://source.android.com/docs/core/architecture/bootloader/partitions/vendor-boot-partitions Signed-off-by: Safae Ouajih --- cmd/abootimg.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/cmd/abootimg.c b/cmd/abootimg.c index de2aa3307d9a..ad61cce7588d 100644

[PATCH 01/17] android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0_v1_v2

2022-11-26 Thread Safae Ouajih
, this struct name must change to refer to the header structure before v3. Signed-off-by: Safae Ouajih --- boot/image-android.c | 26 +- boot/image-fdt.c | 2 +- cmd/abootimg.c| 4 ++-- drivers/fastboot/fb_mmc.c | 8 include/android_image.h

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

2022-11-26 Thread Safae Ouajih
/souajih/BootImagev4/ Safae Ouajih (17): android: boot: rename andr_img_hdr -> andr_boot_img_hdr_v0_v1_v2 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: