[U-Boot] [PATCH 1/7] image: android: Add functions for handling dtb field
Simon Glass
sjg at chromium.org
Fri Sep 20 17:45:01 UTC 2019
Hi Sam,
On Thu, 19 Sep 2019 at 12:28, Sam Protsenko <semen.protsenko at linaro.org> wrote:
>
> Android Boot Image v2 adds "DTB" payload (and corresponding field in the
> image header). Provide functions for its handling:
>
> - android_image_get_dtb_by_index(): Obtain DTB file from "DTB" part of
> boot image, by file index
> - android_image_print_dtb_contents(): Iterate over all DTB files in
> "DTB" part of boot image and print those files info
>
> "DTB" payload might be in one of the following formats:
> 1. concatenated DTB files
> 2. Android DTBO format
>
> The latter requires "android-image-dt.c" functionality, so this commit
> selects that file for building for CONFIG_ANDROID_BOOT_IMAGE option.
>
> Right now this new functionality isn't used, but it can be used further.
> As it's required to apply some specific dtbo file(s) from "dtbo"
> partition, we can't automate this process inside of "bootm" command. But
> we can do next:
> - come up with some new command like "bootimg" to extract dtb file
> from boot image (using functions from this patch)
> - extract desired dtbo files from "dtbo" partition using "dtimg"
> command
> - merge dtbo files into dtb file using "fdt apply" command
> - pass resulting dtb file into bootm command in order to boot the
> Android kernel with Android ramdisk from boot image
>
> Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
> ---
> common/Makefile | 2 +-
> common/image-android.c | 191 +++++++++++++++++++++++++++++++++++++++++
> include/image.h | 5 ++
> 3 files changed, 197 insertions(+), 1 deletion(-)
>
Please rememeber to add tests for new functionality.
Regards,
Simon
More information about the U-Boot
mailing list