[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] python flattened device tree builder



I'm sending this out for reference since it doesn't look like I'm going
to have time to hook it up before I leave until next week.

This python generates a sample device tree that dtc and early Linux DomU
boot is happy with. (Due to an apparent DomU event channel bug, I can't
see the rest of the kernel's boot log to know if it's completely happy
with it.)

I need to get with Ewan to figure out a clean way to integrate this into
Xend, but the basic idea is to translate the DomU config file (the one
you pass to xm create) into a flattened device tree using this code.
We'll insert null properties into the tree for the initrd, and libxc
code will later overwrite those properties with the address/length after
loading the initrd into place. (I guess this is how Linux bootloaders
are expected to work with the tree as well.) I don't have that C
tree-parsing code yet.

The code isn't in a final form yet, but I'm putting it out for review.
It's a little hairier than I'd like in a few places (in particular I'm
unhappy with Header and Tree.to_bin()), but it seems to be working.
Improvements and comments welcome.

(I'll send it as an FYI to linuxppc-dev once it's more final.)

-- 
Hollis Blanchard
IBM Linux Technology Center

Attachment: dtc.py
Description: Text Data

_______________________________________________
Xen-ppc-devel mailing list
Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ppc-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.