public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@smiths-aerospace•com>
To: David Gibson <david@gibson•dropbear.id.au>,  linuxppc-dev@ozlabs•org
Subject: libfdt: a fix but still broken
Date: Thu, 22 Feb 2007 08:27:29 -0500	[thread overview]
Message-ID: <45DD9A41.7060900@smiths-aerospace.com> (raw)

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.

______________________________________________________

             reply	other threads:[~2007-02-22 13:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 13:27 Jerry Van Baren [this message]
2007-02-23  3:47 ` libfdt: a fix but still broken 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=45DD9A41.7060900@smiths-aerospace.com \
    --to=gerald.vanbaren@smiths-aerospace$(echo .)com \
    --cc=david@gibson$(echo .)dropbear.id.au \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox