[U-Boot-Users] RFA & Update: Using libfdt in u-boot for fdt command

Jerry Van Baren gerald.vanbaren at comcast.net
Fri Mar 2 12:17:15 EST 2007


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




More information about the Linuxppc-dev mailing list