<div dir="auto">Whoops. Dropped the list. Adding it back.</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 14, 2017 4:28 PM, &quot;Nikunj Kela&quot; &lt;<a href="mailto:nikunj.kela@gmail.com">nikunj.kela@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I do agree that this can be fixed in u-boot however I saw a commit for initrd load/entry addresses that make use of UBOOT_RD_* variables in OE, so I thought of adding one for FDT load address.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 14, 2017 at 4:24 PM, Rick Altherr <span dir="ltr">&lt;<a href="mailto:raltherr@google.com" target="_blank">raltherr@google.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div dir="auto"><span style="font-family:sans-serif">I don&#39;t see harm in taking this patch but it does encourage a poor practice.</span><br></div><div dir="auto"><br></div>They probably set the U-Boot boot command to &#39;bootm &lt;kernel_addr&gt; &lt;initrd_addr&gt; &lt;fdt_addr&gt;&#39; which is what you do for legacy images. With FIT, only the address of the FIT itself is strictly needed.  Instead of pinning the FDT and initrd to fixed address, the U-Boot boot command can be a HUSH script that checks the FIT for initrd and FDT and falls back to fixed address if not found.<div dir="auto"><br></div><div dir="auto">I did this recently in OpenBMC&#39;s U-Boot for Aspeed SoCs. I&#39;m on my phone so I don&#39;t have a link handy. The advantage is a more compact RAM layout since U-Boot only allocates exactly the RAM required for the copies.</div><span class="m_6256535771595248298HOEnZb"><font color="#888888"><div dir="auto"><br></div><div dir="auto">Rick</div></font></span></div><div class="m_6256535771595248298HOEnZb"><div class="m_6256535771595248298h5"><div class="gmail_extra"><br><div class="gmail_quote">On Feb 14, 2017 4:04 PM, &quot;Nikunj Kela&quot; &lt;<a href="mailto:nikunj.kela@gmail.com" target="_blank">nikunj.kela@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Recently, on freescale ls1043a reference board, I came across a situation where if I don&#39;t specify the FDT load address in the fitImage, the uboot picks up some address however kernel doesn&#39;t boot. I looked at the freescale supplied BSP and found that load address is required for their FDT. </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 14, 2017 at 2:41 PM, Rick Altherr <span dir="ltr">&lt;<a href="mailto:raltherr@google.com" target="_blank">raltherr@google.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The attached patch seems to do exactly the opposite of the commit message.  When no &quot;load&quot; property is set for the fdt node, U-Boot will allocate memory dynamically and copy the fdt to the allocated RAM _if needed_.  With this patch, if UBOOT_FDT_LOADADDRESS is set, U-Boot will _always_ attempt to copy the fdt to the specified address.  I&#39;m surprised you need the FDT at a specific address.  Are you able to share more details about the situation you need this option in?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_6256535771595248298m_-6674877535799084198m_-2811090593725357575h5">On Tue, Feb 14, 2017 at 1:27 PM, Nikunj Kela <span dir="ltr">&lt;<a href="mailto:nikunj.kela@gmail.com" target="_blank">nikunj.kela@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_6256535771595248298m_-6674877535799084198m_-2811090593725357575h5">Allow the load address for the FDT segment in the fitImage. This<br>
allows U-Boot to dynamically decide where to load the FDT.<br>
<br>
UBOOT_FDT_LOADADDRESS - Specifies the load address used by u-boot<br>
                for the FDT<br>
<br>
Signed-off-by: Nikunj Kela &lt;<a href="mailto:nikunj.kela@gmail.com" target="_blank">nikunj.kela@gmail.com</a>&gt;<br>
---<br>
 meta/classes/kernel-fitimage.<wbr>bbclass | 6 ++++++<br>
 1 file changed, 6 insertions(+)<br>
<br>
diff --git a/meta/classes/kernel-fitimage<wbr>.bbclass b/meta/classes/kernel-fitimage<wbr>.bbclass<br>
index 1c3b4b7..7f9da49 100644<br>
--- a/meta/classes/kernel-fitimage<wbr>.bbclass<br>
+++ b/meta/classes/kernel-fitimage<wbr>.bbclass<br>
@@ -127,6 +127,11 @@ EOF<br>
 fitimage_emit_section_dtb() {<br>
<br>
        dtb_csum=&quot;sha1&quot;<br>
+       fdt_loadline=&quot;&quot;<br>
+<br>
+       if [ -n &quot;${UBOOT_FDT_LOADADDRESS}&quot; ]; then<br>
+               fdt_loadline=&quot;load = &lt;${UBOOT_FDT_LOADADDRESS}&gt;;&quot;<br>
+       fi<br>
<br>
        cat &lt;&lt; EOF &gt;&gt; ${1}<br>
                 fdt@${2} {<br>
@@ -135,6 +140,7 @@ fitimage_emit_section_dtb() {<br>
                         type = &quot;flat_dt&quot;;<br>
                         arch = &quot;${UBOOT_ARCH}&quot;;<br>
                         compression = &quot;none&quot;;<br>
+                        ${fdt_loadline}<br>
                         hash@1 {<br>
                                 algo = &quot;${dtb_csum}&quot;;<br>
                         };<br>
</div></div><span class="m_6256535771595248298m_-6674877535799084198m_-2811090593725357575HOEnZb"><font color="#888888"><span class="m_6256535771595248298m_-6674877535799084198m_-2811090593725357575m_-8897050325125467373HOEnZb"><font color="#888888">--<br>
2.5.0<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org" target="_blank">Openembedded-core@lists.openem<wbr>bedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div><br></div>
</blockquote></div></div>
</div></div></blockquote></div><br></div>
</blockquote></div></div>