linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* libfdt: a fix but still broken
@ 2007-02-22 13:27 Jerry Van Baren
  2007-02-23  3:47 ` David Gibson
  0 siblings, 1 reply; 9+ messages in thread
From: Jerry Van Baren @ 2007-02-22 13:27 UTC (permalink / raw)
  To: David Gibson, linuxppc-dev

Hi Dave,

I have good news and bad news. ;-)  The good news is that the 
incompatibility between libfdt and jdl's dtc is that libfdt has the name 
offset and the length of the name switched.  booting_without_of.txt says 
the length comes first, so libfdt is in the wrong.

The bad news is that, when I fix this, nearly all of the tests fail (but 
they fail the same way for both tree.S and jdl's dtc).  I have not 
started on that layer of the onion yet.

Best regards,
gvb

$ git diff fdt.h
diff --git a/fdt.h b/fdt.h
index fff533e..4687a31 100644
--- a/fdt.h
+++ b/fdt.h
@@ -36,8 +36,8 @@ struct fdt_node_header {

  struct fdt_property {
         uint32_t tag;
-       uint32_t nameoff;
         uint32_t len;
+       uint32_t nameoff;
         char data[0];
  };

$ git diff tests/trees.S
diff --git a/tests/trees.S b/tests/trees.S
index 76c0057..400e7d0 100644
--- a/tests/trees.S
+++ b/tests/trees.S
@@ -39,8 +39,8 @@ tree: \

  #define PROPHDR(tree, name, len) \
         FDTLONG(FDT_PROP)       ; \
-       FDTLONG(tree##_##name - tree##_strings) ; \
-       FDTLONG(len)            ;
+       FDTLONG(len)            ; \
+       FDTLONG(tree##_##name - tree##_strings) ;

  #define PROP_INT(tree, name, val) \
         PROPHDR(tree, name, 4) \


______________________________________________________________________
CAUTION: This message was sent via the Public Internet and its 
authenticity cannot be guaranteed.

______________________________________________________

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-02-23 22:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-22 13:27 libfdt: a fix but still broken Jerry Van Baren
2007-02-23  3:47 ` David Gibson
2007-02-23 12:59   ` Jerry Van Baren
2007-02-23 14:33     ` Jerry Van Baren
2007-02-23 22:24     ` David Gibson
2007-02-23 15:08   ` Jon Loeliger
2007-02-23 15:21     ` Jerry Van Baren
2007-02-23 22:47       ` David Gibson
2007-02-23 22:25     ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).