summaryrefslogtreecommitdiff
path: root/include/image-android-dt.h
diff options
context:
space:
mode:
authorSam Protsenko <semen.protsenko@linaro.org>2018-08-16 23:34:12 +0300
committerTom Rini <trini@konsulko.com>2018-08-20 14:21:29 +0300
commitc04473345712ddb5484000c04d76218f258542df (patch)
treee94ac7c15056044a5641dd7715bbd67f46935b1a /include/image-android-dt.h
parent287c04e11a7371a9f8f902abef2bb39faf5aaa4c (diff)
downloadu-boot-c04473345712ddb5484000c04d76218f258542df.tar.xz
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 643cefa4d848 ("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>
Diffstat (limited to 'include/image-android-dt.h')
-rw-r--r--include/image-android-dt.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/image-android-dt.h b/include/image-android-dt.h
new file mode 100644
index 0000000000..9a3aa8fa30
--- /dev/null
+++ b/include/image-android-dt.h
@@ -0,0 +1,20 @@
+/* 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 */