[PATCH 10/17] bootwrapper: Add dt_set_mac_addresses().

Timur Tabi timur at freescale.com
Thu Mar 22 02:01:48 EST 2007


David Gibson wrote:

> Ah, and it can't add the property if it's not there at all.  Ok, I
> think I understand now.  But.. does u-boot directly use the dts files
> from the kernel tree, or does it have its own copies?

I'm not sure what you mean by that.  You compile the DTS into a DTB, and 
then make the DTB available to U-Boot.  That can mean either storing it 
in flash, or tftp'ing it into memory.  When you boot Linux via the 
U-Boot "bootm" command, you give it the address of the DTB in memory. 
U-Boot than looks for various things and updates them.  It also creates 
a couple new things, like a 'chosen' section.

If the DTB is in flash, it copies it to RAM.  Then it updates the 
in-memory copy.  It's very hack-ish, though.  I think it just overwrites 
various nodes as it pleases, and then reconnects everything.

> The maybe was more in relation to should we delete the mac-address
> property.  But that would have the same brokenness as removing
> mac-address from the dts on old, broken u-boot's that set mac-address
> instead of local-mac-address.

I was talking about the bootwrapper deleting the mac-address property, 
*after* U-Boot has processed the DTB and handed it to the kernel.

>> What if U-Boot were smart enough to insert all of the required items in 
>> one shot, and then filled them in?
> 
> I don't see how that's reasonably possible when the items in question
> are properties in different nodes.

Ok.

> Uh.. how does it require synchronization with u-boot?  
> This is really
> just a form of internal documentation in the dts which shows which
> properties are expected to be present, but overwrriten by the
> bootloader.

Ok, I understand now, but I don't know what value it has.  I don't see 
the difference, from the DTS point-of-view, between

	local-mac-address = [ 00 00 00 00 00 00 ]

and

	local-mac-address = [ ? ? ? ? ? ? ];

In both cases, the property exists in the DTS.  The whole point was to 
remove it from the DTS entirely, and let U-Boot realize that it needs to 
be added.  I don't want DTC to need to know what's missing from a DTS.




More information about the Linuxppc-dev mailing list