u-boot/include/image-android-dt.h
Sam Protsenko c044733457 common: Add support for Android DT image
Android documentation recommends new image format for storing DTB/DTBO
files: [1]. To support that format, this patch adds helper functions for
Android DTB/DTBO format. In image-android-dt.* files you can find helper
functions to work with Android DT image format, such us routines for:
    - printing the dump of image structure
    - getting the address and size of desired dtb/dtbo file

This patch uses dt_table.h file, that was added in commit 643cefa4d8
("Import Android's dt_table.h for DT image format") by Alex Deymo.

[1] https://source.android.com/devices/architecture/dto/partitions

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
2018-08-20 07:21:29 -04:00

21 lines
465 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* (C) Copyright 2018 Linaro Ltd.
* Sam Protsenko <semen.protsenko@linaro.org>
*/
#ifndef IMAGE_ANDROID_DT_H
#define IMAGE_ANDROID_DT_H
#include <linux/types.h>
bool android_dt_check_header(ulong hdr_addr);
bool android_dt_get_fdt_by_index(ulong hdr_addr, u32 index, ulong *addr,
u32 *size);
#if !defined(CONFIG_SPL_BUILD)
void android_dt_print_contents(ulong hdr_addr);
#endif
#endif /* IMAGE_ANDROID_DT_H */