WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] python flattened device tree builder

To: xen-ppc-devel <xen-ppc-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [XenPPC] python flattened device tree builder
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 02 Aug 2006 15:09:09 -0500
Cc: Paul Nasrat <pnasrat@xxxxxxxxxx>
Delivery-date: Wed, 02 Aug 2006 13:09:27 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: IBM Linux Technology Center
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
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
<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] python flattened device tree builder, Hollis Blanchard <=