[yocto] How to define and build device tree in Yocto?

JH jupiter.hce at gmail.com
Mon May 6 00:36:20 PDT 2019


Thanks Gabriele,

Yes, I have already added KERNEL_DEVICETREE =  "imx6ull-14x14-evk.dtb"
to generate an image running on imx6 EVK. What I don't understand is
how that imx6ull-14x14-evk.dtb was compiled? I thought all dtb are
compiled from dts files, but there is no imx6ull-14x14-evk.dts, the
imx6ullevk.conf defined the EVK but there is no detail in that file.

My second question is my new hardware based on imx6ull MCU now has a
dts file, since I could not see any samples how is the dtb compiled
from a dts file, I have no idea where to put the dts file, how to link
that dts file to generate a dtb file in recipe. Appreciate more
clarification.

Thank you.

- jh

On 5/6/19, Gabriele Zampieri <gabbla.malist at gmail.com> wrote:
> Hi,
>
> The easiest way is to add them via patches. You can write a recipe that
> patch the Linux tree and put it in your meta layer (usually in
> meta-xxx/recipes-kernel/linux). Then you need to tell Yocto to export the
> dtb via KERNEL_DEVICETREE variable (
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-KERNEL_DEVICETREE).
> I usually put this variable in my machine configuration.
>
> Gabriele
>
> Il giorno dom 5 mag 2019 alle ore 14:04 JH <jupiter.hce at gmail.com> ha
> scritto:
>
>> Hi,
>>
>> I think the device tree blob is build from device tree source, but I
>> could not find any dts files in recipe source directory, there are
>> many dts files in build directory and there are dtb in build
>> directory.
>>
>> If I have a device tree source, where I should put it and how to
>> define the recipe to built it?
>>
>> Thank you.
>>
>> Kind regards,
>>
>> - jupiter
>> --
>> _______________________________________________
>> yocto mailing list
>> yocto at yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>


More information about the yocto mailing list