Single device tree blob between linux and u-boot

Rick Altherr raltherr at google.com
Fri Oct 14 06:37:23 AEDT 2016


I've been working on signed kernel images which depends on building FIT
images that include the kernel, initrd, and dtb.  The kernel_fitimage
branch of my tree (https://github.com/kc8apf/openbmc) will build an
unsigned FIT image by including the dtb specified in the machine config
(usually from the kernel).  There are also provisions in there for u-boot
being built in two stages so a control dtb that includes the public signing
keys can be combined into the final u-boot binary.  From how that is
structure, I suspect Maxim is right that there will be some differences
between u-boot's dtb and linux's dtb.  That shouldn't be an issue as the
u-boot dtb gets built into the u-boot image while the kernel dtb is loaded
from the FIT image.

Rick

On Thu, Oct 13, 2016 at 11:41 AM, Maxim Sloyko <maxims at google.com> wrote:

>
>
> On Thu, Oct 13, 2016 at 11:20 AM, Xo Wang <xow at google.com> wrote:
>
>> Hi folks,
>>
>> I saw Cedric had mentioned "...you can use the linux compiled [dtb]
>> and dd it at the end of the u-boot
>> partition..."
>>
>> To provide the device tree to u-boot, should we do what Cedric said
>> and also pass the address of the DTB from U-Boot to Linux? According
>> to these slides:
>>
>> https://events.linuxfoundation.org/sites/events/files/
>> slides/petazzoni-device-tree-dummies.pdf
>>
>> U-Boot can pass the DTB address to Linux in r2 (p. 6) with the right
>> bootm command parameters.
>>
>> This means we can have U-Boot and Linux use the same DTB binary (I
>> prefer built in Linux) rather than each source tree building one.
>>
>
> This introduces the dependency of U-Boot on Linux. Do we plan to keep this
> dependency forever? This may be fine with OpenBMC, but what about mainline
> U-Boot and Linux?
> Also, are we sure that they are 100% compatible? IIRC Peter was saying
> that in practice you need two different device trees for U-Boot and Linux.
>
>
>>
>> Then we can remove the CONFIG_ARM_APPENDED_DTB option in our Linux
>> build that is described as a legacy "compatibility" mechanism. We also
>> avoid having an extra copy of the DTSs in U-Boot source and avoid
>> duplicate DTBs in our image.
>>
>> Thoughts?
>>
>> cheers
>> xo
>> _______________________________________________
>> openbmc mailing list
>> openbmc at lists.ozlabs.org
>> https://lists.ozlabs.org/listinfo/openbmc
>>
>
>
>
> --
> *M*axim *S*loyko
>
> _______________________________________________
> openbmc mailing list
> openbmc at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/openbmc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20161013/2bc969d0/attachment.html>


More information about the openbmc mailing list