Andreas Färber писал 2016-07-12 18:41:
Am 12.07.2016 um 17:33 schrieb goremy...@ispras.ru:
From: goremykin <oleg.goremi...@yandex.ru>

Option -dt-printf 'file' writes Device Tree (DiveceClass hierarchy) to
'file' using Json format. This helps developers visualize the hierarchy
of DeviceClass and its properties.

Signed-off-by: Oleg Goremykin <goremy...@ispras.ru>
---
 include/qom/qom-dt.h |  22 ++++++++
 qemu-options.hx      |  16 ++++++
 qom/Makefile.objs    |   1 +
qom/qom-dt.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++
 vl.c                 |   4 ++
 5 files changed, 185 insertions(+)
 create mode 100644 include/qom/qom-dt.h
 create mode 100644 qom/qom-dt.c

Hm, apart from some typos I don't quite like the file placement and
implementation. Can't you just implement this as a QMP/HMP command and
leave the qom/ dirs untouched? Or maybe even extract that info from an
external Python script like qom-list etc. do?

Regards,
Andreas

We are developing automatic boards and device templates creation tools. It would be better if I get DeviceClass hierarchy without QEMU running, but it's unachievable due to implementation of QEMU device registration. External Python script is bad because it requires connection with QEMU. This script should establish the connection and follow the QMP protocol. In my opinion, it's quite complicated way and brings a lot of overhead. Unlike QMP/HMP command dt-printf option terminates before creation of board. It requires only start QEMU with this option.

Where better to place the code? Maybe /util?

Goremykin Oleg

Reply via email to