[Crosstoolchain-logs] [device-tree-compiler] 190/357: dtc: -Odts produces v1 output

Hector Oron zumbi at moszumanska.debian.org
Thu Dec 8 17:06:12 UTC 2016


This is an automated email from the git hooks/post-receive script.

zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.

commit 91967acabdfbff8b44fd3a19f432bc6e690df8cc
Author: David Gibson <david at gibson.dropbear.id.au>
Date:   Wed Nov 7 11:17:37 2007 +1100

    dtc: -Odts produces v1 output
    
    This patch alters the -Odts mode output so that it uses dts-v1 format.
    This means that dtc -Idts -Odts used on a v0 dts file will convert
    that file to v1.
    
    Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
    Signed-off-by: Jon Loeliger <jdl at freescale.com>
---
 treesource.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/treesource.c b/treesource.c
index 0752280..df3df7e 100644
--- a/treesource.c
+++ b/treesource.c
@@ -141,7 +141,7 @@ static void write_propval_cells(FILE *f, struct data val)
 			l = l->next;
 		}
 
-		fprintf(f, "%x", be32_to_cpu(*cp++));
+		fprintf(f, "0x%x", be32_to_cpu(*cp++));
 		if ((void *)cp >= propend)
 			break;
 		fprintf(f, " ");
@@ -258,12 +258,14 @@ void dt_to_source(FILE *f, struct boot_info *bi)
 {
 	struct reserve_info *re;
 
+	fprintf(f, "/dts-v1/;\n\n");
+
 	for (re = bi->reservelist; re; re = re->next) {
 		if (re->label)
 			fprintf(f, "%s: ", re->label);
-		fprintf(f, "/memreserve/\t%016llx-%016llx;\n",
+		fprintf(f, "/memreserve/\t0x%016llx 0x%016llx;\n",
 			(unsigned long long)re->re.address,
-			(unsigned long long)(re->re.address + re->re.size - 1));
+			(unsigned long long)re->re.size);
 	}
 
 	write_tree_source_node(f, bi->dt, 0);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git



More information about the Crosstoolchain-logs mailing list