[FIXUP/OFW] DTS version header always v1.0

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI 2024-09-10 13:22:19 +08:00 committed by Meco Man
parent 43701ea1ed
commit 06211b8be1
1 changed files with 8 additions and 1 deletions

View File

@ -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)
{