[U-Boot-Users] [PATCH] fdt: Add simple alias support to fdt print command

Jerry Van Baren gvb.uboot at gmail.com
Mon Aug 4 03:24:40 CEST 2008


David Gibson wrote:
> On Sat, Aug 02, 2008 at 08:51:54PM -0400, Jerry Van Baren wrote:

[snip]

>> I've CC:ed David Gibson in case he has some advice - the concept is to  
>> indicate a dereference of /aliases nodes so that us lazy engineers don't  
>> have to cut'n'paste the whole long path from the alias.  Kumar  
>> originally proposed to do it automagically and I countered proposing  
>> using "*" to indicate the next path name should be looked up in /aliases  
>> and the result used instead (i.e. dereferenced).  Discussion thread:
>> <http://thread.gmane.org/gmane.comp.boot-loaders.u-boot/43575/focus=44941>
> 
> No, I really don't think using this "dereference" character is a good
> idea.  If you're going to expand aliases, you should do it as real OF
> does - see section 4.3 of IEEE1275.  Essentially it's the *lack* of a
> leading '/' character that triggers alias expansion.  So you could use
> e.g.
> 	/soc8360 at e0000000/ethernet at e0000400
> or
> 	soc/ethernet at e0000400
> or
> 	ethernet0

Ahh, I didn't read far enough.  The algorithm in section 4.3 is much 
better thought out than either of our proposals.

[snip]

> If you're interepreting them in one place, you should probably
> interpret them everywhwere and have a single "resolve pathname"
> function.

Yes.

> In fact, I should quite possibly put such a function into libfdt.

That would be very useful.  :-)

Thanks,
gvb





More information about the U-Boot mailing list