From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerry Van Baren Date: Thu, 01 Mar 2007 20:17:15 -0500 Subject: [U-Boot-Users] RFA & Update: Using libfdt in u-boot for fdt command In-Reply-To: <20070301234951.GC8177@mag.az.mvista.com> References: <45E6DCB4.3080106@smiths-aerospace.com> <20070301234951.GC8177@mag.az.mvista.com> Message-ID: <45E77B1B.5060509@comcast.net> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Mark A. Greer wrote: > On Thu, Mar 01, 2007 at 09:01:24AM -0500, Jerry Van Baren wrote: >> Hi all, >> >> This is a Request for Advice. > > Hi Jerry. > > One minor thing. I'd just want to remind you that we shouldn't stray > too far from the OF interface. The bootwrapper code sits on top of > either the FDT access interface or the true OF DT access interface. > The closer we keep the two, the cleaner & easier the we can keep > the bootwrapper code. > > Mark Hi Mark, Understood, but that isn't really my battle. David Gibson created the libfdt interface so any linux/bootwrapper changes are really his battle. I'm working in u-boot land so linux/bootwrapper aren't in my problem domain - using libfdt in u-boot doesn't affect the bootwrapper code. Having said that, I'm hoping for shared code synergy, which would require the linux kernel to adopt libfdt as a replacement for flatdevtree.[ch]. David has also talked about using libfdt in the dtc suite, so there is potentially a three way synergy. The flattened device tree which is passed from u-boot to linux is unchanged*, so the interface is the same at that level (to state the obvious). David's libfdt is a potential replacement for flatdevtree.c. I have pursued using libfdt rather than flatdevtree (in u-boot) because the interface is much cleaner (IMHO, and, I'm sure, IDHO). Of course "much cleaner" is the fancy way of saying "not compatible." :-/ On the other hand, I looked at arch/powerpc/boot/of.c, ops.h, and flatdevtree_misc.c. It looks like it would be relatively easy to redo flatdevtree_misc.c to glue to libfdt instead of flatdevtree.c (he says blithely). * ...other than a backwards compatible version 16 -> 17 upgrade. Best regards, gvb