bootstd: android: add support of bootimage v2
authorGuillaume La Roque <glaroque@baylibre.com>
Tue, 26 Nov 2024 08:06:09 +0000 (09:06 +0100)
committerMattijs Korpershoek <mkorpershoek@baylibre.com>
Tue, 26 Nov 2024 08:59:01 +0000 (09:59 +0100)
commit51a2fc40d399888ee45c452d2f40fa1b0cb1456e
tree633b7c9cecefc345d47dd3181319b62eb3a2e51e
parent48380f9b2a12e3fc6339d6af5a154bded769d911
bootstd: android: add support of bootimage v2

Android bootmeth only support boot image v3/4.

Add support of Android Boot Image version 2 [1].
Vendor boot image is only supported in version 3 and 4 so don't try to
read it when header version is less than 3.

[1] https://source.android.com/docs/core/architecture/bootloader/boot-image-header#header-v2

Tested-by: Julien Masson <jmasson@baylibre.com>
Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
Link: https://lore.kernel.org/r/20241126-adnroidv2-v4-1-11636106dc69@baylibre.com
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
boot/bootmeth_android.c