[OpenWrt-Devel] [RFC] commit message in YAML format for new devices

Paul Spooren mail at aparcar.org
Mon Jan 20 06:49:12 EST 2020


Hi all,

I looked a bit into parsing the DeviceTree files but it's a bit of a 
pain. Tools like dts2yaml and dtc exists, however the output is not 
really useful: A lot of auto detection prevents the parser from knowing 
flash & storage sizes or number of USB ports.

Therefore I decided to create a simple shell script to get all relevant 
information. I'd add it to ./scripts/, maybe there is a simple way with 
Makefile integration as well like Petr suggested.

Next mail will contain some patch.

If anybody wants to continue the DeviceTree approach, dts2yaml creates 
links pointing to files outside the OpenWrt sources, meaning the Python 
YAML libs fails to read it due to missing anchors. Converting dtb files 
via dtc works however, just be aware that you have to convert it from 
dtb to dts first and in a second run from dts to yaml. Single step is 
not supported.

Best,
Paul

On 1/13/20 3:03 AM, Thomas Endt wrote:
>> -----Ursprüngliche Nachricht-----
>> Von: openwrt-devel <openwrt-devel-bounces at lists.openwrt.org> Im
>> Auftrag von Paul Spooren
>> Gesendet: Sonntag, 12. Januar 2020 22:47
>> An: 'OpenWrt Development List' <openwrt-devel at lists.openwrt.org>
>> Betreff: [OpenWrt-Devel] [RFC] commit message in YAML format for new
>> devices
>> An illustrative commit therefore:
>>
>> soc: Qualcomm IPQ4029
>> ram_mb: 512
>> flash:
> If there is manual user input, you need to validate and normalize the input data.
>
> Example:
>
> - soc: Qualcomm IPQ4029
> - soc: IPQ4029
> - soc: qUaLcOmMm IPQ4029
>
> We want uniform naming and spelling.
>
> If all this is created via script, ok, no problem, the script can handle that.
> If you want users to deliver acceptable yaml files, you should create a "yaml-generator" where you can easily chose in dropdown lists which SoC, what RAM chip, .....
> The current dataentries do already have dropdowns for several features, however, SoC + Wireless hardware are freetext, no dropdowns. Having that automated would be a gain.
>
> Regards,
>
> Thomas
>

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list