Commit Graph

3 Commits

Author SHA1 Message Date
Joseph Chen 745aeb1a7d common: android: add boot_img_hdr_v3 and vendor boot support
Android Header v3 and vendor boot partition are introduced
from Android-11(R).

Header populate:
  Header v3 is no longer compatible with v0/1/2 header, we
  add populate_andr_img_hdr() to merge boot and vendor_boot
  partition header into struct andr_img_hdr in order to
  compatible with v0/1/2 header.

resource.img:
  The second_addr and second_size fields are removed in v3,
  so we require resource partition to restore resource.img.

A/B system:
  If not A/B system, the boot.img header version is 3 and
  recovery header is version 2.

AVB load image:
  - If allow verification error: the image is loaded by
    ops->get_preloaded_partition() which auto populates
    boot_img_hdr_v3.
  - If not allow verification error: the image is full loaded
    by ops->read_from_partition() which doesn't populate
    boot_img_hdr_v3, we need to fix it.

Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: I2afce53c43d782fc57baa01acf9c05518b580840
2020-09-18 14:41:37 +08:00
Joseph Chen df3ff3726e cmd: android: round up image header size
Change-Id: I79e1b31ae2d018c0a8da030482f2ac0be44cb177
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-09-03 08:53:08 +08:00
Joseph Chen eae0a6b103 cmd: add command "android_print_hdr" support
This is useful for debug.

Change-Id: I6e56255d6e32e692031c6c3226d0dc041433dd48
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
2019-07-22 19:24:57 +08:00