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

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



Hi David,

On 9 February 2017 at 22:05, David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Sun, Feb 05, 2017 at 01:13:18PM -0700, 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 v4 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_quiet(node)
>>     while subnode > 0:
>>         print fdt.get_name(subnode)
>>         subnode = fdt.next_subnode_quiet(subnode)
>>
>> This version does not include a class for properties. That can be added
>> if it is felt to be useful, but I want to get some basic functionality
>> agreed first. The get_property_by_offset() function would likely benefit
>> from this.
>
> Sorry I've taken so long to look at this, I've finally given it a
> review.

That's OK. Thanks for looking. I'll try to spin this quickly.

>
> Fwiw, I ran into someone at linux.conf.au who also seemed to be rather
> interested in a Python libfdt wrapper.

OK good - there was someone on the U-Boot list also.

Regards,
Simo
--
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