summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuEe-GUI <[email protected]>2024-09-10 13:22:19 +0800
committerMeco Man <[email protected]>2024-09-13 17:33:29 -0400
commit06211b8be1b7e9848744c658ed4c60ba4b846f1f (patch)
tree4c34a9c684c2dacbd9246a3f1d1929b3cbbd2fc1
parent43701ea1edbc52f78aaae51730ce7a4880adcc9b (diff)
[FIXUP/OFW] DTS version header always v1.0
Signed-off-by: GuEe-GUI <[email protected]>
-rw-r--r--components/drivers/ofw/ofw.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/components/drivers/ofw/ofw.c b/components/drivers/ofw/ofw.c
index d09fb4e7ca..bbda776177 100644
--- a/components/drivers/ofw/ofw.c
+++ b/components/drivers/ofw/ofw.c
@@ -636,7 +636,14 @@ void rt_ofw_node_dump_dts(struct rt_ofw_node *np, rt_bool_t sibling_too)
struct fdt_info *header = (struct fdt_info *)np->name;
struct fdt_reserve_entry *rsvmap = header->rsvmap;
- rt_kprintf("/dts-v%x/;\n\n", fdt_version(header->fdt));
+ /*
+ * Shall be present to identify the file as a version 1 DTS
+ * (dts files without this tag will be treated by dtc
+ * as being in the obsolete version 0, which uses
+ * a different format for integers in addition to
+ * other small but incompatible changes).
+ */
+ rt_kprintf("/dts-v1/;\n\n");
for (int i = header->rsvmap_nr - 1; i >= 0; --i)
{