[PATCH v3 3/9] cmd: abootimg: Add abootimg command

Simon Glass sjg at chromium.org
Wed Jan 8 18:39:53 CET 2020


On Tue, 24 Dec 2019 at 12:55, Sam Protsenko <semen.protsenko at linaro.org> wrote:
>
> This command can be used to extract fields and image payloads from
> Android Boot Image. It can be used for example to implement boot flow
> where dtb is taken from boot.img (as v2 incorporated dtb inside of
> boot.img). Using this command, one can obtain needed dtb blob from
> boot.img in scripting manner, and then apply needed dtbo's (from "dtbo"
> partition) on top of that, providing then the resulting image to bootm
> command in order to boot the Android.
>
> Also right now this command has the sub-command to get an address and
> size of recovery dtbo from recovery image (for non-A/B devices only,
> see [1,2] for details).
>
> It can be tested like this:
>
>     => mmc dev 1
>     => part start mmc 1 boot_a boot_start
>     => part size mmc 1 boot_a boot_size
>     => mmc read $loadaddr $boot_start $boot_size
>     => abootimg get ver
>     => abootimg dump dtb
>
> [1] https://source.android.com/devices/bootloader/boot-image-header
> [2] https://source.android.com/devices/architecture/dto/partitions
>
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---
>  cmd/Kconfig    |   8 ++
>  cmd/Makefile   |   1 +
>  cmd/abootimg.c | 242 +++++++++++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 251 insertions(+)
>  create mode 100644 cmd/abootimg.c

Reviewed-by: Simon Glass <sjg at chromium.org>

Can we have a test please?


More information about the U-Boot mailing list