Re: [PATCH v11 0/5] Introduce Python bindings for libfdt

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



Hi David,

On 20 March 2017 at 23:35, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Fri, Mar 17, 2017 at 04:14:29PM -0600, Simon Glass wrote:
>> At present libfdt consists of only a C implementation. Many scripts are
>> written using Python so it useful to have Python bindings for libfdt.
>> Apparently this has never been attempted before, or if so I cannot find a
>> reference.
>>
>> This series starts the process of adding this support, with just a
>> bare-bones set of methods.
>>
>> The v11 series provides binding that can be used like this:
>>
>>     fdt = libfdt.Fdt(open(fname).read())
>>     node = fdt.path_offset('/subnode@1')
>>     print fdt.get_prop(node, 'compatible')
>>     subnode = fdt.first_subnode(node, quiet=[libfdt.NOTFOUND])
>>     while subnode > 0:
>>         print fdt.get_name(subnode)
>>         subnode = fdt.next_subnode(subnode, quiet=[libfdt.NOTFOUND])
>>
>> This version includes a simple class for properties.
>
> Applied to master.  I made a small change in the last patch, so that
> the error message when the python packages aren't installed is less
> scary looking.

Yes that is better, but note the 'pylibgfdt' typo.

I suppose it is too soon for a new release tag?

I'm also interested in your thoughts on where to take this next.
Presumably we should support the rest of the functions in libfdt.

Benjamin, any plans?

Regards,
Simon
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux