<div dir="ltr">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 (<a href="https://github.com/kc8apf/openbmc">https://github.com/kc8apf/openbmc</a>) 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.<div><br></div><div>Rick</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 13, 2016 at 11:41 AM, Maxim Sloyko <span dir="ltr"><<a href="mailto:maxims@google.com" target="_blank">maxims@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Oct 13, 2016 at 11:20 AM, Xo Wang <span dir="ltr"><<a href="mailto:xow@google.com" target="_blank">xow@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi folks,<br>
<br>
I saw Cedric had mentioned "...you can use the linux compiled [dtb]<br>
and dd it at the end of the u-boot<br>
partition..."<br>
<br>
To provide the device tree to u-boot, should we do what Cedric said<br>
and also pass the address of the DTB from U-Boot to Linux? According<br>
to these slides:<br>
<br>
<a href="https://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf" rel="noreferrer" target="_blank">https://events.linuxfoundation<wbr>.org/sites/events/files/<wbr>slides/petazzoni-device-tree-<wbr>dummies.pdf</a><br>
<br>
U-Boot can pass the DTB address to Linux in r2 (p. 6) with the right<br>
bootm command parameters.<br>
<br>
This means we can have U-Boot and Linux use the same DTB binary (I<br>
prefer built in Linux) rather than each source tree building one.<br></blockquote><div><br></div></span><div>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?</div><div>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.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Then we can remove the CONFIG_ARM_APPENDED_DTB option in our Linux<br>
build that is described as a legacy "compatibility" mechanism. We also<br>
avoid having an extra copy of the DTSs in U-Boot source and avoid<br>
duplicate DTBs in our image.<br>
<br>
Thoughts?<br>
<br>
cheers<br>
xo<br>
______________________________<wbr>_________________<br>
openbmc mailing list<br>
<a href="mailto:openbmc@lists.ozlabs.org" target="_blank">openbmc@lists.ozlabs.org</a><br>
<a href="https://lists.ozlabs.org/listinfo/openbmc" rel="noreferrer" target="_blank">https://lists.ozlabs.org/listi<wbr>nfo/openbmc</a><br>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_7182956656682797836gmail_signature" data-smartmail="gmail_signature"><div><b>M</b>axim <b>S</b>loyko</div></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<br>
openbmc mailing list<br>
<a href="mailto:openbmc@lists.ozlabs.org">openbmc@lists.ozlabs.org</a><br>
<a href="https://lists.ozlabs.org/listinfo/openbmc" rel="noreferrer" target="_blank">https://lists.ozlabs.org/<wbr>listinfo/openbmc</a><br>
<br></blockquote></div><br></div>