Replies: 8 comments 4 replies
-
That's because there is no zephyr.dtb in zephyr! The "dtb" file is a header file, the devicetree can be query through C-macro. Everything is resolved at compiled time. See this documentation The rational behind this choice is that many embedded systems do not have a file system. We could have embedded the ".dtb" in the image, but then it impacts RAM/ROM usage... |
Beta Was this translation helpful? Give feedback.
-
Hi ldomaigne, |
Beta Was this translation helpful? Give feedback.
-
Do I understand correctly that you need the .dtb to give the information to the Xen hypervisor? You could perhaps use the dtc compiler to generate this file from
|
Beta Was this translation helpful? Give feedback.
-
So that means, we can still pass the dtb to the zephyr right??
…On Fri, 14 Feb 2025 at 11:58 PM, Loïc Domaigné ***@***.***> wrote:
Do I understand correctly that you need the .dtb to give the information
to the Xen hypervisor?
I am not familiar with Xen, so takes my answer with a grain of salt.
You could perhaps use the *dtc* compiler to generate this file from
zephyr.dts ?
$ dtc -I dts -O dtb -o zephyr.dtb build/zephyr/zephyr.dts
—
Reply to this email directly, view it on GitHub
<#85706 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPD62QN5KP37RT7M6DO6T32PYYUHAVCNFSM6AAAAABXBOYYYKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRQGQZTSOI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the information
…On Sat, 15 Feb 2025 at 2:40 PM, ljd42 ***@***.***> wrote:
No?
I don't know what you mean by "pass the dtb to the zephyr".
As explained previously, the dtb in zephyr is a header file, which encodes
the devicetree as a bunch of C #define, which can then be queried via
C-macros. As such, the """zephyr dtb""" (to use your wordings) exists
solely at source level, but not really in zephyr.bin. The information of
the DT nodes, available as C #define, is used to initialize data structure
like struct device. But all happens at compile time.
Still, the zephyr build system generate a dts file. So nothing prevent us
to use the dtc compiler if we want a .dtb file, in the event it's needed
'elsewhere' - though I am not sure where that would be 😆
Checkout this article from Memfault
<https://interrupt.memfault.com/blog/practical_zephyr_dt#practical-zephyr-devicetree-basics-part-3>,
in particular the section related to compiling the devicetree
<https://interrupt.memfault.com/blog/practical_zephyr_dt#compiling-the-devicetree>
.
—
Reply to this email directly, view it on GitHub
<#85706 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPD62QYSO3KA4GWFBDWO5D2P376ZAVCNFSM6AAAAABXBOYYYKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRQHAZDONQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
@madhusk I think you have a wrong idea of Zephyr XENVM configuration. With Zephyr you just build a static image, and before that you need to configure the dts/overlay with the needed peripherals and all the necessary configurations. Zephyr will not provide you the dtb needed to configure XEN. You need to generate a passthrough which you will give as an input to XEN. And then XEN will provide the gpios/peripherals to the Zephyr VM. The information to create the passthrough will not be provided by Zephyr. It is more or less based on the linux dts of the device with some small changes and adaptations. PS: from experience try to run Zephyr natively on your board before trying to implement Zephyr as XENVM |
Beta Was this translation helpful? Give feedback.
-
Can you help me with providing documentation or any link which describes
how to generate the pass through with a small example kind of thing. That
would be great help.
…On Sun, 16 Feb 2025 at 1:59 AM, Mario Paja ***@***.***> wrote:
@madhusk <https://github.com/madhusk> I think you have a wrong idea of
Zephyr XENVM configuration. With Zephyr you just build a static image, and
before that you need to configure the dts/overlay with the needed
peripherals and all the necessary configurations. Zephyr will not provide
you the dtb needed to configure XEN.
You need to generate a passthrough which you will give as an input to XEN.
And then XEN will provide the gpios/peripherals to the Zephyr VM.
The information to create the passthrough will ne provided by Zephyr. It
is more or less based on the linux dts of the device with some small
changes and adaptations.
PS: from experience try to run Zephyr natively on your board before trying
to implement Zephyr as XENVM
—
Reply to this email directly, view it on GitHub
<#85706 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPD62VBCA66FVBHOCKITO32P6PTNAVCNFSM6AAAAABXBOYYYKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRRGE3TKNQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot 😊
…On Sun, 16 Feb 2025 at 1:25 PM, Mario Paja ***@***.***> wrote:
@madhusk <https://github.com/madhusk> here are some passthrough examples
for xilinx zcu102 https://github.com/Xilinx/xen-passthrough-device-trees.
They are more or less the copy/paste from the linux dts, only with small
changes.
—
Reply to this email directly, view it on GitHub
<#85706 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPD62THW4IOVZAX4JZSRJ32QA76FAVCNFSM6AAAAABXBOYYYKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTEMRRGM3TQNA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
.com>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried building the zephyr code for xenvm, able to generate zephyr.bin, but I don't see any .dtb getting generated (zephyr.dtb), do I need to set/configure something to generate the zephyr.dtb for xenvm?
Beta Was this translation helpful? Give feedback.
All reactions