diff mbox series

[02/16] arm: qemu: Explain how to extract the generate devicetree

Message ID 20211013010120.96851-3-sjg@chromium.org (mailing list archive)
State New, archived
Headers show
Series fdt: Make OF_BOARD a boolean option | expand

Commit Message

Simon Glass Oct. 13, 2021, 1:01 a.m. UTC
QEMU currently generates a devicetree for use with U-Boot. Explain how to
obtain it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 doc/board/emulation/qemu-arm.rst | 12 ++++++++++++
 1 file changed, 12 insertions(+)

Comments

François Ozog Oct. 13, 2021, 1:19 a.m. UTC | #1
Le mer. 13 oct. 2021 à 03:02, Simon Glass <sjg@chromium.org> a écrit :

> QEMU currently generates a devicetree for use with U-Boot. Explain how to
> obtain it.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  doc/board/emulation/qemu-arm.rst | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/doc/board/emulation/qemu-arm.rst
> b/doc/board/emulation/qemu-arm.rst
> index 97b6ec64905..b458a398c69 100644
> --- a/doc/board/emulation/qemu-arm.rst
> +++ b/doc/board/emulation/qemu-arm.rst
> @@ -91,3 +91,15 @@ The debug UART on the ARM virt board uses these
> settings::
>      CONFIG_DEBUG_UART_PL010=y
>      CONFIG_DEBUG_UART_BASE=0x9000000
>      CONFIG_DEBUG_UART_CLOCK=0
> +
> +Obtaining the QEMU devicetree
> +-----------------------------
> +
> +QEMU generates its own devicetree to pass to U-Boot and does this by
> default.
> +You can use `-dtb u-boot.dtb` to force QEMU to use U-Boot's in-tree
> version.

this is for either Qemu experts or u-boot for Qemu maintainers. Not for the
kernel développer as it is recipe for problems: could you add this warning ?

>
> +
> +To obtain the devicetree that qemu generates, add `-machine
> dumpdtb=dtb.dtb`,
> +e.g.::
> +
> +    qemu-system-aarch64 -machine virt -nographic -cpu cortex-a57 \
> +           -bios u-boot.bin -machine dumpdtb=dtb.dtb
> --
> 2.33.0.882.g93a45727a2-goog
>
> --
François-Frédéric Ozog | *Director Business Development*
T: +33.67221.6485
francois.ozog@linaro.org | Skype: ffozog
Simon Glass Oct. 13, 2021, 4:58 p.m. UTC | #2
Hi François,

On Tue, 12 Oct 2021 at 19:20, François Ozog <francois.ozog@linaro.org> wrote:
>
>
>
> Le mer. 13 oct. 2021 à 03:02, Simon Glass <sjg@chromium.org> a écrit :
>>
>> QEMU currently generates a devicetree for use with U-Boot. Explain how to
>> obtain it.
>>
>> Signed-off-by: Simon Glass <sjg@chromium.org>
>> ---
>>
>>  doc/board/emulation/qemu-arm.rst | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
>> index 97b6ec64905..b458a398c69 100644
>> --- a/doc/board/emulation/qemu-arm.rst
>> +++ b/doc/board/emulation/qemu-arm.rst
>> @@ -91,3 +91,15 @@ The debug UART on the ARM virt board uses these settings::
>>      CONFIG_DEBUG_UART_PL010=y
>>      CONFIG_DEBUG_UART_BASE=0x9000000
>>      CONFIG_DEBUG_UART_CLOCK=0
>> +
>> +Obtaining the QEMU devicetree
>> +-----------------------------
>> +
>> +QEMU generates its own devicetree to pass to U-Boot and does this by default.
>> +You can use `-dtb u-boot.dtb` to force QEMU to use U-Boot's in-tree version.
>
> this is for either Qemu experts or u-boot for Qemu maintainers. Not for the kernel développer as it is recipe for problems: could you add this warning ?

Yes I can do that...or would it be better to hide this in doc/develop
somewhere with a link here?

>>
>>
>> +
>> +To obtain the devicetree that qemu generates, add `-machine dumpdtb=dtb.dtb`,
>> +e.g.::
>> +
>> +    qemu-system-aarch64 -machine virt -nographic -cpu cortex-a57 \
>> +           -bios u-boot.bin -machine dumpdtb=dtb.dtb
>> --
>> 2.33.0.882.g93a45727a2-goog
>>

Regards,
Simon
Tom Rini Oct. 13, 2021, 5:36 p.m. UTC | #3
On Wed, Oct 13, 2021 at 10:58:31AM -0600, Simon Glass wrote:
> Hi François,
> 
> On Tue, 12 Oct 2021 at 19:20, François Ozog <francois.ozog@linaro.org> wrote:
> >
> >
> >
> > Le mer. 13 oct. 2021 à 03:02, Simon Glass <sjg@chromium.org> a écrit :
> >>
> >> QEMU currently generates a devicetree for use with U-Boot. Explain how to
> >> obtain it.
> >>
> >> Signed-off-by: Simon Glass <sjg@chromium.org>
> >> ---
> >>
> >>  doc/board/emulation/qemu-arm.rst | 12 ++++++++++++
> >>  1 file changed, 12 insertions(+)
> >>
> >> diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
> >> index 97b6ec64905..b458a398c69 100644
> >> --- a/doc/board/emulation/qemu-arm.rst
> >> +++ b/doc/board/emulation/qemu-arm.rst
> >> @@ -91,3 +91,15 @@ The debug UART on the ARM virt board uses these settings::
> >>      CONFIG_DEBUG_UART_PL010=y
> >>      CONFIG_DEBUG_UART_BASE=0x9000000
> >>      CONFIG_DEBUG_UART_CLOCK=0
> >> +
> >> +Obtaining the QEMU devicetree
> >> +-----------------------------
> >> +
> >> +QEMU generates its own devicetree to pass to U-Boot and does this by default.
> >> +You can use `-dtb u-boot.dtb` to force QEMU to use U-Boot's in-tree version.
> >
> > this is for either Qemu experts or u-boot for Qemu maintainers. Not for the kernel développer as it is recipe for problems: could you add this warning ?
> 
> Yes I can do that...or would it be better to hide this in doc/develop
> somewhere with a link here?

Somewhere under doc/develop and an external link to the QEMU
documentation on dumpdtb would be good, as it's (as you demonstrate
throughout this series) a generic feature.
diff mbox series

Patch

diff --git a/doc/board/emulation/qemu-arm.rst b/doc/board/emulation/qemu-arm.rst
index 97b6ec64905..b458a398c69 100644
--- a/doc/board/emulation/qemu-arm.rst
+++ b/doc/board/emulation/qemu-arm.rst
@@ -91,3 +91,15 @@  The debug UART on the ARM virt board uses these settings::
     CONFIG_DEBUG_UART_PL010=y
     CONFIG_DEBUG_UART_BASE=0x9000000
     CONFIG_DEBUG_UART_CLOCK=0
+
+Obtaining the QEMU devicetree
+-----------------------------
+
+QEMU generates its own devicetree to pass to U-Boot and does this by default.
+You can use `-dtb u-boot.dtb` to force QEMU to use U-Boot's in-tree version.
+
+To obtain the devicetree that qemu generates, add `-machine dumpdtb=dtb.dtb`,
+e.g.::
+
+    qemu-system-aarch64 -machine virt -nographic -cpu cortex-a57 \
+	    -bios u-boot.bin -machine dumpdtb=dtb.dtb